diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-11-17 23:18:20 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-11-17 23:18:20 +0000 |
commit | 9b5e57d52c8465ea7df1af852cedeaeb0f43f748 (patch) | |
tree | 9655cc77975ec1daf7114daf3f92e9f37fc8d026 | |
parent | 8e1c45e267ce6c7a462009a9ab96aad341a52d69 (diff) | |
download | automake-9b5e57d52c8465ea7df1af852cedeaeb0f43f748.tar.gz |
* 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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makefile.in | 1 | ||||
-rwxr-xr-x | automake.in | 5 | ||||
-rw-r--r-- | doc/Makefile.in | 1 | ||||
-rw-r--r-- | lib/Automake/Makefile.in | 1 | ||||
-rw-r--r-- | lib/Automake/tests/Makefile.in | 1 | ||||
-rw-r--r-- | lib/Makefile.in | 1 | ||||
-rw-r--r-- | lib/am/Makefile.in | 1 | ||||
-rw-r--r-- | m4/Makefile.in | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/Makefile.in | 2 | ||||
-rwxr-xr-x | tests/subpkg2.test | 72 |
12 files changed, 93 insertions, 0 deletions
@@ -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. diff --git a/Makefile.in b/Makefile.in index 7a130b818..d8a5e80a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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*) \ diff --git a/automake.in b/automake.in index 034090edc..12a8b658b 100755 --- a/automake.in +++ b/automake.in @@ -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; diff --git a/doc/Makefile.in b/doc/Makefile.in index eba41325b..1b1827b3f 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -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*) \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 28e538669..464f99ccc 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -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*) \ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index b2594ca83..4c5db957e 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -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*) \ diff --git a/lib/Makefile.in b/lib/Makefile.in index d4ba8aead..1c628d895 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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*) \ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index b7a9bdc5e..df118fb28 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -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*) \ diff --git a/m4/Makefile.in b/m4/Makefile.in index 62218f038..f60b62584 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -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*) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 4f39f7bdb..8bc3b20c4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -439,6 +439,7 @@ subobj8.test \ subobj9.test \ subobjname.test \ subpkg.test \ +subpkg2.test \ subst.test \ substref.test \ substtarg.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a8d0c289e..8747c89d4 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 000000000..1c58aae92 --- /dev/null +++ b/tests/subpkg2.test @@ -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 |