guile-snarf configuration
authorBT Templeton <bpt@hcoop.net>
Fri, 3 Aug 2012 04:41:43 +0000 (00:41 -0400)
committerRobin Templeton <robin@terpri.org>
Sat, 18 Apr 2015 22:49:09 +0000 (18:49 -0400)
* configure.ac: Check for guile-snarf.
* src/Makefile.in: Add suffix rules for guile-snarf.

configure.ac
src/Makefile.in

index 88a06ba..3267e73 100644 (file)
@@ -1376,6 +1376,11 @@ PKG_CHECK_MODULES([GUILE], [guile-2.2], [],
 AC_SUBST(GUILE_CFLAGS)
 AC_SUBST(GUILE_LIBS)
 
+AC_PATH_PROG(GUILE_SNARF, guile-snarf, no)
+if test "$GUILE_SNARF" = "no"; then
+   AC_MSG_ERROR([guile-snarf not found])
+fi
+
 HAVE_SOUND=no
 
 if test "${with_sound}" != "no"; then
index 83b5a2f..7f8af80 100644 (file)
@@ -312,6 +312,8 @@ DEPFLAGS=@DEPFLAGS@
 ## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
 MKDEPDIR=@MKDEPDIR@
 
+GUILE_SNARF=@GUILE_SNARF@
+
 ## DO NOT use -R.  There is a special hack described in lastfile.c
 ## which is used instead.  Some initialized data areas are modified
 ## at initial startup, then labeled as part of the text area when
@@ -334,7 +336,8 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
   $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 
-.SUFFIXES: .m
+.SUFFIXES: .m .x
+
 .c.o:
        @$(MKDEPDIR)
        $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
@@ -342,6 +345,11 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
        @$(MKDEPDIR)
        $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
 
+.c.x:
+       $(GUILE_SNARF) -o $@ $< $(CPPFLAGS) $(ALL_CFLAGS)
+.m.x:
+       $(GUILE_SNARF) -o $@ $< $(CPPFLAGS) $(ALL_OBJC_CFLAGS)
+
 ## lastfile must follow all files whose initialized data areas should
 ## be dumped as pure by dump-emacs.
 base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \