From: Tom Tromey Date: Fri, 16 Feb 1996 06:06:46 +0000 (+0000) Subject: Beginnings of yacc support. More for C++ X-Git-Tag: Release-0-30~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db5128c383814de09c7a080cb4131f758bfa7265;p=thirdparty%2Fautomake.git Beginnings of yacc support. More for C++ --- diff --git a/ChangeLog b/ChangeLog index 116bf94c0..2bfa9c7cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Feb 15 09:12:45 1996 Tom Tromey + + * 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 * depend.am ($(srcdir)/.deps/.P): Use "echo", not ":". diff --git a/NEWS b/NEWS index c2b488351..93c7903fa 100644 --- 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 New in 0.29: * Many bug fixes diff --git a/TODO b/TODO index 9e20f26b9..2d49ce233 100644 --- 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. diff --git a/automake.in b/automake.in index 5c11e1fc9..135df5718 100755 --- a/automake.in +++ b/automake.in @@ -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/;