From d6e0d2040ace58d6c148a9da0c8dc8fae6c99091 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 17 Aug 1998 05:33:03 +0000 Subject: [PATCH] Fixed colon6.test. Added test for strange Tab bug --- ChangeLog | 8 ++++++++ THANKS | 1 + TODO | 4 ++++ automake.in | 17 ++++++++++------- tests/ChangeLog | 8 ++++++++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/colon6.test | 20 ++++++++++++++++++++ tests/cond6.test | 26 ++++++++++++++++++++++++++ 9 files changed, 79 insertions(+), 9 deletions(-) create mode 100755 tests/colon6.test create mode 100755 tests/cond6.test diff --git a/ChangeLog b/ChangeLog index 0db030a4..ab62af4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Aug 16 23:26:26 1998 Tom Tromey + + * automake.in (handle_configure): Use @inputs, not + @rewritten_inputs, when constructing CONFIG_FILES. Use different + list to test for file existence. Test colon6.test. + (rewrite_inputs_into_dependencies): Added add_srcdir argument. + Updated all callers. + Wed Aug 12 14:16:57 1998 Tom Tromey * Released 1.3b. diff --git a/THANKS b/THANKS index 79b5ded2..4da75b5e 100644 --- a/THANKS +++ b/THANKS @@ -52,6 +52,7 @@ Mark Eichin eichin@cygnus.com Mark Galassi rosalia@nis.lanl.gov Markku Rossi mtr@ngs.fi Markus F.X.J. Oberhumer k3040e4@wildsau.idv-edu.uni-linz.ac.at +Matt Leach mleach@cygnus.com Michael Brantley Michael-Brantley@deshaw.com Motoyuki Kasahara m-kasahr@sra.co.jp Nelson H. F. Beebe beebe@math.utah.edu diff --git a/TODO b/TODO index ede5c4b0..8103162b 100644 --- a/TODO +++ b/TODO @@ -7,6 +7,10 @@ * Reimplement maintainer mode to use conditionals Also add a conditional for dependency tracking +* Allow per-object cflags: + bin_PROGRAMS = foo + foo_CFLAGS = -DFOO + * Allow for multiple translations of a texinfo file: LL_info_TEXINFOS = ... will put info files for language LL into $(infodir)/LL. diff --git a/automake.in b/automake.in index e98298b0..08340319 100755 --- a/automake.in +++ b/automake.in @@ -2971,9 +2971,11 @@ sub handle_aclocal_m4 # AC_OUTPUT. Consider what the dependencies should look like in this # case: # AC_OUTPUT(src/out:src/in1:lib/in2) +# The first argument, ADD_SRCDIR, is 1 if $(top_srcdir) should be added. +# If 0 then files that require this addition will simply be ignored. sub rewrite_inputs_into_dependencies { - local (@inputs) = @_; + local ($add_srcdir, @inputs) = @_; local ($single, @newinputs); foreach $single (@inputs) @@ -2982,7 +2984,7 @@ sub rewrite_inputs_into_dependencies { push (@newinputs, &basename ($single)); } - else + elsif ($add_srcdir) { push (@newinputs, '$(top_srcdir)/' . $single); } @@ -3018,7 +3020,8 @@ sub handle_configure $colon_infile .= ':' . join (':', @secondary_inputs) if @secondary_inputs; - local (@rewritten) = &rewrite_inputs_into_dependencies (@secondary_inputs); + local (@rewritten) = &rewrite_inputs_into_dependencies (1, + @secondary_inputs); # This rule remakes the Makefile.in. Note use of @MAINT@ forces # us to abandon pretty-printing. Sigh. $output_rules .= ($infile @@ -3192,7 +3195,7 @@ sub handle_configure $file = $1; $local = &basename ($file); @inputs = split (':', $2); - @rewritten_inputs = &rewrite_inputs_into_dependencies (@inputs); + @rewritten_inputs = &rewrite_inputs_into_dependencies (1, @inputs); $need_rewritten = 1; } else @@ -3201,7 +3204,7 @@ sub handle_configure $local = &basename ($file); @inputs = ($local . '.in'); @rewritten_inputs = - &rewrite_inputs_into_dependencies ($file . '.in'); + &rewrite_inputs_into_dependencies (1, $file . '.in'); $need_rewritten = 0; } @@ -3229,7 +3232,7 @@ sub handle_configure . 'cd $(top_builddir) && CONFIG_FILES=' . ($relative_dir eq '.' ? '' : '$(subdir)/') . '$@' . ($need_rewritten - ? (':' . join (':', @rewritten_inputs)) + ? (':' . join (':', @inputs)) : '') . ' CONFIG_HEADERS= $(SHELL) ./config.status' . "\n"); @@ -3237,7 +3240,7 @@ sub handle_configure # Require all input files. &require_file_with_conf_line ($ac_output_line, $FOREIGN, - @inputs); + &rewrite_inputs_into_dependencies (0, @inputs)); } # These files get removed by "make clean". diff --git a/tests/ChangeLog b/tests/ChangeLog index 30c157d9..7da2b404 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +Sun Aug 16 23:17:38 1998 Tom Tromey + + * colon6.test: New file. + +Fri Aug 14 11:09:03 1998 Tom Tromey + + * cond6.test: New file. + Mon Aug 10 21:05:15 1998 Tom Tromey * ansi3.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4d0d3a1c..18457f91 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,7 +32,7 @@ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ java.test sinclude.test javaprim.test javasubst.test aclocalii.test \ lex2.test libobj8.test version3.test instdata.test exdir2.test \ colon5.test library.test syntax.test cond4.test cond5.test recurs.test \ -ansi3.test +ansi3.test cond6.test colon6.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 67b54b8c..50d83be1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -95,7 +95,7 @@ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ java.test sinclude.test javaprim.test javasubst.test aclocalii.test \ lex2.test libobj8.test version3.test instdata.test exdir2.test \ colon5.test library.test syntax.test cond4.test cond5.test recurs.test \ -ansi3.test +ansi3.test cond6.test colon6.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/colon6.test b/tests/colon6.test new file mode 100755 index 00000000..f156d3e4 --- /dev/null +++ b/tests/colon6.test @@ -0,0 +1,20 @@ +#! /bin/sh + +# Yet another multi-":" test, this time from Ken Pizzini. + +. $srcdir/defs || exit 1 + +cat > configure.in << 'END' +PACKAGE=nonesuch +VERSION=nonesuch +AC_ARG_PROGRAM +AC_PROG_INSTALL +AC_OUTPUT(demo/Makefile demo/version.good:demo/version.gin) +END + +mkdir demo + +: > demo/Makefile.am +: > demo/version.gin + +$AUTOMAKE diff --git a/tests/cond6.test b/tests/cond6.test new file mode 100755 index 00000000..7ea2510f --- /dev/null +++ b/tests/cond6.test @@ -0,0 +1,26 @@ +#! /bin/sh + +# Test for an odd conditional bug. Report from Matt Leach. + +. $srcdir/defs || exit 1 + +echo 'AM_CONDITIONAL(FOO, true)' >> configure.in + +cat > Makefile.am << 'END' + +if FOO + +helpdir = $(prefix)/Help +# The continuation line below must start with a Tab to see the bug. +help_DATA = a b c d e \ + f g h + +else + +helpdir = $(prefix)/help +help_DATA = foo + +endif +END + +$AUTOMAKE -- 2.43.5