[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't `make install' Autoconf 2.53b if makeinfo is missing + an OSF
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Can't `make install' Autoconf 2.53b if makeinfo is missing + an OSF make issue |
Date: |
30 Jul 2002 22:08:53 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>> "Paul" == Paul Eggert <address@hidden> writes:
>> From: Alexandre Duret-Lutz <address@hidden>
>> Date: 28 Jul 2002 22:05:28 +0200
>> Actually I think Automake should simply output
>> this rule if it is needed (i.e. if the user don't use `.info').
Paul> That sounds like a win, if Automake can determine that.
I'm checking in the following patch. This is a based on subset
of the following larger patch
http://mail.gnu.org/pipermail/automake-patches/2002-June/000867.html
The main intent is to cleanup texibuild.am so that it looks much
like other languages. This means it supports generic and
non-generic build (non-generic will be usefull to support
Texinfo files subdirectories -- but I'm not claiming this works
yet) and it builds things in the current directory (this is PR/168).
Incidentally this will output only the suffix rules which are needed
(i.e., no `.texi:' rule in Autoconf -- texinfo3.test checks
for this), and pass `-o' to makeinfo (for PR/339). So this should
solve the two failures observed in Autoconf's `make install'.
While working on this patch I've seen two VPATH oddities that
are not yet documented in Autoconf; I'll submit a patch for this
ASAP. One of these is described as comments in texi-vers.am and
texinfo16.test; I should thank Akim for suggesting me to remove
the `@:' command in texi-vers.am (Yes Akim, it worked!
texinfo16.test will fail if you try to add it back).
I tested this change by regenerating the Makefile.ins for
Autoconf and Automake, then attempting both an in-source build
and a VPATH build for the two packages, with GNU make and with
BSD make. I have not tested the resulting Autoconf package on
OSF, where the issue initially occured, but I'm fairly
confident.
I'm leaving the `Makefile' chunks in the diff to show the
differences in output.
2002-07-30 Alexandre Duret-Lutz <address@hidden>
Build info files in builddir instead of srcdir (for PR automake/168),
and prepare support for info files in subdirecties.
* automake.in (output_texinfo_build_rules): New function.
(handle_texinfo_helper): Use output_texinfo_build_rules, and
prepare to support subdir texinfos. Define am__TEXINFO_TEX_DIR.
* lib/am/texi-vers.am: Build version.texi and stamp-vti in the
current directory, not $(srcdir). Use %STAMPVTI% to name the stamp
file.
* lib/am/texibuild.am: Rewrite to output files in the current
directory, not $(srcdir). Also, support both generic and
non-generic output. Pass `-o $@' to makeinfo, texinfo, and
texi2dvi -- this is a partial fix for PR automake/339.
* tests/texinfo3.test: Make sure the `.texi:' rule is output.
* tests/texinfo10.test: Use set -e, so the checks are not ignored.
* tests/texinfo16.test: New file.
* tests/Makefile.am (TESTS): Add texinfo16.test.
Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.381
diff -u -r1.381 Makefile.in
--- Makefile.in 28 Jul 2002 19:32:37 -0000 1.381
+++ Makefile.in 30 Jul 2002 19:49:55 -0000
@@ -116,6 +116,7 @@
DIST_SOURCES =
TEXINFO_TEX = $(top_srcdir)/lib/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/lib
INFO_DEPS = automake.info
DVIS = automake.dvi
PDFS = automake.pdf
@@ -176,52 +177,43 @@
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
-
-$(srcdir)/version.texi: $(srcdir)/stamp-vti
- @:
-$(srcdir)/stamp-vti: automake.texi $(top_srcdir)/configure.in
- @(set `$(SHELL) $(top_srcdir)/lib/mdate-sh $(srcdir)/automake.texi`; \
+version.texi: stamp-vti
+stamp-vti: automake.texi $(top_srcdir)/configure.in
+ @(dir=.; test -f ./automake.texi || dir=$(srcdir); \
+ set `$(SHELL) $(top_srcdir)/lib/mdate-sh $$dir/automake.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > vti.tmp
- @cmp -s vti.tmp $(srcdir)/version.texi \
- || (echo "Updating $(srcdir)/version.texi"; \
- cp vti.tmp $(srcdir)/version.texi)
+ @cmp -s vti.tmp version.texi \
+ || (echo "Updating version.texi"; \
+ cp vti.tmp version.texi)
address@hidden -f vti.tmp
- @cp $(srcdir)/version.texi $@
+ @cp version.texi $@
mostlyclean-vti:
-rm -f vti.tmp
maintainer-clean-vti:
- -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
-
-automake.info: automake.texi $(srcdir)/version.texi
-automake.dvi: automake.texi $(srcdir)/version.texi
-automake.pdf: automake.texi $(srcdir)/version.texi
+ -rm -f stamp-vti version.texi
.texi.info:
- @cd $(srcdir) && rm -f $@ address@hidden address@hidden
- cd $(srcdir) \
- && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
- `echo $< | sed 's,.*/,,'`
+ @rm -f $@ address@hidden address@hidden
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ `test -f '$<' || echo '$(srcdir)/'`$< -o $@
.texi.dvi:
- TEXINPUTS="$(top_srcdir)/lib$(PATH_SEPARATOR)$$TEXINPUTS" \
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
.texi.pdf:
- TEXINPUTS="$(top_srcdir)/lib$(PATH_SEPARATOR)$$TEXINPUTS" \
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
- $(TEXI2PDF) $<
-
-.texi:
- @cd $(srcdir) && rm -f $@ address@hidden address@hidden
- cd $(srcdir) \
- && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
- `echo $< | sed 's,.*/,,'`
+ $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
+automake.info: version.texi
+automake.dvi: version.texi
+automake.pdf: version.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.188
diff -u -r1.188 NEWS
--- NEWS 28 Jul 2002 18:47:46 -0000 1.188
+++ NEWS 30 Jul 2002 19:49:58 -0000
@@ -1,4 +1,4 @@
-New in 1.6b:
+New in 1.6c:
* Autoconf 2.53b is required.
* `aclocal' and `automake' will no longer warn about obsolete
configure macros. This is done by `autoconf -Wobsolete'.
@@ -16,6 +16,7 @@
* A new option, std-options, tests that programs support --help and --version
when `make installcheck' is run. This is enabled by --gnits.
* Texinfo rules now support the `ps' and `pdf' targets.
+* Info files are now created in the build directory, not the source directory.
* `make distcheck' will enforce DESTDIR support by attempting
a DESTDIR install.
* `+=' can be used in conditionals, even if the augmented variable
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1335
diff -u -r1.1335 automake.in
--- automake.in 28 Jul 2002 18:14:38 -0000 1.1335
+++ automake.in 30 Jul 2002 19:50:23 -0000
@@ -3525,6 +3525,74 @@
return ($outfile, $vfile, (sort keys %clean_files));
}
+# output_texinfo_build_rules ($SOURCE, $DEST, @DEPENDENCIES)
+# ----------------------------------------------------------
+# SOURCE - the source Texinfo file
+# DEST - the destination Info file
+# DEPENDENCIES - known dependencies
+sub output_texinfo_build_rules ($$@)
+{
+ my ($source, $dest, @deps) = @_;
+
+ # Split `a.texi' into `a' and `.texi'.
+ my ($spfx, $ssfx) = ($source =~ /^(.*?)(\.[^.]*)?$/);
+ my ($dpfx, $dsfx) = ($dest =~ /^(.*?)(\.[^.]*)?$/);
+
+ $ssfx ||= "";
+ $dsfx ||= "";
+
+ # We can output two kinds of rules: the "generic" rules
+ # use Make suffix rules and are appropritate when
+ # $source and $dest lie in the current directory; the "specifix"
+ # rules is needed in the other case.
+ #
+ # The former are output only once (this is not really apparent
+ # here, but just remember that some logic deeper in Automake will
+ # not output the same rule twice); while the later need to be output
+ # for each Texinfo source.
+ my $generic;
+ my $makeinfoflags;
+ my $sdir = dirname $source;
+ if ($sdir eq '.' && dirname ($dest) eq '.')
+ {
+ $generic = 1;
+ $makeinfoflags = '-I $(srcdir)';
+ }
+ else
+ {
+ $generic = 0;
+ $makeinfoflags = "-I $sdir -I \$(srcdir)/$sdir";
+ }
+
+ # If the resulting file lie into a subdirectory,
+ # make sure this directory will exist.
+ my $dirstamp = require_build_directory_maybe ($dest);
+
+ # It is wrong to make $SOURCE dependent on $DIRSTAMP, because
+ # $SOURCE is distributed and $DIRSTAMP is not. A generated file
+ # should never be dependent upon a non-distributed built file.
+ #
+ # So don't do that:
+ #
+ # push @deps, $dirstamp;
+ #
+ # Instead we append all dirstamps to the $(am__texinfo_dirstamps)
+ # variable and have this variable in the dependencies of
+ # info, dvi, etc. (FIXME: this is not done yet -- support for
+ # Texinfo files in subdirectories is not complete.)
+ macro_define ('am__texinfo_dirstamps', VAR_AUTOMAKE, '+', 'TRUE',
+ $dirstamp, 'internal');
+
+ $output_rules .= &file_contents ('texibuild',
+ GENERIC => $generic,
+ SOURCE_SUFFIX => $ssfx,
+ SOURCE => ($generic ? '$<' : $source),
+ DEST_PREFIX => $dpfx,
+ DEST_SUFFIX => $dsfx,
+ MAKEINFOFLAGS => $makeinfoflags,
+ DEPS => "@deps");
+}
+
# ($DO-SOMETHING, $TEXICLEANS)
# handle_texinfo_helper ()
@@ -3545,7 +3613,6 @@
my @texi_cleans;
my $canonical;
- my %texi_suffixes;
foreach my $info_cursor (@texis)
{
my $infobase = $info_cursor;
@@ -3557,7 +3624,6 @@
err_am "texinfo file `$info_cursor' has unrecognized extension";
next;
}
- $texi_suffixes{$1} = 1;
# If 'version.texi' is referenced by input file, then include
# automatic versioning capability.
@@ -3566,6 +3632,14 @@
or next;
push (@texi_cleans, @clean_files);
+ # If the Texinfo source is in a subdirectory, create the
+ # resulting info in this subdirectory. If it is in the
+ # current directory, try hard to not prefix "./" because
+ # it breaks the generic rules.
+ my $outdir = dirname ($info_cursor) . '/';
+ $outdir = "" if $outdir eq './';
+ $out_file = $outdir . $out_file;
+
if ($vtexi)
{
err_am ("`$vtexi', included in `$info_cursor', "
@@ -3601,20 +3675,18 @@
{
$conf_dir = '$(srcdir)/';
}
- $output_rules .= &file_contents ('texi-vers',
- ('TEXI' => $info_cursor,
- 'VTI' => $vti,
- 'VTEXI' => $vtexi,
- 'MDDIR' => $conf_dir));
+ $output_rules .= &file_contents ('texi-vers',
+ TEXI => $info_cursor,
+ VTI => $vti,
+ STAMPVTI => "${outdir}stamp-$vti",
+ VTEXI => "$outdir$vtexi",
+ MDDIR => $conf_dir);
}
# If user specified file_TEXINFOS, then use that as explicit
# dependency list.
@texi_deps = ();
- push (@texi_deps, $info_cursor);
- # Prefix with $(srcdir) because some version of make won't
- # work if the target has it and the dependency doesn't.
- push (@texi_deps, '$(srcdir)/' . $vtexi) if $vtexi;
+ push (@texi_deps, "$outdir$vtexi") if $vtexi;
my $canonical = &canonicalize ($infobase);
if (variable_defined ($canonical . "_TEXINFOS"))
@@ -3623,13 +3695,8 @@
&push_dist_common ('$(' . $canonical . '_TEXINFOS)');
}
- $output_rules .= ("\n" . $out_file . ": "
- . "@texi_deps"
- . "\n" . $infobase . ".dvi: "
- . "@texi_deps"
- . "\n" . $infobase . ".pdf: "
- . "@texi_deps"
- . "\n");
+ output_texinfo_build_rules ($info_cursor, $out_file,
+ @texi_deps);
push (@info_deps_list, $out_file);
push (@dvis_list, $infobase . '.dvi');
@@ -3663,13 +3730,7 @@
$texinfodir = '$(srcdir)';
$need_texi_file = 1;
}
-
- foreach my $txsfx (sort keys %texi_suffixes)
- {
- $output_rules .= &file_contents ('texibuild',
- ('TEXINFODIR' => $texinfodir,
- 'SUFFIX' => $txsfx));
- }
+ &define_variable ('am__TEXINFO_TEX_DIR', $texinfodir);
# The return value.
my $texiclean = &pretty_print_internal ("", "\t ", @texi_cleans);
Index: stamp-vti
===================================================================
RCS file: /cvs/automake/automake/stamp-vti,v
retrieving revision 1.192
diff -u -r1.192 stamp-vti
--- stamp-vti 28 Jul 2002 19:32:37 -0000 1.192
+++ stamp-vti 30 Jul 2002 19:50:55 -0000
@@ -1,4 +1,4 @@
address@hidden UPDATED 21 July 2002
address@hidden UPDATED 30 July 2002
@set UPDATED-MONTH July 2002
@set EDITION 1.6c
@set VERSION 1.6c
Index: lib/am/texi-vers.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texi-vers.am,v
retrieving revision 1.20
diff -u -r1.20 texi-vers.am
--- lib/am/texi-vers.am 9 Apr 2001 14:06:40 -0000 1.20
+++ lib/am/texi-vers.am 30 Jul 2002 19:51:21 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001
+## Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -17,15 +17,20 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-DIST_COMMON += %VTEXI% stamp-%VTI%
+DIST_COMMON += %VTEXI% %STAMPVTI%
-$(srcdir)/%VTEXI%: %MAINTAINER-MODE% $(srcdir)/stamp-%VTI%
- @:
+## Don't give this rule a command (even `@:').
+## %STAMPVTI% is always newer than %VTEXI%, so this rule is always
+## triggered. If you equip this rule with a command, GNU make will
+## assume %VTEXI% has been rebuild in the current directory and
+## 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.
-$(srcdir)/stamp-%VTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC%
- @(set `$(SHELL) %MDDIR%mdate-sh $(srcdir)/%TEXI%`; \
+%STAMPVTI%: %TEXI% $(top_srcdir)/%CONFIGURE-AC%
+ @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
+ set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
@@ -33,11 +38,11 @@
## Use cp and rm here because some older "mv"s can't move across
## filesystems. Furthermore, GNU "mv" in the AmigaDOS environment
## can't handle this.
- @cmp -s %VTI%.tmp $(srcdir)/%VTEXI% \
- || (echo "Updating $(srcdir)/%VTEXI%"; \
- cp %VTI%.tmp $(srcdir)/%VTEXI%)
+ @cmp -s %VTI%.tmp %VTEXI% \
+ || (echo "Updating %VTEXI%"; \
+ cp %VTI%.tmp %VTEXI%)
address@hidden -f %VTI%.tmp
- @cp $(srcdir)/%VTEXI% $@
+ @cp %VTEXI% $@
mostlyclean-am: mostlyclean-%VTI%
mostlyclean-%VTI%:
@@ -45,6 +50,6 @@
maintainer-clean-am: maintainer-clean-%VTI%
maintainer-clean-%VTI%:
-%MAINTAINER-MODE% -rm -f $(srcdir)/stamp-%VTI% $(srcdir)/%VTEXI%
+%MAINTAINER-MODE% -rm -f %STAMPVTI% %VTEXI%
.PHONY: mostlyclean-%VTI% maintainer-clean-%VTI%
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.5
diff -u -r1.5 texibuild.am
--- lib/am/texibuild.am 13 Jun 2002 08:09:33 -0000 1.5
+++ lib/am/texibuild.am 30 Jul 2002 19:51:21 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -17,50 +17,36 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-.%SUFFIX%.info:
-## We want to force the .info file to be built in srcdir. This is
-## probably the simplest way. However, at Cygnus .info files are
-## always put into the build directory. So at runtime we select which
-## rule to use.
+
+?GENERIC?%SOURCE_SUFFIX%%DEST_SUFFIX%:
+?!GENERIC?%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE% %DEPS%
## Note that we also remove the possible output files before running
## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
## using --no-split), you'll be left with some dead info files lying
## around -- dead files which will end up in the distribution.
-?!CYGNUS? @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-?!CYGNUS? cd $(srcdir) \
-?!CYGNUS? && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-?!CYGNUS? `echo $< | sed 's,.*/,,'`
-?CYGNUS? @rm -f $@ address@hidden address@hidden
-?CYGNUS? $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-?CYGNUS? -I $(srcdir) $<
-
-.%SUFFIX%.dvi:
- TEXINPUTS="%TEXINFODIR%$(PATH_SEPARATOR)$$TEXINPUTS" \
+ @rm -f $@ address@hidden address@hidden
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
+ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+
+?GENERIC?%SOURCE_SUFFIX%.dvi:
+?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS%
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
-## if it is in srcdir.
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
- $(TEXI2DVI) $<
-
-.%SUFFIX%.pdf:
- TEXINPUTS="%TEXINFODIR%$(PATH_SEPARATOR)$$TEXINPUTS" \
+## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
+ $(TEXI2DVI) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+
+?GENERIC?%SOURCE_SUFFIX%.pdf:
+?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS%
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
-## if it is in srcdir.
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
- $(TEXI2PDF) $<
-
-.%SUFFIX%:
-## We want to force the .info file to be built in srcdir. This is
-## probably the simplest way. However, at Cygnus .info files are
-## always put into the build directory. So at runtime we select which
-## rule to use.
-## Note that we also remove the possible output files before running
-## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
-## using --no-split), you'll be left with some dead info files lying
-## around -- dead files which will end up in the distribution.
-?!CYGNUS? @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-?!CYGNUS? cd $(srcdir) \
-?!CYGNUS? && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-?!CYGNUS? `echo $< | sed 's,.*/,,'`
-?CYGNUS? @rm -f $@ address@hidden address@hidden
-?CYGNUS? $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-?CYGNUS? -I $(srcdir) $<
+## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
+ $(TEXI2PDF) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -o $@
+
+## If we are using the generic rules, we need separate dependencies.
+if %?GENERIC%
+%DEST_PREFIX%%DEST_SUFFIX%: %DEPS%
+%DEST_PREFIX%.dvi: %DEPS%
+%DEST_PREFIX%.pdf: %DEPS%
+endif %?GENERIC%
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.424
diff -u -r1.424 Makefile.am
--- tests/Makefile.am 23 Jul 2002 18:58:07 -0000 1.424
+++ tests/Makefile.am 30 Jul 2002 19:51:22 -0000
@@ -383,6 +383,7 @@
texinfo8.test \
texinfo9.test \
texinfo10.test \
+texinfo16.test \
transform.test \
unused.test \
vars.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.546
diff -u -r1.546 Makefile.in
--- tests/Makefile.in 28 Jul 2002 19:32:38 -0000 1.546
+++ tests/Makefile.in 30 Jul 2002 19:51:22 -0000
@@ -471,6 +471,7 @@
texinfo8.test \
texinfo9.test \
texinfo10.test \
+texinfo16.test \
transform.test \
unused.test \
vars.test \
Index: tests/texinfo10.test
===================================================================
RCS file: /cvs/automake/automake/tests/texinfo10.test,v
retrieving revision 1.3
diff -u -r1.3 texinfo10.test
--- tests/texinfo10.test 20 Oct 2001 11:17:17 -0000 1.3
+++ tests/texinfo10.test 30 Jul 2002 19:51:22 -0000
@@ -5,6 +5,8 @@
. $srcdir/defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
SUBDIRS = sub
END
@@ -17,8 +19,8 @@
echo '@setfilename maude.info' > sub/maude.texi
: > sub/texinfo.tex
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
grep dvi-recursive Makefile.in
grep '[^-]info-recursive' Makefile.in
Index: tests/texinfo16.test
===================================================================
RCS file: tests/texinfo16.test
diff -N tests/texinfo16.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/texinfo16.test 30 Jul 2002 19:51:22 -0000
@@ -0,0 +1,69 @@
+#! /bin/sh
+
+# Check that info files are built in $(srcdir).
+
+required='GNUmake makeinfo'
+. $srcdir/defs || exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
address@hidden main.info
address@hidden main
address@hidden Top
+Hello walls.
address@hidden version.texi
address@hidden
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f main.info
+
+cd ..
+rm -rf build
+./configure
+$MAKE
+test -f main.info
+
+# Make sur stamp-vti is older that version.texi.
+# (A common situation in a real tree.)
+# This is needed to test the "subtle" issue described below.
+test -f stamp-vti
+test -f version.texi
+sleep 2
+touch stamp-vti
+
+$MAKE distclean
+test -f stamp-vti
+test -f version.texi
+
+mkdir build
+cd build
+../configure
+$MAKE
+# main.info should not be rebuilt in the current directory, since
+# it's up-to-date in $(srcdir).
+# This can be caused by a subtle issue related to VPATH handling
+# of version.texi (see also the comment in texi-vers.am): because
+# stamp-vti is newer than version.texi, the `version.texi: stamp-vti'
+# rule is always triggered. Still that's not a reason for `make'
+# to think `version.texi' has been created...
+test ! -f main.info
+$MAKE dvi
+test -f main.dvi
+
+$MAKE distcheck
Index: tests/texinfo3.test
===================================================================
RCS file: /cvs/automake/automake/tests/texinfo3.test,v
retrieving revision 1.2
diff -u -r1.2 texinfo3.test
--- tests/texinfo3.test 20 Oct 2001 11:17:17 -0000 1.2
+++ tests/texinfo3.test 30 Jul 2002 19:51:22 -0000
@@ -4,6 +4,8 @@
. $srcdir/defs || exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
END
@@ -11,7 +13,8 @@
echo '@setfilename textutils' > textutils.texi
: > texinfo.tex
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^INFO_DEPS.*textutils$' Makefile.in
+grep '^.texi:$' Makefile.in
--
Alexandre Duret-Lutz