* Renamed SCM__X tokens to better readable ones that also follow the
[bpt/guile.git] / libguile / guile-snarf.in
1 #!/bin/sh
2 # Extract the initialization actions for builtin things.
3
4 temp="/tmp/snarf.$$"
5 trap "rm -f $temp" 0 1 2 15
6
7 ## Let the user override the preprocessor autoconf found.
8 test -n "${CPP+set}" || CPP="@CPP@"
9
10 ## We must use a temporary file here, instead of a pipe, because we
11 ## need to know if CPP exits with a non-zero status.
12 ${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $?
13 < ${temp} grep "^ *SCM_SNARF_INIT_START" | sed -e "s/^ *SCM_SNARF_INIT_START//" -e 's/SCM_SNARF_DOC_START.*$//g'
14
15 ## Apparently, AIX's preprocessor is unhappy if you try to #include an
16 ## empty file.
17 echo