1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

* guile-snarf.in: Be sure to exit with an error if CPP does.

* Makefile.am (.c.x): Delete the .x file and exit with an error
status if guile-snarf exits with an error status.
* Makefile.in: Regenerated.
This commit is contained in:
Jim Blandy 1999-09-05 13:47:23 +00:00
parent 9d743bfb5f
commit 7677589ac6
3 changed files with 12 additions and 3 deletions

View file

@ -155,7 +155,8 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
SUFFIXES = .x SUFFIXES = .x
.c.x: .c.x:
./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
|| (rm $@; false)
## Add -MG to make the .x magic work with auto-dep code. ## Add -MG to make the .x magic work with auto-dep code.
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)

View file

@ -691,7 +691,8 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
@echo '}' >> libpath.tmp @echo '}' >> libpath.tmp
@mv libpath.tmp libpath.h @mv libpath.tmp libpath.h
.c.x: .c.x:
./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
|| (rm $@; false)
cpp_err_symbols.c: cpp_err_symbols.in cpp_err_symbols.c: cpp_err_symbols.in
$(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \

View file

@ -1,9 +1,16 @@
#!/bin/sh #!/bin/sh
# Extract the initialization actions for builtin things. # 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. ## Let the user override the preprocessor autoconf found.
test -n "${CPP+set}" || CPP="@CPP@" test -n "${CPP+set}" || CPP="@CPP@"
${CPP} -DSCM_MAGIC_SNARFER "$@" | grep "^ *% *% *%" | sed -e "s/^ *% *% *%//"
## 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 "^ *% *% *%" | sed -e "s/^ *% *% *%//"
## Apparently, AIX's preprocessor is unhappy if you try to #include an ## Apparently, AIX's preprocessor is unhappy if you try to #include an
## empty file. ## empty file.