This is the mail archive of the guile-emacs@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

guileapi.x problems [patch]


I've spent the evening with guile-emacs-0.1 and it's wonderful!
You wrote it needs Emacs 20.6 but version 20.5 seems to work just
fine, at least on i486-debian-linux-gnu.  (Debian doesn't have
20.6 yet.)

There were some problems generating guileapi.x, though:

* I was compiling in a separate directory.  The makefile tried to
  find guileapi.c in the build directory.

* I have the current Guile headers in ~/include, not
  /usr/include.  Using them requires the -I/home/kalle/include
  option, which I have in $CPPFLAGS.  The snarfing rule didn't
  use that variable.

* When the command failed, a zero-length guileapi.x was left.
  The first time this happened, I didn't notice and spent some
  time wondering why emacs-eval didn't work.

=================================================================
--- src/Makefile.in.orig	Tue Mar 14 14:13:42 2000
+++ src/Makefile.in	Tue Mar 14 16:13:15 2000
@@ -1128,8 +1128,14 @@
 sunfns.o: sunfns.c buffer.h window.h $(config_h)
 
 guileapi.o: guileapi.c guileapi.x
+/* Don't leave an empty guileapi.x if guile-snarf fails.
+   OTOH, guileapi.x must exist when guile-snarf runs.
+   The -I options are needed for config.h when $(srcdir) is
+   somewhere else.  This can't use $(ALL_CFLAGS) because
+   guile-snarf may run the preprocessor directly.  */
 guileapi.x: guileapi.c
-	guile-snarf guileapi.c > guileapi.x
+	guile-snarf -I. -I$(srcdir) $(CPPFLAGS) $(srcdir)/guileapi.c > guileapi.x \
+	  || ( rm guileapi.x; false )
 
 ${libsrc}emacstool: ${libsrc}emacstool.c
 	cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
=================================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]