]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
For PR automake/357:
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 30 Nov 2002 15:34:49 +0000 (15:34 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 30 Nov 2002 15:34:49 +0000 (15:34 +0000)
* automake.in (require_file_internal): Don't complain a file is "not
found" when it is a target.  Make sure "not found" files are otherwise
reported as error (they were reported as 'note').
* tests/distcommon3.test: Augment to test the above.
* tests/libobj12b.test: Touch ltmain.sh.
* tests/required2.test: Make sure Automake fails because ltmain.sh
has been removed.
Reported by Ronald Landheer.

ChangeLog
THANKS
automake.in
tests/distcommon3.test
tests/libobj12b.test
tests/required2.test

index f4d03c57278c10bbf8cb2fc2c3d7a208a3e2e61b..7e724eff3b2f0e035733520081768b4da1676cf8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2002-11-30  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       For PR automake/357:
+       * automake.in (require_file_internal): Don't complain a file is "not
+       found" when it is a target.  Make sure "not found" files are otherwise
+       reported as error (they were reported as 'note').
+       * tests/distcommon3.test: Augment to test the above.
+       * tests/libobj12b.test: Touch ltmain.sh.
+       * tests/required2.test: Make sure Automake fails because ltmain.sh
+       has been removed.
+       Reported by Ronald Landheer.
+
        * tests/texinfo3.test: Make sure we don't output single suffix
        inference rules when building `.info'-less Info files (this
        confuses Solaris make).  Run distcheck to make sure the rules
diff --git a/THANKS b/THANKS
index 84c8016b3caa38fb74f5d2b9e8cca5d31de60541..83edfd9165a8a21835bddb4378dca1064a8b49bc 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -174,6 +174,7 @@ Rob Savoye          rob@cygnus.com
 Robert Bihlmeyer       robbe@orcus.priv.at
 Robert Boehne          rboehne@ricardo-us.com
 Robert Collins         robert.collins@itdomain.com.au
+Ronald Landheer                ronald@landheer.com
 Rusty Ballinger                rusty@rlyeh.engr.sgi.com
 Ryan T. Sammartino     ryants@shaw.ca
 Sam Hocevar            sam@zoy.org
index 0423214769c63a6c7d6735c922482ac8698953be..6bc5038d9c6817dc4bd062772e629017d572aa73 100755 (executable)
@@ -8786,10 +8786,10 @@ sub require_file_internal ($$@)
                my $message = "required file `$errfile' not found";
                if ($add_missing)
                {
-                   $suppress = 1;
-
                    if (-f ("$libdir/$file"))
                    {
+                       $suppress = 1;
+
                        # Install the missing file.  Symlink if we
                        # can, copy if we must.  Note: delete the file
                        # first, in case it is a dangling symlink.
@@ -8840,6 +8840,12 @@ sub require_file_internal ($$@)
                next
                    if $found_it && $force_missing;
 
+               # If we couldn' install the file, but it is a target in
+               # the Makefile, don't print anything.  This allows files
+               # like README, AUTHORS, or THANKS to be generated.
+               next
+                 if !$suppress && target_defined ($file);
+
                msg ($suppress ? 'note' : 'error', $where, "$message$trailer");
            }
        }
index 2c656252acd73a0f2a25a8ed98854bb0da789c7b..e92ccfa3618e049c80b5f04e10cad55806366f24 100755 (executable)
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 README:
        echo 'I bet you are reading me.' > README
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+# Files required by --gnu
+: > NEWS
+: > AUTHORS
+: > ChangeLog
+
+$ACLOCAL
+
+# Should not warn about missing README, since it is a target.
+$AUTOMAKE --add-missing --gnu >stdout 2>&1
+cat stdout
+grep README stdour && exit 1
 
 sed -n -e '/^DIST_COMMON =.*\\$/ {
    :loop
@@ -38,4 +49,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    /\\$/ b loop
    p
    n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README || exit 1
+   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README
+
+
+# Should warn about missing README.
+: > Makefile.am
+$AUTOMAKE --add-missing --gnu 2>stderr && exit 1
+cat stderr
+grep README stderr
index ecfb0822a74553b465362cd87da92836209ea14e..528fec9f1031837bafd0ec895e57ee2bfab62908 100755 (executable)
@@ -45,6 +45,7 @@ END
 : > foo.c
 
 $ACLOCAL
+: > ltmain.sh
 $AUTOMAKE --add-missing
 
 # This however should be diagnosed, since foo.c is in @LIBOBJS@.
index b6e1286a86bbfca3a5e528d76dbddefed8b40196..ab17a168eda1538cfc008d6b940e7b58eaa41e27 100755 (executable)
@@ -52,8 +52,9 @@ $AUTOCONF
 
 test -f autoconf/ltmain.sh # Sanity check.
 rm -f autoconf/ltmain.sh
-$AUTOMAKE --add-missing --copy 2>stderr
+$AUTOMAKE --add-missing --copy 2>stderr && exit 1
 cat stderr
+grep 'autoconf/ltmain.sh' stderr
 grep 'running more than two' stderr && exit 1
 
 # Since we are ensuring that 'running more than two' is not printed,