$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,
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'),
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
## 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
## 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
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%