[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure dependencies, and version.texi dependencies (PR/358).
From: |
Alexandre Duret-Lutz |
Subject: |
Re: configure dependencies, and version.texi dependencies (PR/358). |
Date: |
10 Oct 2002 19:35:08 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>> "Akim" == Akim Demaille <address@hidden> writes:
Akim> Filtering on the *location* on the m4_include should
Akim> suffice.
Ok, so here we go. I'm installing the following patch on
HEAD, and only the lib/am/texi-vers.am and tests/vtexi.test
changes on branch-1-7.
2002-10-10 Alexandre Duret-Lutz <address@hidden>
For PR automake/358:
* lib/am/texi-vers.am (%STAMPVTI%): Depend on configure instead of
configure.ac.
Suggested by Thien-Thi Nguyen.
* lib/am/configure.am ($(srcdir)/configure): Depends on
%CONFIGURE_DEPS%
* automake.in (@configure_deps): New array.
(scan_autoconf_traces): Scan for m4_include and m4_sinclude,
and fill @configure_deps.
(handle_configure): Substitute %CONFIGURE_DEPS%.
Distribute @configure_deps.
* tests/version7.texi: New file.
* tests/vtexi.test: Adjust.
* tests/Makefile.am (TESTS): Add version7.test.
* automake.texi (Dist): Mention is m4_include'd files
are distributed.
Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.190
diff -u -r1.190 THANKS
--- THANKS 8 Oct 2002 21:40:30 -0000 1.190
+++ THANKS 10 Oct 2002 17:28:48 -0000
@@ -177,13 +177,13 @@
Sam Hocevar address@hidden
Sergey Vlasov address@hidden
Seth Alves address@hidden
-Shuhei Amakawa <address@hidden>
+Shuhei Amakawa address@hidden
Shigio Yamaguchi address@hidden
Steve M. Robbins address@hidden
Sven Verdoolaege address@hidden
Tatu Ylonen address@hidden
The Crimson Binome address@hidden
-thi address@hidden
+Thien-Thi Nguyen address@hidden
Thomas Gagne address@hidden
Thomas Morgan address@hidden
Thomas Tanner address@hidden
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1377
diff -u -r1.1377 automake.in
--- automake.in 8 Oct 2002 22:23:49 -0000 1.1377
+++ automake.in 10 Oct 2002 17:29:13 -0000
@@ -413,6 +413,9 @@
# TRUE if --cygnus seen.
my $cygnus_mode = 0;
+# Files included by @configure.
+my @configure_deps = ();
+
# Hash table of AM_CONDITIONAL variables seen in configure.
my %configure_cond = ();
@@ -4425,6 +4428,9 @@
my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4 ();
+ push_dist_common (@configure_deps)
+ if $relative_dir eq '.';
+
$output_rules .=
&file_contents ('configure',
new Automake::Location,
@@ -4441,7 +4447,8 @@
=> $cmdline_use_dependencies ? '' : ' --ignore-deps',
'MAKEFILE-AM-SOURCES' => "$input$colon_infile",
'REGEN-ACLOCAL-M4' => $regen_aclocal_m4,
- ACLOCAL_M4_DEPS => "@aclocal_m4_deps");
+ ACLOCAL_M4_DEPS => "@aclocal_m4_deps",
+ CONFIGURE_DEPS => "@configure_deps");
if ($relative_dir eq '.')
{
@@ -5171,7 +5178,9 @@
AM_GNU_GETTEXT
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
- AM_PROG_CC_C_O);
+ AM_PROG_CC_C_O
+ m4_include
+ m4_sinclude);
my $traces = ($ENV{AUTOCONF} || 'autoconf') . " ";
@@ -5280,6 +5289,16 @@
elsif ($macro eq 'AM_PROG_CC_C_O')
{
$seen_cc_c_o = $where;
+ }
+ elsif ($macro eq 'm4_include' || $macro eq 'm4_sinclude')
+ {
+ # Some modified versions of Autoconf don't use
+ # forzen files. Consequently it's possible that we see all
+ # m4_include's performed during Autoconf's startup.
+ # Obviously we don't want to distribute Autoconf's files
+ # so we skip absolute filenames here.
+ push @configure_deps, $args[1]
+ unless $here =~ m,^(?:\w:)?[\\/],;
}
}
}
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.305
diff -u -r1.305 automake.texi
--- automake.texi 25 Sep 2002 19:00:47 -0000 1.305
+++ automake.texi 10 Oct 2002 17:29:31 -0000
@@ -4098,7 +4098,9 @@
@samp{automake --help}. Also, files which are read by @code{configure}
(i.e. the source files corresponding to the files specified in various
Autoconf macros such as @code{AC_CONFIG_FILES} and siblings) are
-automatically distributed.
+automatically distributed. Files included in @file{Makefile.am}s (using
address@hidden) or in @file{configure.in} (using @code{m4_include}) are
+also distributed.
Still, sometimes there are files which must be distributed, but which
are not covered in the automatic rules. These files should be listed in
Index: lib/am/configure.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/configure.am,v
retrieving revision 1.14
diff -u -r1.14 configure.am
--- lib/am/configure.am 23 Jul 2002 19:10:50 -0000 1.14
+++ lib/am/configure.am 10 Oct 2002 17:29:31 -0000
@@ -54,7 +54,7 @@
DIST_COMMON += configure %CONFIGURE-AC%
## Explicitly look in srcdir for benefit of non-GNU makes.
-$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES)
+$(srcdir)/configure: %MAINTAINER-MODE% $(srcdir)/%CONFIGURE-AC% $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES) %CONFIGURE_DEPS%
cd $(srcdir) && $(AUTOCONF)
endif %?TOPDIR_P%
Index: lib/am/texi-vers.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texi-vers.am,v
retrieving revision 1.22
diff -u -r1.22 texi-vers.am
--- lib/am/texi-vers.am 25 Aug 2002 20:45:51 -0000 1.22
+++ lib/am/texi-vers.am 10 Oct 2002 17:29:31 -0000
@@ -26,9 +26,10 @@
## discard any %VTEXI% file found in a VPATH seatch.
%VTEXI%: %MAINTAINER-MODE% %STAMPVTI%
-## Depend on %CONFIGURE-AC% so that version number updates cause a
-## rebuild.
-%STAMPVTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC%
+## Depend on configure so that version number updates cause a rebuild.
+## (Not configure.ac, because not all setups define the version number
+## in this file.)
+%STAMPVTI%: %TEXI% $(top_srcdir)/configure
## It is wrong to have %STAMPTVTI% dependent on %DIRSTAMP%, because
## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
## should never be dependent upon a non-distributed built file.
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.447
diff -u -r1.447 Makefile.am
--- tests/Makefile.am 9 Oct 2002 21:24:50 -0000 1.447
+++ tests/Makefile.am 10 Oct 2002 17:29:33 -0000
@@ -416,6 +416,7 @@
version4.test \
version5.test \
version6.test \
+version7.test \
vpath.test \
vtexi.test \
vtexi2.test \
Index: tests/version7.test
===================================================================
RCS file: tests/version7.test
diff -N tests/version7.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/version7.test 10 Oct 2002 17:29:34 -0000
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2002 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 autoconf; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Test for a special setup where the package's version isn't defined
+# in configure.in.
+
+required='makeinfo tex'
+. ./defs || exit 1
+
+set -e
+
+cat >configure.in <<'END'
+m4_include([version.m4])
+AC_INIT([version7], [THE_VERSION])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+echo 'm4_define([THE_VERSION], [2.718])' > version.m4
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = zardoz.texi
+
+check:
+ test -f $(srcdir)/version.m4
+END
+
+cat > zardoz.texi << 'END'
+\input texinfo
address@hidden zardoz.info
address@hidden Zardoz
address@hidden Top
+Hello walls.
address@hidden version.texi
address@hidden
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure --version | grep '2\.718'
+./configure
+$MAKE
+grep '2\.718' version.texi
+
+
+echo 'm4_define([THE_VERSION], [3.141])' > version.m4
+$MAKE distcheck
+./configure --version | grep '3\.141'
+grep '3\.141' version.texi
Index: tests/vtexi.test
===================================================================
RCS file: /cvs/automake/automake/tests/vtexi.test,v
retrieving revision 1.12
diff -u -r1.12 vtexi.test
--- tests/vtexi.test 8 Sep 2002 13:07:56 -0000 1.12
+++ tests/vtexi.test 10 Oct 2002 17:29:34 -0000
@@ -54,7 +54,7 @@
# @CONFIGURE_AC@ was not properly substitued.
$EGREP '^stamp-vti:.*textutils\.texi( .*)?$' Makefile.in
-$EGREP '^stamp-vti:.*\$\(top_srcdir\)/configure\.in( .*)?$' Makefile.in
+$EGREP '^stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
# Check that the path to mdate-sh is correct. Over escaping of `$'
--
Alexandre Duret-Lutz
- configure dependencies, and version.texi dependencies (PR/358)., Alexandre Duret-Lutz, 2002/10/04
- Re: configure dependencies, and version.texi dependencies (PR/358)., Alexandre Duret-Lutz, 2002/10/05
- Re: configure dependencies, and version.texi dependencies (PR/358)., Akim Demaille, 2002/10/08
- Re: configure dependencies, and version.texi dependencies (PR/358)., Alexandre Duret-Lutz, 2002/10/08
- Re: configure dependencies, and version.texi dependencies (PR/358)., Akim Demaille, 2002/10/10
- Re: configure dependencies, and version.texi dependencies (PR/358)., Alexandre Duret-Lutz, 2002/10/09
- Re: configure dependencies, and version.texi dependencies (PR/358)., Akim Demaille, 2002/10/10
- Re: configure dependencies, and version.texi dependencies (PR/358).,
Alexandre Duret-Lutz <=
- Re: configure dependencies, and version.texi dependencies (PR/358)., Akim Demaille, 2002/10/11