Beginnings of yacc support. More for C++
authorTom Tromey <tromey@redhat.com>
Fri, 16 Feb 1996 06:06:46 +0000 (06:06 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 16 Feb 1996 06:06:46 +0000 (06:06 +0000)
ChangeLog
NEWS
TODO
automake.in

index 116bf94..2bfa9c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Feb 15 09:12:45 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in: (seen_prog_yacc): New variable.
+       (scan_configure): Look for yacc.
+       (handle_source_transform): Skipp C++ header files.
+       (handle_source_transform): .cxx is a C++ source file.
+
 Wed Feb 14 08:36:02 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * depend.am ($(srcdir)/.deps/.P): Use "echo", not ":".
diff --git a/NEWS b/NEWS
index c2b4883..93c7903 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,8 +6,8 @@ New in 0.30:
 * Doesn't print anything when running
 * Beginnings of MAINT_CHARSET support
 * Can specify version in AUTOMAKE_OPTIONS
-* Most errors recognizable by Emacs' M-x next-error.
-* Added --verbose option.
+* Most errors recognizable by Emacs' M-x next-error
+* Added --verbose option
 \f
 New in 0.29:
 * Many bug fixes
diff --git a/TODO b/TODO
index 9e20f26..2d49ce2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,6 +5,10 @@ Top priorities:
 * Rewrite clean targets.
 * Expand test suite.
 
+BUGS:
+** textutils makes uninstall do uninstall-recursive twice!?!
+** 'all-am' should depend on Makefile, etc -- not 'all'
+
 Check all require_file errors to see if any should reference a line in
 Makefile.am or configure.in.
 
@@ -67,12 +71,13 @@ Maybe introduce syntax like this:
        AUTOMAKE_OPTIONS = ../ansi2knr
 ?
 
-Consider automatic support for ".y" files.
-  [ not right now; it is nice to be able to print the number of
-    expected conflicts, and we can't handle that ]
-What about ".l" files?
-Consider supporting syntax from autoconf "derived:source", eg:
+Lex, yacc support:
+* It would be nice to automatically support using bison's better features
+  to rename the output files.  This requires autoconf support
+* Consider supporting syntax from autoconf "derived:source", eg:
        y.tab.c:perly.y
+  for yacc and lex source
+* if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
 
 Write autoconf macro to do all work necessary for automake.  Eg define
 PACKAGE, VERSION, etc.
index 5c11e1f..135df57 100755 (executable)
@@ -109,9 +109,12 @@ $seen_prog_install = 0;
 # 1 if any scripts installed, 0 otherwise.
 $scripts_installed = 0;
 
-# Whether AC_PATH_XTRA has been seen in configure.in
+# Whether AC_PATH_XTRA has been seen in configure.in.
 $seen_path_xtra = 0;
 
+# Whether YACC variable has been seen in configure.in.
+$seen_prog_yacc = 0;
+
 # Charsets used by maintainer and in distribution.  MAINT_CHARSET is
 # handled in a funny way: if seen in the top-level Makefile.am, it is
 # used for every directory which does not specify a different value.
@@ -449,8 +452,9 @@ sub handle_source_transform
            local (@result) = ();
            foreach (@files)
            {
-               # Skip header files.
-               next if /\.h$/;
+               # Skip header files, including C++-ish ones.
+               next if /\.[hH]$/;
+               next if /\.hxx$/;
                # Skip things that look like macro references.
                next if /^\$\(.*\)$/;
                next if /^\$\{.*\}$/;
@@ -464,6 +468,7 @@ sub handle_source_transform
 
                # Transform source files into .o files.
                s/\.cc$/$obj/g;
+               s/\.cxx$/$obj/g;
                s/\.[cCmylfs]$/$obj/g;
                push (@result, $_);
 
@@ -1656,6 +1661,12 @@ sub scan_configure
        $seen_canonical = 1 if /AC_CANONICAL_(HOST|SYSTEM)/;
        $seen_path_xtra = 1 if /AC_PATH_XTRA/;
 
+       # Sometimes it is desirable to explicitly set YACC.  For
+       # instance some people don't want to use bison.
+       $seen_prog_yacc = 1 if (/AC_PROG_YACC/
+                               || /AC_SUBST\(YACC\)/
+                               || /AC_(PATH|CHECK)_PROGS?\(YACC/);
+
        # Some things required by Automake.  FIXME We only really
        # require AC_ARG_PROGRAM if any program is installed.
        $seen_make_set = 1 if /AC_PROG_MAKE_SET/;