From: Tom Tromey Date: Sat, 16 Mar 1996 01:40:57 +0000 (+0000) Subject: Fixed bug reported by Gord X-Git-Tag: Release-0-32~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9ede8247d7cfe1920720b2ab237abdee88abbc5;p=thirdparty%2Fautomake.git Fixed bug reported by Gord --- diff --git a/ChangeLog b/ChangeLog index 2c78179a3..c11336286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ +Fri Mar 15 18:30:31 1996 Tom Tromey + + * automake.in (require_config_file): Use correct filename when + looking for errors. Also, install file in `.' if not found. Bug + reported by Gord Matzigkeit. Test installsh.test. + Thu Mar 14 09:28:21 1996 Tom Tromey + * Makefile.am (cvs-diff): New target. + * header.am (install-@DIR@HEADERS): Allow empty list of headers. (uninstall-@DIR@HEADERS): Ditto. diff --git a/Makefile.am b/Makefile.am index 2b8270c36..a83c8b32a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,5 +70,12 @@ cvs-dist: maintainer-check echo "NEWS not updated; not releasing" 1>&2; \ exit 1; \ fi - cvs tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` + cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` $(MAKE) dist + +cvs-diff: + thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \ + prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ + prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \ + cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \ + > $(PACKAGE)-$$prevno-$(VERSION).diff diff --git a/Makefile.in b/Makefile.in index 9cf268b3b..43bddba7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -401,8 +401,15 @@ cvs-dist: maintainer-check echo "NEWS not updated; not releasing" 1>&2; \ exit 1; \ fi - cvs tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` + cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` $(MAKE) dist + +cvs-diff: + thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \ + prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ + prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \ + cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \ + > $(PACKAGE)-$$prevno-$(VERSION).diff .SUFFIXES: .SUFFIXES: .texi .info .dvi diff --git a/automake.in b/automake.in index 268962aec..82b0fa18f 100755 --- a/automake.in +++ b/automake.in @@ -2674,6 +2674,7 @@ sub require_config_file local ($mystrict, @files) = @_; local ($file, $dir); local ($found_it); + local ($errfile); foreach $file (@files) { @@ -2682,6 +2683,12 @@ sub require_config_file { $fullfile = $dir . "/" . $file; + # Use different name for "error filename". Otherwise on + # an error the bad file will be reported as eg + # `../../install-sh' when using the default + # config_aux_path. + $errfile = $fullfile unless $errfile; + if (-f $fullfile) { $found_it = 1; @@ -2701,23 +2708,23 @@ sub require_config_file # if we must. if ($symlink_exists) { - symlink ($am_dir . '/' . $file, $fullfile); + symlink ($am_dir . '/' . $file, $errfile); } else { - system ('cp', $am_dir . '/' . $file, $fullfile); + system ('cp', $am_dir . '/' . $file, $errfile); } # FIXME this is a hack. Should have am_warn. local ($save) = $exit_status; &am_error - ("required file \"$fullfile\" not found; installing"); + ("required file \"$errfile\" not found; installing"); $exit_status = $save; } else { # Only an error if strictness constraint violated. - &am_error ("required file \"$fullfile\" not found"); + &am_error ("required file \"$errfile\" not found"); } } } diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 2b8270c36..a83c8b32a 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -70,5 +70,12 @@ cvs-dist: maintainer-check echo "NEWS not updated; not releasing" 1>&2; \ exit 1; \ fi - cvs tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` + cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'` $(MAKE) dist + +cvs-diff: + thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \ + prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \ + prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \ + cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \ + > $(PACKAGE)-$$prevno-$(VERSION).diff diff --git a/tests/ChangeLog b/tests/ChangeLog index 455a9b0a9..1d1b0edc7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 15 17:55:13 1996 Tom Tromey + + * installsh.test: New file. + Tue Mar 5 16:22:46 1996 Tom Tromey * badprog.test: Rewrote. diff --git a/tests/Makefile.am b/tests/Makefile.am index a2ea463a1..4a4be778c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test +canon.test installsh.test ## Maybe automake should distribute TESTS? You tell me. EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 1d9e4cf5f..4783e38bc 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -43,7 +43,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test +canon.test installsh.test EXTRA_DIST = defs $(TESTS) DIST_COMMON = ChangeLog Makefile.am Makefile.in diff --git a/tests/installsh.test b/tests/installsh.test new file mode 100755 index 000000000..a9589d12d --- /dev/null +++ b/tests/installsh.test @@ -0,0 +1,38 @@ +#! /bin/sh + +# Test for this bug: +# automake: Makefile.am: required file "../../install-sh" not found; installing +# This also makes sure that install-sh is created in the correct directory. + +. $srcdir/defs || exit 1 + +: > Makefile.am +rm install-sh + +# Since the default path includes '../..', we must run this test in +# yet another subdir. +mkdir frob +mv Makefile.am configure.in mkinstalldirs frob/ +cd frob + +# If srcdir is relative, we need to modify it. +case "$srcdir" in + /*) + ;; + + *) + srcdir="../$srcdir" + ;; +esac + +AUTOMAKE="../../../automake --amdir=$srcdir/.. --foreign" + +# Now we proceed with the test +$AUTOMAKE --add-missing > output 2>&1 \ + || exit 1 + +# Only one `/' should appear in the output. +grep '/.*/' output \ + && exit 1 + +test -f install-sh