]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (generate_makefile): Define SUBDIRS if it is
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 17 Nov 2003 23:18:20 +0000 (23:18 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 17 Nov 2003 23:18:20 +0000 (23:18 +0000)
not defined and DIST_SUBDIRS is.
* tests/subpkg2.test: New file.
* tests/Makefile.am (TESTS): Add subpkg2.test.
Report from Gary V. Vaughan.

12 files changed:
ChangeLog
Makefile.in
automake.in
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/subpkg2.test [new file with mode: 0755]

index c2aa23284bd733e1199df3b69d1e8d591292cc64..20f0fb35695b042e0cc01b7775de70ff508ead29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2003-11-17  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * automake.in (generate_makefile): Define SUBDIRS if it is
+       not defined and DIST_SUBDIRS is.
+       * tests/subpkg2.test: New file.
+       * tests/Makefile.am (TESTS): Add subpkg2.test.
+       Report from Gary V. Vaughan.
+
        * tests/suffix11.test: Check for suffixes containing `-'.
        * lib/Automake/Rule.pm ($_SUFFIX_RULE_PATTERN): Accept `-' in
        suffixes.
index 7a130b818f6618e8bddd5f09a80a2cc187bb05eb..d8a5e80a0f3fbf0fbac56e08350c4908beb23cf1 100644 (file)
@@ -184,6 +184,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index 034090edc8dd4ab281ddddd0b711e4f6adf6ffdf..12a8b658ba553db559466d33c5ad29d9b3eadd61 100755 (executable)
@@ -6761,6 +6761,11 @@ sub generate_makefile ($$)
   # Must do this after reading .am file.
   define_variable ('subdir', $relative_dir, INTERNAL);
 
+  # If DIST_SUBDIRS is defined, make sure SUBDIRS is, so that
+  # recursive rules are enabled.
+  define_pretty_variable ('SUBDIRS', TRUE, INTERNAL, '')
+    if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
+
   # Check first, because we might modify some state.
   check_cygnus;
   check_gnu_standards;
index eba41325bc4e1c713ade4ec498132502f266ae8c..1b1827b3fad40cf2e0ec453d01ecf26192ed69f5 100644 (file)
@@ -155,6 +155,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  doc/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index 28e5386690ae40417d666cc755088ac0a17a81e0..464f99ccc01fb5b621fad2c12b08150840274745 100644 (file)
@@ -178,6 +178,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Automake/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Automake/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index b2594ca8309486fc799d62f9db36ddf2615b02c5..4c5db957e47b5c74931c6ba178f4b0385bb4f1e8 100644 (file)
@@ -137,6 +137,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Automake/tests/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Automake/tests/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index d4ba8aead2ebfe42c359fc8872511cac8fc5d0ed..1c628d89533ff05d107f8a580d53fa43eb55df83 100644 (file)
@@ -156,6 +156,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index b7a9bdc5ee4f484e5f75b0064147c6243413fa93..df118fb2885624b0e12398e73823ac7c8bb52747 100644 (file)
@@ -142,6 +142,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/am/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  lib/am/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index 62218f038d52aa7de6cf464364091105f587a3a8..f60b625844b632902164f37cfd03fa4396d8c592 100644 (file)
@@ -168,6 +168,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  m4/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  m4/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
index 4f39f7bdbfe9bc95eb94f60fbe19ad51696647dc..8bc3b20c4ccc33d9230009c279d6a88303bf0d03 100644 (file)
@@ -439,6 +439,7 @@ subobj8.test \
 subobj9.test \
 subobjname.test \
 subpkg.test \
+subpkg2.test \
 subst.test \
 substref.test \
 substtarg.test \
index a8d0c289e296e2325db9a8b1e65e9db232e02e37..8747c89d4744f8d06100a4e328c5d8ef93eb8db5 100644 (file)
@@ -553,6 +553,7 @@ subobj8.test \
 subobj9.test \
 subobjname.test \
 subpkg.test \
+subpkg2.test \
 subst.test \
 substref.test \
 substtarg.test \
@@ -645,6 +646,7 @@ $(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  tests/Makefile
+.PRECIOUS: Makefile
 Makefile:  $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
diff --git a/tests/subpkg2.test b/tests/subpkg2.test
new file mode 100755 (executable)
index 0000000..1c58aae
--- /dev/null
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Try a DIST_SUBDIRS subpackage with no SUBDIRS.
+# Report from Gary V. Vaughan.
+
+. ./defs || exit 1
+
+set -e
+
+mkdir m4
+
+cat >m4/foo.m4 <<'EOF'
+AC_DEFUN([FOO],[
+  AC_OUTPUT
+])
+EOF
+
+cat >>configure.in <<'END'
+AC_CONFIG_SUBDIRS([sub])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'EOF'
+DIST_SUBDIRS = sub
+dist-hook:
+       test -f $(distdir)/sub/script.in
+EOF
+
+mkdir sub
+
+cat >sub/configure.ac <<'EOF'
+AC_INIT([sub], [2.3])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([script])
+FOO
+EOF
+
+: >sub/script.in
+echo ACLOCAL_AMFLAGS = -I ../m4 > sub/Makefile.am
+
+$ACLOCAL -I m4
+$AUTOCONF
+$AUTOMAKE
+
+cd sub
+$ACLOCAL -I ../m4
+$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
+$AUTOCONF
+$AUTOMAKE -Wno-override
+cd ..
+
+./configure
+$MAKE distcheck