]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Fixed bug reported by Gord
authorTom Tromey <tromey@redhat.com>
Sat, 16 Mar 1996 01:40:57 +0000 (01:40 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 16 Mar 1996 01:40:57 +0000 (01:40 +0000)
ChangeLog
Makefile.am
Makefile.in
automake.in
lib/am/Makefile.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/installsh.test [new file with mode: 0755]

index 2c78179a3196686fd79b850b9f51a49a13b088e4..c11336286f444e16d9ad98d78f974171bda7184a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+Fri Mar 15 18:30:31 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * 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  <tromey@creche.cygnus.com>
 
+       * Makefile.am (cvs-diff): New target.
+
        * header.am (install-@DIR@HEADERS): Allow empty list of headers.
        (uninstall-@DIR@HEADERS): Ditto.
 
index 2b8270c369bdc5135a34b308516a73b56f003590..a83c8b32a6485c8fb736c79eeb3cbd4f53cdf0c3 100644 (file)
@@ -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
index 9cf268b3b43823c99e60dbfe68aff180da7418aa..43bddba7c95f8c2a43f11f62cb83e7bea22daa3a 100644 (file)
@@ -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
 
index 268962aeca4ec6d120d198967f644c3e236ea80a..82b0fa18f229da546c6bc76de9cc6864e2e73662 100755 (executable)
@@ -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");
                }
            }
        }
index 2b8270c369bdc5135a34b308516a73b56f003590..a83c8b32a6485c8fb736c79eeb3cbd4f53cdf0c3 100644 (file)
@@ -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
index 455a9b0a9893fee79b55d60c4f229f8ca7e9ffaf..1d1b0edc78b4e65b6153d8c4df01ce28cda4bb20 100644 (file)
@@ -1,3 +1,7 @@
+Fri Mar 15 17:55:13 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * installsh.test: New file.
+
 Tue Mar  5 16:22:46 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * badprog.test: Rewrote.
index a2ea463a121a44ae548bd0b7405e5d1596294ba8..4a4be778cfbed13e8131ea9a60d0fa3fab580b67 100644 (file)
@@ -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)
index 1d9e4cf5fddfc77df9c9ebf1d83919fc698e4739..4783e38bc2def2a8c600490e2f760d8ec0bb763b 100644 (file)
@@ -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 (executable)
index 0000000..a9589d1
--- /dev/null
@@ -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