From 7025355ea02327635b0c5955c28d5cbe0715c9f8 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 29 Mar 1997 07:17:06 +0000 Subject: [PATCH] do not allow stamp-h in AC_OUTPUT --- ChangeLog | 5 +++++ automake.in | 11 +++++++++++ tests/ChangeLog | 4 ++++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/stamph.test | 18 ++++++++++++++++++ 6 files changed, 40 insertions(+), 2 deletions(-) create mode 100755 tests/stamph.test diff --git a/ChangeLog b/ChangeLog index b4c246061..97a4e0d42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 28 23:34:49 1997 Tom Tromey + + * automake.in (handle_configure): Error if stamp-h appears in + AC_OUTPUT line. + Thu Mar 27 17:28:47 1997 Tom Tromey * automake.in (handle_dist_worker): Avoid automake rules in diff --git a/automake.in b/automake.in index 1f786e1eb..469c7a045 100755 --- a/automake.in +++ b/automake.in @@ -2853,6 +2853,17 @@ sub handle_configure # Skip any Makefile. next if $local eq 'Makefile'; + # Some users might be tempted to put `stamp-h' in the + # AC_OUTPUT line. This won't do the right thing, so we + # explicitly fail here. + if ($local eq 'stamp-h') + { + # FIXME: allow real filename. + &am_conf_error ('configure.in', $ac_output_line, + 'stamp-h should not appear in AC_OUTPUT'); + next; + } + $output_rules .= ($local . ': ' . '$(top_builddir)/config.status ' . join (' ', @rewritten_inputs) . "\n" diff --git a/tests/ChangeLog b/tests/ChangeLog index 77e7e3eaf..9b2365988 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 28 23:36:04 1997 Tom Tromey + + * stamph.test: New file. + Thu Mar 27 18:10:47 1997 Tom Tromey * lisp.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 5cc290444..7fff1693e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,7 @@ 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 subst.test \ defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \ -cxxlibobj.test seenc.test cygwin32.test lisp.test +cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 53128fe0f..8d3f401d5 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -78,7 +78,7 @@ 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 subst.test \ defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \ -cxxlibobj.test seenc.test cygwin32.test lisp.test +cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/stamph.test b/tests/stamph.test new file mode 100755 index 000000000..2152393ba --- /dev/null +++ b/tests/stamph.test @@ -0,0 +1,18 @@ +#! /bin/sh + +# Error if stamp-h appears in AC_OUTPUT line. + +. $srcdir/defs || exit 1 + +cat > configure.in << 'END' +PACKAGE=nonesuch +VERSION=nonesuch +AC_ARG_PROGRAM +AM_PROG_INSTALL +AC_OUTPUT(Makefile stamp-h) +END + +: > Makefile.am + +$AUTOMAKE && exit 1 +exit 0 -- 2.47.3