[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DIST_SUBDIRS is not honoured unless SUBDIRS is also set
From: |
Alexandre Duret-Lutz |
Subject: |
Re: DIST_SUBDIRS is not honoured unless SUBDIRS is also set |
Date: |
Tue, 18 Nov 2003 00:18:00 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
>>> "Gary" == Gary V Vaughan <address@hidden> writes:
Gary> When running automake-1.7b generated Makefiles dist rules
Gary> in CVS libtool, none of the test subdirectories are
Gary> distributed unless I also set SUBDIRS in the same
Gary> Makefile.am.
Hi Gary,
Thanks for the report.
I'm checking this in.
2003-11-17 Alexandre Duret-Lutz <address@hidden>
* 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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1515
diff -u -r1.1515 automake.in
--- automake.in 17 Nov 2003 00:33:42 -0000 1.1515
+++ automake.in 17 Nov 2003 22:47:27 -0000
@@ -6761,6 +6761,11 @@
# 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: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.528
diff -u -r1.528 Makefile.am
--- tests/Makefile.am 17 Nov 2003 00:33:42 -0000 1.528
+++ tests/Makefile.am 17 Nov 2003 22:47:29 -0000
@@ -439,6 +439,7 @@
subobj9.test \
subobjname.test \
subpkg.test \
+subpkg2.test \
subst.test \
substref.test \
substtarg.test \
Index: tests/subpkg2.test
===================================================================
RCS file: tests/subpkg2.test
diff -N tests/subpkg2.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/subpkg2.test 17 Nov 2003 22:47:29 -0000
@@ -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
--
Alexandre Duret-Lutz