automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [PATCH 25/26] [ng] texi: move more code from automake to M


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 25/26] [ng] texi: move more code from automake to Makefile
Date: Sat, 16 Jun 2012 23:30:12 +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 <address@hidden>
---
 automake.in         |    3 ---
 lib/am/texi-spec.am |    7 -------
 lib/am/texibuild.am |   10 ++++++----
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/automake.in b/automake.in
index e4001b6..4fcbef1 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 06ee2d0..0587a6d 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 c5a50a0..bed4034 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/
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]