[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS Automake vs. CVS Autoconf
From: |
Alexandre Duret-Lutz |
Subject: |
Re: CVS Automake vs. CVS Autoconf |
Date: |
Fri, 20 Jun 2003 22:38:40 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
>>> "Akim" == Akim Demaille <address@hidden> writes:
Akim> For some reason, CVS Automake seems to be seriously stammering. This
Akim> is on CVS Autoconf' Makefiles:
Thanks for catching this. I'm installing the following fix.
(Only the variable_delete is needed to fix what you report,
but the test cases showed another issue: tests/wrapper.in not
being distributed when tests/ does not have a Makefile.am.)
I'm waiting for your "CVS Automake vs. CVS a2ps" now :)
2003-06-20 Alexandre Duret-Lutz <address@hidden>
* automake.in (handle_dist): Delete DIST_COMMON before redefining
it. Bug report from Akim Demaille.
(rewrite_inputs_into_dependencies): Make sure we always return
something, even when $add_srcdir is 0.
* tests/distcom4.test, tests/distcom5.test: New files.
* tests/Makefile.am (TESTS): Add distcom4.test and distcom5.test.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1467
diff -u -r1.1467 automake.in
--- automake.in 15 Jun 2003 17:35:50 -0000 1.1467
+++ automake.in 20 Jun 2003 20:31:49 -0000
@@ -3833,7 +3833,7 @@
my $archive_defined = $options{'no-dist-gzip'} ? 0 : 1;
$archive_defined ||=
grep { $options{"dist-$_"} } ('shar', 'zip', 'tarZ', 'bzip2');
- error ($options{'no-dist-gzip'},
+ error ($options{'no-dist-gzip'},
"no-dist-gzip specified but no dist-* specified, "
. "at least one archive format must be enabled")
unless $archive_defined;
@@ -3888,6 +3888,7 @@
# as it recursively expands `$(dist_pkgdata_DATA)' etc.
my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
@dist_common = uniq (sort for_dist_common (@dist_common));
+ variable_delete 'DIST_COMMON';
define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
# Now that we've processed DIST_COMMON, disallow further attempts
@@ -4097,22 +4098,21 @@
# If 0 then files that require this addition will simply be ignored.
sub rewrite_inputs_into_dependencies ($@)
{
- my ($add_srcdir, @inputs) = @_;
- my @newinputs;
+ my ($add_srcdir, @inputs) = @_;
+ my @newinputs;
- foreach my $single (@inputs)
+ foreach my $single (@inputs)
{
- if (dirname ($single) eq $relative_dir)
+ if (dirname ($single) eq $relative_dir)
{
- push (@newinputs, basename ($single));
+ push (@newinputs, basename ($single));
}
- elsif ($add_srcdir)
+ else
{
- push (@newinputs, '$(top_srcdir)/' . $single);
+ push (@newinputs, ($add_srcdir ? '$(top_srcdir)/' : '') . $single);
}
}
-
- return @newinputs;
+ return @newinputs;
}
# Handle remaking and configure stuff.
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.498
diff -u -r1.498 Makefile.am
--- tests/Makefile.am 15 Jun 2003 17:43:20 -0000 1.498
+++ tests/Makefile.am 20 Jun 2003 20:31:50 -0000
@@ -163,6 +163,8 @@
distcom.test \
distcom2.test \
distcom3.test \
+distcom4.test \
+distcom5.test \
distdir.test \
distname.test \
dollar.test \
Index: tests/distcom4.test
===================================================================
RCS file: tests/distcom4.test
diff -N tests/distcom4.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/distcom4.test 20 Jun 2003 20:31:50 -0000
@@ -0,0 +1,73 @@
+#! /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.
+
+# Test to make sure config files are distributed, and only once.
+# This tries to distribute a file from a subdirectory, without
+# Makefile in that directory. distcom5.test performs the same
+# test with a Makefile in the directory.
+# Also make sure that README appears first in DIST_COMMON.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+ AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
+ [chmod +x tests/autoconf])
+ AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
+ [chmod +x tests/autoheader])
+ AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
+ [chmod +x tests/autom4te])
+ AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
+ [chmod +x tests/autoreconf])
+ AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
+ [chmod +x tests/autoscan])
+ AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
+ [chmod +x tests/autoupdate])
+ AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
+ [chmod +x tests/ifnames])
+ AC_OUTPUT
+END
+
+mkdir tests
+: > README
+: > tests/wrapper.in
+cat > Makefile.am << 'END'
+test: distdir
+ test -f $(distdir)/tests/wrapper.in
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+$MAKE test
+
+sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
+
+test 1 = `grep tests dc.txt | wc -l`
+grep 'DIST_COMMON = README' Makefile.in
Index: tests/distcom5.test
===================================================================
RCS file: tests/distcom5.test
diff -N tests/distcom5.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/distcom5.test 20 Jun 2003 20:31:50 -0000
@@ -0,0 +1,83 @@
+#! /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.
+
+# Test to make sure config files are distributed, and only once.
+# This tries to distribute a file from a subdirectory, with
+# a Makefile in that directory. distcom4.test performs the same
+# test without Makefile in the directory.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+ AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
+ [chmod +x tests/autoconf])
+ AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in],
+ [chmod +x tests/autoheader])
+ AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in],
+ [chmod +x tests/autom4te])
+ AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in],
+ [chmod +x tests/autoreconf])
+ AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in],
+ [chmod +x tests/autoscan])
+ AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in],
+ [chmod +x tests/autoupdate])
+ AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in],
+ [chmod +x tests/ifnames])
+ AC_CONFIG_FILES([tests/Makefile])
+ AC_OUTPUT
+END
+
+mkdir tests
+: > tests/wrapper.in
+: > tests/Makefile.am
+cat > Makefile.am << 'END'
+SUBDIRS = tests
+test: distdir
+ test -f $(distdir)/tests/wrapper.in
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+$MAKE test
+
+sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' Makefile.in > top.txt
+
+sed -n -e '/^DIST_COMMON =.*\\$/ {
+ :loop
+ p
+ n
+ /\\$/ b loop
+ p
+ n
+ }' -e '/^DIST_COMMON =/ p' tests/Makefile.in > inner.txt
+
+test 0 = `grep tests top.txt | wc -l`
+test 1 = `grep wrapper inner.txt | wc -l`
--
Alexandre Duret-Lutz
- Re: CVS Automake vs. CVS Autoconf,
Alexandre Duret-Lutz <=