[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix for PR/357 (when required files are targets)
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: fix for PR/357 (when required files are targets) |
Date: |
Sat, 30 Nov 2002 16:33:40 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu) |
I'm checking this in (HEAD & branch-1-7).
2002-11-30 Alexandre Duret-Lutz <address@hidden>
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.
Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.186.2.8
diff -u -r1.186.2.8 THANKS
--- THANKS 29 Nov 2002 17:53:02 -0000 1.186.2.8
+++ THANKS 30 Nov 2002 15:30:27 -0000
@@ -174,6 +174,7 @@
Robert Bihlmeyer address@hidden
Robert Boehne address@hidden
Robert Collins address@hidden
+Ronald Landheer address@hidden
Rusty Ballinger address@hidden
Ryan T. Sammartino address@hidden
Sam Hocevar address@hidden
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1365.2.15
diff -u -r1.1365.2.15 automake.in
--- automake.in 30 Nov 2002 13:11:57 -0000 1.1365.2.15
+++ automake.in 30 Nov 2002 15:30:53 -0000
@@ -8917,10 +8917,10 @@
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.
@@ -8970,6 +8970,12 @@
# actually found the file, then do nothing.
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: tests/distcommon3.test
===================================================================
RCS file: /cvs/automake/automake/tests/distcommon3.test,v
retrieving revision 1.2
diff -u -r1.2 distcommon3.test
--- tests/distcommon3.test 8 Sep 2002 13:07:55 -0000 1.2
+++ tests/distcommon3.test 30 Nov 2002 15:30:54 -0000
@@ -23,13 +23,24 @@
. ./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 @@
/\\$/ 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: tests/libobj12b.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj12b.test,v
retrieving revision 1.2
diff -u -r1.2 libobj12b.test
--- tests/libobj12b.test 18 Sep 2002 21:05:27 -0000 1.2
+++ tests/libobj12b.test 30 Nov 2002 15:30:55 -0000
@@ -45,6 +45,7 @@
: > foo.c
$ACLOCAL
+: > ltmain.sh
$AUTOMAKE --add-missing
# This however should be diagnosed, since foo.c is in @address@hidden
Index: tests/required2.test
===================================================================
RCS file: /cvs/automake/automake/tests/required2.test,v
retrieving revision 1.2
diff -u -r1.2 required2.test
--- tests/required2.test 8 Sep 2002 13:07:56 -0000 1.2
+++ tests/required2.test 30 Nov 2002 15:30:55 -0000
@@ -52,8 +52,9 @@
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,
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: fix for PR/357 (when required files are targets),
Alexandre Duret-Lutz <=