[Top][All Lists]
[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
- [Automake-NG] [PATCH 19/26] [ng] automake: remove two unused variables from '&handle_texinfo_source', (continued)
- [Automake-NG] [PATCH 19/26] [ng] automake: remove two unused variables from '&handle_texinfo_source', Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 21/26] [ng] texi: move some more knowledge from automake to texi-spec.am, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 22/26] [ng] texi: simplify handle_texinfo_source by assuming '.info' suffix ..., Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 23/26] [ng] automake: merge handle_texinfo_source() -> handle_texinfo_helper(), Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 20/26] [ng] texi: in texi-spec.am, assume suffix for info files is always '.info', Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 24/26] [ng] texi: "de-prettify" makeinfo command line, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 25/26] [ng] texi: move more code from automake to Makefile,
Stefano Lattarini <=
- [Automake-NG] [PATCH 26/26] [ng] texi: remove some crufty code to support obsolete environment, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 27/26] [ng] tests: rename silent8.sh -> silent-info.sh, Stefano Lattarini, 2012/06/17
- [Automake-NG] [PATCH 28/26] [ng] coverage: texinfo silent rules with a subdir texinfo file, Stefano Lattarini, 2012/06/17
- [Automake-NG] [PATCH 29/26] [ng] texi: drop support for '.txi' and '.texinfo' suffixes, Stefano Lattarini, 2012/06/17