This is the mail archive of the
guile-emacs@sourceware.cygnus.com
mailing list for the Guile project.
Re: guileapi.x problems [patch]
Kalle Olavi Niemitalo <tosi@ees2.oulu.fi> writes:
> > A suggestion: Redirect output to guileapi.tmp, then rename that file
> > to guileapi.x.
>
> That is what I tried initially, but it didn't work. guileapi.c
> #includes guileapi.x and if it doesn't exist, guile-snarf complains.
>
> Perhaps the #include should be wrapped in #ifndef SCM_MAGIC_SNARFER.
> Is guile-snarf guaranteed to keep defining that?
This is what guile-snarf does:
## 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 $?
And this is how Guile's Makefile call it:
.c.x:
PATH=.:${PATH} ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
|| { rm $@; false; }
What would be the best?