From: Stefano Lattarini Date: Sat, 16 Jun 2012 20:58:06 +0000 (+0200) Subject: [ng] texi: move more code from automake to Makefile X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f470db883887eb52e14718954d3f4560073af06b;p=thirdparty%2Fautomake.git [ng] texi: move more code from automake to Makefile The previous changes left us with this low-hanging fruit to pick. * automake.in (handle_texinfo_helper): Since the $makeinfoflags contents are now static, we don't need to define that variable anymore, nor to pass the '%MAKEINFOFLAGS%' transform to 'texi-spec.am', nor ... * lib/am/texi-spec.am: ... to use that transform here to define the target specific variable '$(am__makeflags)'; we can just ... * lib/am/texibuild.am: .. inline the static content in the appropriate rules here. Signed-off-by: Stefano Lattarini --- diff --git a/automake.in b/automake.in index 0c4495a36..1b904a9cd 100644 --- a/automake.in +++ b/automake.in @@ -3007,15 +3007,12 @@ sub handle_texinfo_helper ($) push_dist_common ('$(' . $canonical . '_TEXINFOS)'); } - my $makeinfoflags = '-I $(@D) -I $(srcdir)/$(@D)'; - (my $dpfx = $out_file) =~ s/\.info$//; $output_rules .= file_contents ('texi-spec', new Automake::Location, DEPS => "@texi_deps", DEST_PREFIX => $dpfx, INSRC => $insrc, - MAKEINFOFLAGS => $makeinfoflags, SOURCE_REAL => $texi, ); diff --git a/lib/am/texi-spec.am b/lib/am/texi-spec.am index 06ee2d00a..0587a6dc6 100644 --- a/lib/am/texi-spec.am +++ b/lib/am/texi-spec.am @@ -26,10 +26,3 @@ endif !%?INSRC% %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS% %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS% %DEST_PREFIX%.html: %SOURCE_REAL% %DEPS% - -?INSRC?$(srcdir)/%DEST_PREFIX%.info \ -?!INSRC?%DEST_PREFIX%.info \ -%DEST_PREFIX%.dvi \ -%DEST_PREFIX%.pdf \ -%DEST_PREFIX%.html \ -: am__makeinfoflags = %MAKEINFOFLAGS% diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am index c5a50a0f6..bed40349f 100644 --- a/lib/am/texibuild.am +++ b/lib/am/texibuild.am @@ -24,8 +24,9 @@ define am__texibuild_dvi_or_pdf $1$(am__ensure_target_dir_exists) && \ 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 (-I $(srcdir) is set in '$(am__makeinfoflags)'). - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) $(am__makeinfoflags)' \ +## if it is in srcdir. + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ + -I $(@D) -I $(srcdir)/$(@D)' \ ## texi2dvi and texi2pdf don't silence everything with -q, redirect to ## /dev/null instead. ## We still want -q ($(AM_V_TEXI_QUIETOPTS)) because it turns on batch @@ -57,7 +58,7 @@ define am__texibuild_info else :; fi && \ $(if $(am__info_insrc),cd "$$am__cwd" &&) \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ - $(am__makeinfoflags) -o $@ $<; \ + -I $(@D) -I $(srcdir)/$(@D) -o $@ $<; \ then \ rc=0; \ $(if $(am__info_insrc),$(am__cd) $(srcdir);) \ @@ -81,7 +82,8 @@ define am__texibuild_html && { test ! -d $(@:.html=.htp) || rm -rf $(@:.html=.htp); } \ || exit 1; \ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \ - $(am__makeinfoflags) -o $(@:.html=.htp) $<; \ + -I $(@D) -I $(srcdir)/$(@D) \ + -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ ## Work around a bug in Texinfo 4.1 (-o foo.html outputs files in foo/