[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 01/26] [ng] texi: simplify by always assuming gener
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 01/26] [ng] texi: simplify by always assuming generic rules |
Date: |
Sat, 16 Jun 2012 23:29:48 +0200 |
They are assured to work with GNU make even when the '.texi' source
lies in a subdirectory, because in that case also the corresponding
output files ('.pdf', '.ps', '.dvi' and '.html') lies in the same
subdirectory.
* automake.in (output_texinfo_build_rules): Don't define the boolean
'$generic' anymore. Related simplifications. Drop the 'SOURCE' and
'GENERIC' transforms when processing the 'texibuild.am' file. Remove
obsolete comments.
* lib/am/texibuild.am: Adjust by always assuming that '?GENERIC?'
is true.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 36 +++---------------------------------
lib/am/texibuild.am | 12 +++---------
2 files changed, 6 insertions(+), 42 deletions(-)
diff --git a/automake.in b/automake.in
index c3a9848..45f70eb 100644
--- a/automake.in
+++ b/automake.in
@@ -2859,38 +2859,11 @@ sub output_texinfo_build_rules ($$$@)
$ssfx ||= "";
$dsfx ||= "";
- # 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
- # output the same rule twice); while the later need to be output for
- # each Texinfo source.
- my $generic;
- my $makeinfoflags;
my $sdir = dirname $source;
- if ($sdir eq '.' && dirname ($dest) eq '.')
- {
- $generic = 1;
- $makeinfoflags = '-I $(srcdir)';
- }
- else
- {
- $generic = 0;
- $makeinfoflags = "-I $sdir -I \$(srcdir)/$sdir";
- }
-
- # A directory can contain two kinds of info files: some built in the
- # source tree, and some built in the build tree. The rules are
- # different in each case. However we cannot output two different
- # set of generic rules. Because in-source builds are more usual, we
- # use generic rules in this case and fall back to "specific" rules
- # for build-dir builds. (It should not be a problem to invert this
- # if needed.)
- $generic = 0 unless $insrc;
-
my $dipfx = ($insrc ? '$(srcdir)/' : '') . $dpfx;
+ my $makeinfoflags = ($sdir eq '.' && dirname ($dest) eq '.')
+ ? '-I $(srcdir)'
+ : "-I $sdir -I \$(srcdir)/$sdir";
$output_rules .= file_contents ('texibuild',
new Automake::Location,
@@ -2901,11 +2874,8 @@ sub output_texinfo_build_rules ($$$@)
DEST_PREFIX => $dpfx,
DEST_INFO_PREFIX => $dipfx,
DEST_SUFFIX => $dsfx,
- GENERIC => $generic,
INSRC => $insrc,
MAKEINFOFLAGS => $makeinfoflags,
- SOURCE => ($generic
- ? '$<' : $source),
SOURCE_REAL => $source,
SOURCE_SUFFIX => $ssfx,
TEXIQUIET => verbose_flag('texinfo'),
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 735b2d8..aef650a 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -49,8 +49,7 @@
INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
-?GENERIC?%.dvi: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS%
+%.dvi: %%SOURCE_SUFFIX%
%AM_V_TEXI2DVI%$(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
@@ -63,8 +62,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## can assume Texinf 4.9 or later.
$(TEXI2DVI) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL%
-?GENERIC?%.pdf: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS%
+%.pdf: %%SOURCE_SUFFIX%
%AM_V_TEXI2PDF%$(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
@@ -77,8 +75,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## can assume Texinf 4.9 or later.
$(TEXI2PDF) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL%
-?GENERIC?%.html: %%SOURCE_SUFFIX%
-?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS%
+%.html: %%SOURCE_SUFFIX%
%SILENT%$(am__ensure_target_dir_exists)
## When --split (the default) is used, makeinfo will output a
## directory. However it will not update the time stamp of a
@@ -101,10 +98,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
exit 1; \
fi
-## If we are using the generic rules, we need separate dependencies.
%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
-if %?GENERIC%
%DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%
-endif %?GENERIC%
--
1.7.9.5
[Automake-NG] [PATCH 01/26] [ng] texi: simplify by always assuming generic rules,
Stefano Lattarini <=
[Automake-NG] [PATCH 03/26] [ng] texi: reimplement '.info' build using target-specific variables, Stefano Lattarini, 2012/06/16
[Automake-NG] [PATCH 04/26] [ng] texi: more target-specific variables use in '.info' build rules, Stefano Lattarini, 2012/06/16