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
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
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.
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");
}
}
. ./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
/\\$/ 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
: > foo.c
$ACLOCAL
+: > ltmain.sh
$AUTOMAKE --add-missing
# This however should be diagnosed, since foo.c is in @LIBOBJS@.
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,