From 8e9fe56b6841fefa1fd71d32b82549df06fef86f Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 15 Jun 2012 17:15:52 +0200 Subject: [PATCH] [ng] texinfo: pattern rules with empty suffixes are OK So we can remove a workaround required by Solaris make from our texinfo rules. * automake.in (output_texinfo_build_rules): Don't define the boolean '$generic_info' anymore. Drop the 'SOURCE_INFO' and 'GENERIC_INFO' transforms when processing the 'texibuild.am' file. Remove obsolete comments, and adjust some of the remaining ones. * lib/am/texibuild.am: Adjust by always assuming that '?GENERIC_INFO?' is true. * t/txinfo3.sh: Adjust and extend. Signed-off-by: Stefano Lattarini --- automake.in | 24 +++--------------------- lib/am/texibuild.am | 5 +---- t/txinfo3.sh | 35 +++++++++++++++++++++++++++-------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/automake.in b/automake.in index 83b26b8e9..03d0310f1 100644 --- a/automake.in +++ b/automake.in @@ -2859,10 +2859,9 @@ sub output_texinfo_build_rules ($$$@) $ssfx ||= ""; $dsfx ||= ""; - # We can output two kinds of rules: the "generic" rules use Make - # suffix rules and are appropriate when $source and $dest do not lie - # in a sub-directory; the "specific" rules are needed in the other - # case. + # We can output two kinds of rules: the "generic" rules use pattern + # rules and are appropriate when $source and $dest do not lie in a + # sub-directory; the "specific" rules are 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 @@ -2891,20 +2890,6 @@ sub output_texinfo_build_rules ($$$@) # if needed.) $generic = 0 unless $insrc; - # 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; - my $dipfx = ($insrc ? '$(srcdir)/' : '') . $dpfx; $output_rules .= file_contents ('texibuild', @@ -2917,13 +2902,10 @@ sub output_texinfo_build_rules ($$$@) DEST_INFO_PREFIX => $dipfx, DEST_SUFFIX => $dsfx, GENERIC => $generic, - GENERIC_INFO => $generic_info, INSRC => $insrc, MAKEINFOFLAGS => $makeinfoflags, SOURCE => ($generic ? '$<' : $source), - SOURCE_INFO => ($generic_info - ? '$<' : $source), SOURCE_REAL => $source, SOURCE_SUFFIX => $ssfx, TEXIQUIET => verbose_flag('texinfo'), diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am index 049d894fc..735b2d87f 100644 --- a/lib/am/texibuild.am +++ b/lib/am/texibuild.am @@ -14,8 +14,7 @@ ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -?GENERIC_INFO?%%DEST_SUFFIX%: %%SOURCE_SUFFIX% -?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS% +%%DEST_SUFFIX%: %%SOURCE_SUFFIX% ?!INSRC? @$(am__ensure_target_dir_exists) ## Back up the info files before running makeinfo. This is the cheapest ## way to ensure that @@ -103,9 +102,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX% fi ## If we are using the generic rules, we need separate dependencies. -if %?GENERIC_INFO% %DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS% -endif %?GENERIC_INFO% if %?GENERIC% %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS% %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS% diff --git a/t/txinfo3.sh b/t/txinfo3.sh index 88e1bacfe..7363c39bd 100755 --- a/t/txinfo3.sh +++ b/t/txinfo3.sh @@ -24,7 +24,10 @@ AC_OUTPUT END cat > Makefile.am << 'END' -info_TEXINFOS = textutils.texi +info_TEXINFOS = textutils.texi doc/automake-ng.texi +.PHONY: echo-info-deps +echo-info-deps: + echo ' ' $(INFO_DEPS) ' ' END cat > textutils.texi < doc/automake-ng.texi <