OSSP CVS Repository

ossp - Check-in [1285]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1285
Date: 2001-Nov-08 21:28:22 (local)
2001-Nov-08 20:28:22 (UTC)
User:rse
Branch:
Comment: Add --enable-maintainer mode and only use Bison and Flex if this mode enabled. Else we assume end user mode where the scanner and parser files have to be already pre-generated. Additionally check the version of the installed GNU Flex to make sure developers to not think the 1997'er Flex version 2.5.4 is sufficient.
Tickets:
Inspections:
Files:
ossp-pkg/l2/Makefile.in      1.34 -> 1.35     6 inserted, 10 deleted
ossp-pkg/l2/aclocal.m4      1.7 -> 1.8     17 inserted, 0 deleted
ossp-pkg/l2/configure.ac      1.14 -> 1.15     22 inserted, 0 deleted
ossp-pkg/l2/devtool.conf      1.1 -> 1.2     1 inserted, 0 deleted

ossp-pkg/l2/Makefile.in 1.34 -> 1.35

--- Makefile.in  2001/11/08 18:31:50     1.34
+++ Makefile.in  2001/11/08 20:28:22     1.35
@@ -53,8 +53,8 @@
 RMDIR       = rmdir
 POD2MAN     = pod2man
 TRUE        = true
-BISON       = bison
-FLEX        = flex
+BISON       = @BISON@
+FLEX        = @FLEX@
 SHTOOL      = ./shtool
 LIBTOOL     = ./libtool
 
@@ -157,10 +157,10 @@
 #   build specification parser/scanner
 l2_spec.c: l2_spec.h l2_spec_parse.h
 l2_spec_scan.lo: l2_spec_scan.c l2_spec_parse.h
-l2_spec_parse.c l2_spec_parse.h: l2_spec_parse.y
-        $(BISON) -d -k -pl2_spec_ -ol2_spec_parse.c l2_spec_parse.y
-l2_spec_scan.c: l2_spec_scan.l
-        $(FLEX) -f -Pl2_spec_ -s -8 -B -ol2_spec_scan.c l2_spec_scan.l
+@M@l2_spec_scan.c: l2_spec_scan.l
+@M@     $(FLEX) -f -Pl2_spec_ -s -8 -B -ol2_spec_scan.c l2_spec_scan.l
+@M@l2_spec_parse.c l2_spec_parse.h: l2_spec_parse.y
+@M@     $(BISON) -d -k -pl2_spec_ -ol2_spec_parse.c l2_spec_parse.y
 
 #   build test suite programs
 l2_test: l2_test.o libl2.la
@@ -243,10 +243,6 @@
         -$(RMDIR) .libs >/dev/null 2>&1 || $(TRUE)
         $(RM) $(TARGET_LIBS)
         $(RM) $(TARGET_TESTS)
-#   remove machine-generated parsers and scanners
-        $(RM) l2_spec_parse.h
-        $(RM) l2_spec_parse.c
-        $(RM) l2_spec_scan.c
 
 #   remove everything which can be regenerated
 #   by "./configure && make all"


ossp-pkg/l2/aclocal.m4 1.7 -> 1.8

--- aclocal.m4   2001/11/07 14:22:26     1.7
+++ aclocal.m4   2001/11/08 20:28:22     1.8
@@ -179,6 +179,23 @@
 ])
 
 dnl ##
+dnl ##  Maintainer Support
+dnl ##
+dnl ##  configure.in:
+dnl ##    AC_CHECK_MAINTAINER
+dnl ##
+
+AC_DEFUN(AC_CHECK_MAINTAINER,[
+AC_MSG_CHECKING(for maintainer build mode)
+AC_ARG_ENABLE(maintainer,dnl
+[  --enable-maintainer     enable maintainer build mode (default=no)],
+[ enable_maintainer=yes; M=""  ],
+[ enable_maintainer=no;  M="#" ])dnl
+AC_SUBST(M)
+AC_MSG_RESULT([$enable_maintainer])
+])
+
+dnl ##
 dnl ##  Libtool Glue Code
 dnl ##
 dnl ##  configure.in:


ossp-pkg/l2/configure.ac 1.14 -> 1.15

--- configure.ac 2001/11/05 11:02:43     1.14
+++ configure.ac 2001/11/08 20:28:22     1.15
@@ -73,8 +73,30 @@
 fi
 AC_PROG_CPP
 AC_CHECK_DEBUGGING
+AC_CHECK_MAINTAINER
 AC_CONFIGURE_LIBTOOL
 
+dnl # check for developer tools:
+dnl # GNU Bison and GNU Flex
+if test ".$enable_maintainer" = .yes; then
+    AC_PATH_PROG(BISON, bison, NA)
+    if test ".$BISON" = .NA; then
+        AC_ERROR([require GNU Bison])
+    fi
+    AC_PATH_PROG(FLEX,  flex,  NA) 
+    if test ".$FLEX" = .NA; then
+        AC_ERROR([require GNU Flex])
+    fi
+    flex_version=`(flex --version 2>/dev/null | awk '{ print $3; }')`
+    case "$flex_version" in
+        2.[[5-6]].[[6-9]] ) ;;
+        * ) AC_ERROR([found GNU Flex version $flex_version; require version >= 2.5.6 (DEVELOPER VERSION!)]) ;;
+    esac
+else
+    AC_PATH_PROG(BISON, bison, true)
+    AC_PATH_PROG(FLEX,  flex,  true) 
+fi
+
 AC_CHECK_LIB(nsl, gethostname)
 if test ".`echo $LIBS | grep nsl`" = . ;then
     AC_CHECK_LIB(nsl, gethostbyname)


ossp-pkg/l2/devtool.conf 1.1 -> 1.2

--- devtool.conf 2001/11/08 09:53:34     1.1
+++ devtool.conf 2001/11/08 20:28:22     1.2
@@ -16,6 +16,7 @@
     ./configure \
         --prefix=/tmp/l2 \
         --disable-shared \
+        --enable-maintainer \
         --enable-debug \
         "$@"
 

CVSTrac 2.0.1