bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Required files are only added once, even if two are needed.


From: Alexandre Duret-Lutz
Subject: Re: Required files are only added once, even if two are needed.
Date: Wed, 17 Apr 2002 15:07:46 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

>>> "Marius" == Marius Vollmer <address@hidden> writes:

 Marius> Hi,
 Marius> I believe the following is a bug in automake 1.6.1.
[...]
 Marius> What do you say?

Thanks :)

Index: ChangeLog
--- ChangeLog
+++ ChangeLog
@@ -1,1 +1,10 @@
+2002-04-17  Alexandre Duret-Lutz  <address@hidden>
+
+       * automake.in (initialize_per_input): Clear %require_file_found.
+       (%require_file_found): Group the declaration with the other
+       variables initialized by initialize_per_input.
+       * tests/required.test: New file.
+       * tests/Makefile.am (TESTS): Add it.
+       Reported by Marius Vollmer.
+

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1287.2.1
diff -u -r1.1287.2.1 automake.in
--- automake.in 13 Apr 2002 19:51:25 -0000      1.1287.2.1
+++ automake.in 17 Apr 2002 12:55:27 -0000
@@ -659,6 +659,12 @@
 # variables.
 my %substnums = ();
 
+# If a file name appears as a key in this hash, then it has already
+# been checked for.  This variable is local to the "require file"
+# functions.
+my %require_file_found = ();
+
+
 ## --------------------------------- ##
 ## Forward subroutine declarations.  ##
 ## --------------------------------- ##
@@ -793,6 +799,8 @@
 
     # We always include `.'.  This isn't strictly correct.
     %libtool_clean_directories = ('.' => 1);
+
+    %require_file_found = ();
 }
 
 
@@ -1044,9 +1052,6 @@
 
 exit $exit_status;
 
-# FIXME: This should be `my'ed next to its subs.
-use vars '%require_file_found';
-
 ################################################################
 
 # prog_error (@PRINT-ME)
@@ -8006,11 +8011,6 @@
 
 # This variable is local to the "require file" set of functions.
 my @require_file_paths = ();
-
-# If a file name appears as a key in this hash, then it has already
-# been checked for.  This variable is local to the "require file"
-# functions.
-%require_file_found = ();
 
 
 # &maybe_push_required_file ($DIR, $FILE, $FULLFILE)
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.385.2.2
diff -u -r1.385.2.2 Makefile.am
--- tests/Makefile.am   13 Apr 2002 21:52:18 -0000      1.385.2.2
+++ tests/Makefile.am   17 Apr 2002 12:55:27 -0000
@@ -283,6 +283,7 @@
 remake2.test \
 remake3.test \
 req.test \
+required.test \
 rulepat.test \
 scripts.test \
 seenc.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.499.2.5
diff -u -r1.499.2.5 Makefile.in
--- tests/Makefile.in   13 Apr 2002 21:52:18 -0000      1.499.2.5
+++ tests/Makefile.in   17 Apr 2002 12:55:27 -0000
@@ -359,6 +359,7 @@
 remake2.test \
 remake3.test \
 req.test \
+required.test \
 rulepat.test \
 scripts.test \
 seenc.test \
Index: tests/required.test
===================================================================
RCS file: tests/required.test
diff -N tests/required.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/required.test 17 Apr 2002 12:55:27 -0000
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# Make sure Automake will install several copies of required files if needed.
+# Reported by Marius Vollmer.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in <<EOF
+AC_CONFIG_FILES([one/Makefile two/Makefile])
+AC_OUTPUT
+EOF
+
+mkdir one
+mkdir two
+
+echo 'SUBDIRS = one two' > Makefile.am
+echo 'info_TEXINFOS = mumble.texi' > one/Makefile.am
+cat >one/mumble.texi <<'END'
address@hidden mumble.info
address@hidden version.texi
+END
+
+cp one/Makefile.am one/mumble.texi two
+
+$ACLOCAL
+$AUTOMAKE --add-missing --copy
+
+test -f one/mdate-sh
+test -f one/texinfo.tex
+test -f two/mdate-sh
+test -f two/texinfo.tex

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]