From: Tom Tromey Date: Tue, 10 Dec 1996 07:46:39 +0000 (+0000) Subject: fixed ac_subst bug X-Git-Tag: Release-1-1m~43 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d645c64387dcd1f2ac21d453d3826735b5a3ed7a;p=automake.git fixed ac_subst bug --- diff --git a/ChangeLog b/ChangeLog index 313be0f1..8ad83383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ +Tue Dec 10 00:41:17 1996 Tom Tromey + + * automake.in (AC_SUBST_PATTERN): Check for alphanumeric variable + names only. Test subst.test. + Mon Dec 9 08:18:42 1996 Tom Tromey + * automake.in (file_contents_with_transform): Use ne, not !=, to + compare strings. Compare against correct string. From Jim + Meyering. + (handle_texinfo): Use rm -f to remove info files. From Gord + Matzigkeit. + * Released 1.1l. * automake.in (handle_texinfo): Put .ps on @suffixes. diff --git a/TODO b/TODO index b77763b7..fb619aa5 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,15 @@ Priorities for release: !! documentation (eg new macros) * copyrights on m4 files, aclocal output +* should skip AC_DEFUN lines; otherwise scanning aclocal.m4 can + mess up somewhat (eg think it sees a macro that is defined but + not used) + +* should not "handle" AC_SUBST($1), etc. Ooops + +* should not put texiname_TEXINFOS into distribution + should rename this macro anyway, to foo_texi_DEPENDENCIES + For now I guess I'll just have automake give an error if it encounters non-C source in a libtool library specification. diff --git a/automake.in b/automake.in index 0b62e57a..ccdc9b6a 100755 --- a/automake.in +++ b/automake.in @@ -50,7 +50,9 @@ $AM_INIT_AUTOMAKE_PATTERN = "AM_INIT_AUTOMAKE\\([^,]*,([^)]+)\\)"; $AM_PACKAGE_VERSION_PATTERN = "^\\s*\\[?([^]\\s]+)\\]?\\s*\$"; # Note that there is no AC_PATH_TOOL. But we don't really care. $AC_CHECK_PATTERN = "AC_(CHECK|PATH)_(PROG|PROGS|TOOL)\\(\\[?([^]),]+)"; -$AC_SUBST_PATTERN = "AC_SUBST\\(\\[?([^])]+)"; +# Just check for alphanumeric in AC_SUBST. If you do AC_SUBST(5), +# then too bad. +$AC_SUBST_PATTERN = "AC_SUBST\\(\\[?(\w+)"; # Constants to define the "strictness" level. $FOREIGN = 0; @@ -1624,7 +1626,7 @@ sub handle_texinfo &pretty_print_rule ("\trm -f", "\t ", @texi_cleans); $output_rules .= ("\nclean-info:\n\ndistclean-info:\n\n" . "maintainer-clean-info:\n\t" - . 'for i in $(INFO_DEPS); do rm `eval echo $$i*`; done' + . 'for i in $(INFO_DEPS); do rm -f `eval echo $$i*`; done' . "\n"); &push_phony_cleaners ('info'); @@ -4179,7 +4181,7 @@ sub file_contents_with_transform local ($command, $basename) = @_; local ($file) = $am_dir . '/' . $basename . '.am'; - if ($command ne '' && substr ($command, -1) != '~') + if ($command ne '' && substr ($command, -1) ne ';') { die "automake: programming error in file_contents_with_transform\n"; } diff --git a/tests/ChangeLog b/tests/ChangeLog index a59b80fa..064dbfe4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 10 00:43:14 1996 Tom Tromey + + * subst.test: New file. + Sun Dec 8 12:25:22 1996 Tom Tromey * colneq2.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 27d08816..aaa6c91a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,7 +20,7 @@ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \ acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \ ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \ colon3.test remake.test output.test output2.test remake2.test output3.test \ -output4.test colneq2.test +output4.test colneq2.test subst.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 5266ae23..b0c1e219 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -62,7 +62,7 @@ comment2.test vpath.test symlink.test discover.test acinclude.test req.test \ acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \ ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \ colon3.test remake.test output.test output2.test remake2.test output3.test \ -output4.test colneq2.test +output4.test colneq2.test subst.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/subst.test b/tests/subst.test new file mode 100755 index 00000000..42098ecb --- /dev/null +++ b/tests/subst.test @@ -0,0 +1,17 @@ +#! /bin/sh + +# Test that AC_SUBST($1) does something sensible. From Ulrich +# Drepper. + +. $srcdir/defs || exit 1 + +cat >> configure.in << 'END' +AC_SUBST($1) +AC_SUBST([$]$1) dnl this is the actual invocation that was used +END + +: > Makefile.am + +$AUTOMAKE || exit 1 +grep '^\$1' Makefile.in && exit 1 +exit 0