]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] texi: move more code from automake to Makefile
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Jun 2012 20:58:06 +0000 (22:58 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 17 Jun 2012 08:24:18 +0000 (10:24 +0200)
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 <stefano.lattarini@gmail.com>
automake.in
lib/am/texi-spec.am
lib/am/texibuild.am

index 0c4495a36c77d16dabbf44739f2c837153a698ad..1b904a9cdc92d6a3ec746946f06f0e23df321e26 100644 (file)
@@ -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,
                                       );
 
index 06ee2d00a3b8d02a09aaee6320905a8a8dc610bc..0587a6dc6c4839ca973f0b21894861c2a600d56f 100644 (file)
@@ -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%
index c5a50a0f61271a74eff87bdb282145835e7a8963..bed40349f12403dfcd87f8bf51cdf767d2172352 100644 (file)
@@ -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/