guile/libguile/guile-snarf.in
2000-06-21 08:43:12 +00:00

17 lines
592 B
Bash

#!/bin/sh
# Extract the initialization actions for builtin things.
temp="/tmp/snarf.$$"
trap "rm -f $temp" 0 1 2 15
## Let the user override the preprocessor autoconf found.
test -n "${CPP+set}" || CPP="@CPP@"
## We must use a temporary file here, instead of a pipe, because we
## need to know if CPP exits with a non-zero status.
${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $?
< ${temp} grep "^ *SCM_SNARF_INIT_START" | sed -e "s/^ *SCM_SNARF_INIT_START//" -e 's/SCM_SNARF_DOC_START.*$//g'
## Apparently, AIX's preprocessor is unhappy if you try to #include an
## empty file.
echo