Update of /cvsroot/mahogany/M
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20159

Modified Files:
        makerules configure configure.in 
Log Message:
build even if yacc is not available (using pregenerated .c files) (closes 872)

Index: makerules
===================================================================
RCS file: /cvsroot/mahogany/M/makerules,v
retrieving revision 1.63
retrieving revision 1.64
diff -b -u -2 -r1.63 -r1.64
--- makerules   19 Dec 2003 14:52:59 -0000      1.63
+++ makerules   9 Jul 2004 12:32:47 -0000       1.64
@@ -92,4 +92,5 @@
        @f=$(notdir $*); test ! -f $$f.d || { sed "s,^$$f\.o:,$@:," $$f.d >$*.o && rm 
-f $$f.d && mv $*.o $*.d; }
 
+ifdef YACC
 vpath %.y .src
 %.o: %.y
@@ -98,4 +99,12 @@
        @f=$(notdir $*); test ! -f $$f.d || { sed -e "s,^$$f\.o:,$@:," -e "s,$*.c,$<," 
$$f.d >$*.t && rm -f $$f.d && mv $*.t $*.d; }
        @rm -f $*.c
+else
+vpath %.c-yacc .src
+%.o: %.c-yacc
+       @mv $< $*.c
+       $(CC) -o $@ $(M_COMPILE_CC) $*.c
+       @f=$(notdir $*); test ! -f $$f.d || { sed -e "s,^$$f\.o:,$@:," -e "s,$*.c,$<," 
$$f.d >$*.t && rm -f $$f.d && mv $*.t $*.d; }
+       @rm -f $*.c
+endif
 
 # this syntax is for exuberant ctags

Index: configure
===================================================================
RCS file: /cvsroot/mahogany/M/configure,v
retrieving revision 1.319
retrieving revision 1.320
diff -b -u -2 -r1.319 -r1.320
--- configure   8 Jul 2004 22:06:38 -0000       1.319
+++ configure   9 Jul 2004 12:32:47 -0000       1.320
@@ -569,5 +569,5 @@
 
 
-# From configure.in Id: configure.in,v 1.304 2004/05/02 12:32:57 vadz Exp 
+# From configure.in Id: configure.in,v 1.305 2004/07/08 22:06:45 vadz Exp 
 
 rm -f conftestdata
@@ -2270,5 +2270,5 @@
 
 
-for ac_prog in 'bison -y' byacc
+for ac_prog in byacc yacc 'bison -y'
[...1001 lines suppressed...]
 set dummy latex2html; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5413: checking for $ac_word" >&5
+echo "configure:5417: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LATEX2HTML'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5505,5 +5509,5 @@
             if test "x$GXX" != "xyes"; then
        echo $ac_n "checking whether ${CXX} accepts ${DEPFLAGS}""... $ac_c" 1>&6
-echo "configure:5508: checking whether ${CXX} accepts ${DEPFLAGS}" >&5
+echo "configure:5512: checking whether ${CXX} accepts ${DEPFLAGS}" >&5
 if eval "test \"`echo '$''{'m_cv_cxx_depflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5528,5 +5532,5 @@
        if test "x$GCC" != "xyes"; then
            echo $ac_n "checking whether ${CC} accepts ${DEPFLAGS}""... $ac_c" 1>&6
-echo "configure:5531: checking whether ${CC} accepts ${DEPFLAGS}" >&5
+echo "configure:5535: checking whether ${CC} accepts ${DEPFLAGS}" >&5
 if eval "test \"`echo '$''{'m_cv_c_depflags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6

Index: configure.in
===================================================================
RCS file: /cvsroot/mahogany/M/configure.in,v
retrieving revision 1.305
retrieving revision 1.306
diff -b -u -2 -r1.305 -r1.306
--- configure.in        8 Jul 2004 22:06:45 -0000       1.305
+++ configure.in        9 Jul 2004 12:33:07 -0000       1.306
@@ -420,6 +420,11 @@
 AC_PATH_PROG(M4, m4)
 
-dnl set YACC to yacc location
-AC_PROG_YACC
+dnl set YACC to yacc location: don't use AC_PROG_YACC as it does *not* fail if
+dnl yacc is not available (!)
+AC_CHECK_PROGS(YACC, byacc yacc 'bison -y', none)
+if test "$YACC" = "none"; then
+    AC_MSG_WARN([yacc not found, you will not be able to modify *.y files.])
+    YACC=
+fi
 
 AC_PROG_INSTALL



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to