+2002-10-10 Alexandre Duret-Lutz <adl@gnu.org>
+
+ 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 that m4_include'd files
+ are distributed.
+
2002-10-09 Akim Demaille <akim@epita.fr>
* m4/ccstdc.m4 (AM_PROG_CC_STDC): Its definition is now empty:
Sam Hocevar sam@zoy.org
Sergey Vlasov vsu@mivlgu.murom.ru
Seth Alves alves@hungry.com
-Shuhei Amakawa <sa264@cam.ac.uk>
+Shuhei Amakawa sa264@cam.ac.uk
Shigio Yamaguchi shigio@tamacom.com
Steve M. Robbins steve@nyongwa.montreal.qc.ca
Sven Verdoolaege skimo@kotnet.org
Tatu Ylonen ylo@ssh.fi
The Crimson Binome steve@nyongwa.montreal.qc.ca
-thi ttn@revel.glug.org
+Thien-Thi Nguyen ttn@glug.org
Thomas Gagne tgagne@ix.netcom.com
Thomas Morgan tmorgan@pobox.com
Thomas Tanner tanner@ffii.org
# 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 = ();
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,
=> $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 '.')
{
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') . " ";
{
$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:)?[\\/],;
+ }
}
}
@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
+@code{include}) 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
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%
## 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.
-@set UPDATED 25 September 2002
-@set UPDATED-MONTH September 2002
+@set UPDATED 10 October 2002
+@set UPDATED-MONTH October 2002
@set EDITION 1.7a
@set VERSION 1.7a
version4.test \
version5.test \
version6.test \
+version7.test \
vpath.test \
vtexi.test \
vtexi2.test \
version4.test \
version5.test \
version6.test \
+version7.test \
vpath.test \
vtexi.test \
vtexi2.test \
--- /dev/null
+#! /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
+@setfilename zardoz.info
+@settitle Zardoz
+@node Top
+Hello walls.
+@include version.texi
+@bye
+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
# @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 `$'
-@set UPDATED 25 September 2002
-@set UPDATED-MONTH September 2002
+@set UPDATED 10 October 2002
+@set UPDATED-MONTH October 2002
@set EDITION 1.7a
@set VERSION 1.7a