From f373ac533d0a443606c6c78262ebf61c6815a516 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 30 Nov 2002 13:11:05 +0000 Subject: [PATCH] * tests/texinfo3.test: Make sure we don't output single suffix inference rules when building `.info'-less Info files (this confuses Solaris make). Run distcheck to make sure the rules work. * automake.in (output_texinfo_build_rules): Define GENERIC_INFO and SOURCE_INFO. * lib/am/texibuild.am (%SOURCE_SUFFIX%%DEST_SUFFIX%, %DEST_PREFIX%%DEST_SUFFIX%): Honor GENERIC_INFO and SOURCE_INFO. --- ChangeLog | 11 +++++++++++ automake.in | 14 ++++++++++++++ lib/am/texibuild.am | 10 ++++++---- tests/texinfo3.test | 25 +++++++++++++++++++++---- 4 files changed, 52 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4608c8b8..f4d03c572 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-11-30 Alexandre Duret-Lutz + + * tests/texinfo3.test: Make sure we don't output single suffix + inference rules when building `.info'-less Info files (this + confuses Solaris make). Run distcheck to make sure the rules + work. + * automake.in (output_texinfo_build_rules): Define GENERIC_INFO + and SOURCE_INFO. + * lib/am/texibuild.am (%SOURCE_SUFFIX%%DEST_SUFFIX%, + %DEST_PREFIX%%DEST_SUFFIX%): Honor GENERIC_INFO and SOURCE_INFO. + 2002-11-29 Alexandre Duret-Lutz For PR automake/359: diff --git a/automake.in b/automake.in index 39ec07142..042321476 100755 --- a/automake.in +++ b/automake.in @@ -3777,6 +3777,17 @@ sub output_texinfo_build_rules ($$@) $makeinfoflags = "-I $sdir -I \$(srcdir)/$sdir"; } + # We cannot use a suffix rule to build info files with + # an empty extension. Otherwise we would output a single suffix + # inference rule, with separate dependencies, as in + # .texi: + # $(MAKEINFO) ... + # foo.info: foo.texi + # which confuse Solaris make. (See the Autoconf manual for details.) + # Therefore we use a specific rule in this case. This applies + # to info files only (dvi and pdf files always have an extension). + my $generic_info = ($generic && $dsfx) ? 1 : 0; + # If the resulting file lie into a subdirectory, # make sure this directory will exist. my $dirstamp = require_build_directory_maybe ($dest); @@ -3784,8 +3795,11 @@ sub output_texinfo_build_rules ($$@) $output_rules .= &file_contents ('texibuild', new Automake::Location, GENERIC => $generic, + GENERIC_INFO => $generic_info, SOURCE_SUFFIX => $ssfx, SOURCE => ($generic ? '$<' : $source), + SOURCE_INFO => ($generic_info ? + '$<' : $source), SOURCE_REAL => $source, DEST_PREFIX => $dpfx, DEST_SUFFIX => $dsfx, diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am index 0632c0539..d9a2cc6c4 100644 --- a/lib/am/texibuild.am +++ b/lib/am/texibuild.am @@ -18,8 +18,8 @@ ## 02111-1307, USA. -?GENERIC?%SOURCE_SUFFIX%%DEST_SUFFIX%: -?!GENERIC?%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE% %DEPS% +?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%: +?!GENERIC_INFO?%DEST_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %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 @@ -31,7 +31,7 @@ ## Therefore we ensure that %DIRSTAMP% exists in the rule. ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) %DIRSTAMP% $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \ - -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% + -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO% ?GENERIC?%SOURCE_SUFFIX%.dvi: ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP% @@ -56,8 +56,10 @@ ## If we are using the generic rules, we need separate dependencies. ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic ## rules.) -if %?GENERIC% +if %?GENERIC_INFO% %DEST_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS% +endif %?GENERIC_INFO% +if %?GENERIC% %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS% %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS% endif %?GENERIC% diff --git a/tests/texinfo3.test b/tests/texinfo3.test index 5fb263546..9f59c516c 100755 --- a/tests/texinfo3.test +++ b/tests/texinfo3.test @@ -20,19 +20,36 @@ # Test to make sure .info-less @setfilename works. +required='makeinfo tex' . ./defs || exit 1 set -e +echo AC_OUTPUT >> configure.in + cat > Makefile.am << 'END' info_TEXINFOS = textutils.texi END -echo '@setfilename textutils' > textutils.texi -: > texinfo.tex +cat > textutils.texi <