* guile-doc-snarf.awk: Removed.
[bpt/guile.git] / libguile / guile-doc-snarf.in
1 #!/bin/sh
2 # Extract the initialization actions for builtin things.
3
4 filename=`basename $1`; shift
5
6 # we need to be sure that the .x file exists
7 # since the .c/.cc file may include it
8 # (the old guile-snarf did not have this problem
9 # because the makefile redirects output to the .x file
10 # which creates the file before the inclusion occurs)
11 # --12/12/99 gjb
12 dot_x=${filename%.*}.x
13 touch --date=01/01/70 $dot_x
14
15 temp="/tmp/snarf.$$"
16 trap "rm -f $temp" 0 1 2 15
17
18 ## Let the user override the preprocessor autoconf found.
19 test -n "${CPP+set}" || CPP="@CPP@"
20
21 ## We must use a temporary file here, instead of a pipe, because we
22 ## need to know if CPP exits with a non-zero status.
23 ${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $?
24 < ${temp} awk -f `dirname $0`/guile-doc-snarf.awk $filename