+2003-07-06 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&define_files_variable): New.
+ (&handle_texinfo_helper): Move the handling of user variables from
+ here, to...
+ (&handle_texinfo): here.
+ This is to balance the size of these functions, and to match the
+ convention of other _helper functions.
+ (&handle_texinfo_helper): Use &define_files_variable.
+ Move some code to use less variables.
+ Rename $info_cursor as $texi.
+ (&handle_texinfo): Do not call handle_texinfo_helper if there are
+ no TEXINFOS.
+ * lib/am/texinfos.am: Sort the occurrences of dvi, info, pdf, ps
+ and html.
+ Remove *-recursive targets from .PHONY, they are part of
+ $(RECURSIVE_TARGETS) anyway.
+ (install-info, mostlyclean-aminfo): Are .PHONY.
+
2003-07-05 Akim Demaille <akim@epita.fr>
* lib/am/distdir.am: Use ';' as a terminator, not a separator, for
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
DVIPS = dvips
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- ps-recursive html-recursive install-info-recursive \
+RECURSIVE_TARGETS = dvi-recursive html-recursive info-recursive \
+ pdf-recursive ps-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-info \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-recursive distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am \
- dvi-recursive html html-am html-recursive info info-am \
- info-recursive install install-am install-binSCRIPTS \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-binSCRIPTS \
install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
- install-info install-info-am install-info-recursive \
- install-man install-recursive install-strip installcheck \
- installcheck-am installdirs installdirs-am \
- installdirs-recursive maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-recursive \
- maintainer-clean-vti mostlyclean mostlyclean-aminfo \
- mostlyclean-generic mostlyclean-recursive mostlyclean-vti pdf \
- pdf-am pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+ install-info install-info-am install-man install-recursive \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am installdirs-recursive maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic \
+ maintainer-clean-recursive maintainer-clean-vti mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-recursive \
+ mostlyclean-vti pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am \
uninstall-info-recursive uninstall-recursive
## --------------------------------- ##
sub register_language (%);
sub file_contents_internal ($$$%);
+sub define_files_variable ($\@$$);
# &initialize_per_input ()
# included files. We can't scan included files because we don't
# know the include path. Therefore we always erase these files, no
# matter whether they are used or not.
- #
+ #
# (tmp is only created if an @macro is used and a certain e-TeX
# feature is not available.)
my %clean_suffixes =
# suffix rules and are appropritate when $source and $dest lie in
# the current directory; the "specifix" rules is 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
# We cannot use a suffix rule to build info files with an empty
# extension. Otherwise we would output a single suffix inference
# rule, with separate dependencies, as in
- #
+ #
# .texi:
- # $(MAKEINFO) ...
+ # $(MAKEINFO) ...
# foo.info: foo.texi
- #
+ #
# which confuse Solaris make. (See the Autoconf manual for
# details.) Therefore we use a specific rule in this case. This
# applies to info files only (dvi and pdf files always have an
}
-# ($DO-SOMETHING, $TEXICLEANS)
-# handle_texinfo_helper ()
-# ------------------------
-# Handle all Texinfo source; helper for handle_texinfo
-sub handle_texinfo_helper ()
+# $TEXICLEANS
+# handle_texinfo_helper ($info_texinfos)
+# --------------------------------------
+# Handle all Texinfo source; helper for handle_texinfo.
+sub handle_texinfo_helper ($)
{
- reject_var 'TEXINFOS', "`TEXINFOS' is an anachronism; use `info_TEXINFOS'";
- reject_var 'html_TEXINFOS', "HTML generation not yet supported";
-
- my $info_texinfos = var ('info_TEXINFOS');
- return (0, '') unless $info_texinfos;
-
- my @texis = $info_texinfos->value_as_list_recursive ('all');
-
- my (@info_deps_list, @texi_deps);
- my (@dvis_list, @pdfs_list, @pss_list, @htmls_list);
+ my ($info_texinfos) = @_;
+ my (@infobase, @info_deps_list, @texi_deps);
my %versions;
my $done = 0;
my @texi_cleans;
- my $canonical;
- foreach my $info_cursor (@texis)
+ foreach my $texi ($info_texinfos->value_as_list_recursive ('all'))
{
- my $infobase = $info_cursor;
+ my $infobase = $texi;
$infobase =~ s/\.(txi|texinfo|texi)$//;
- if ($infobase eq $info_cursor)
+ if ($infobase eq $texi)
{
# FIXME: report line number.
- err_am "texinfo file `$info_cursor' has unrecognized extension";
+ err_am "texinfo file `$texi' has unrecognized extension";
next;
}
+ push @infobase, $infobase;
+
# If 'version.texi' is referenced by input file, then include
# automatic versioning capability.
my ($out_file, $vtexi, @clean_files) =
- scan_texinfo_file ("$relative_dir/$info_cursor")
+ scan_texinfo_file ("$relative_dir/$texi")
or next;
push (@texi_cleans, @clean_files);
# resulting info in this subdirectory. If it is in the current
# directory, try hard to not prefix "./" because it breaks the
# generic rules.
- my $outdir = dirname ($info_cursor) . '/';
+ my $outdir = dirname ($texi) . '/';
$outdir = "" if $outdir eq './';
$out_file = $outdir . $out_file;
}
my ($dirstamp, @cfiles) =
- output_texinfo_build_rules ($info_cursor, $out_file, @texi_deps);
+ output_texinfo_build_rules ($texi, $out_file, @texi_deps);
push (@texi_cleans, @cfiles);
push (@info_deps_list, $out_file);
- push (@dvis_list, $infobase . '.dvi');
- push (@pdfs_list, $infobase . '.pdf');
- push (@pss_list, $infobase . '.ps');
- push (@htmls_list, $infobase . '.html');
# If a vers*.texi file is needed, emit the rule.
if ($vtexi)
{
- err_am ("`$vtexi', included in `$info_cursor', "
+ err_am ("`$vtexi', included in `$texi', "
. "also included in `$versions{$vtexi}'")
if defined $versions{$vtexi};
- $versions{$vtexi} = $info_cursor;
+ $versions{$vtexi} = $texi;
# We number the stamp-vti files. This is doable since the
# actual names don't matter much. We only number starting
}
$output_rules .= file_contents ('texi-vers',
new Automake::Location,
- TEXI => $info_cursor,
+ TEXI => $texi,
VTI => $vti,
STAMPVTI => "${outdir}stamp-$vti",
VTEXI => "$outdir$vtexi",
}
define_variable ('am__TEXINFO_TEX_DIR', $texinfodir, INTERNAL);
- # The return value.
- my $texiclean = makefile_wrap ("", "\t ", @texi_cleans);
-
push (@dist_targets, 'dist-info');
if (! defined $options{'no-installinfo'})
}
define_variable ("INFO_DEPS", "@info_deps_list", INTERNAL);
- define_variable ("DVIS", "@dvis_list", INTERNAL);
- define_variable ("PDFS", "@pdfs_list", INTERNAL);
- define_variable ("PSS", "@pss_list", INTERNAL);
- define_variable ("HTMLS", "@htmls_list", INTERNAL);
+ define_files_variable ("DVIS", @infobase, 'dvi', INTERNAL);
+ define_files_variable ("PDFS", @infobase, 'pdf', INTERNAL);
+ define_files_variable ("PSS", @infobase, 'ps', INTERNAL);
+ define_files_variable ("HTMLS", @infobase, 'html', INTERNAL);
+
# This next isn't strictly needed now -- the places that look here
# could easily be changed to look in info_TEXINFOS. But this is
# probably better, in case noinst_TEXINFOS is ever supported.
}
}
- return (1, $texiclean);
+ return makefile_wrap ("", "\t ", @texi_cleans);
}
# Handle all Texinfo source.
sub handle_texinfo ()
{
- my ($do_something, $texiclean) = handle_texinfo_helper ();
+ reject_var 'TEXINFOS', "`TEXINFOS' is an anachronism; use `info_TEXINFOS'";
+ # FIXME: I think this is an obsolete future feature name.
+ reject_var 'html_TEXINFOS', "HTML generation not yet supported";
+
+ my $info_texinfos = var ('info_TEXINFOS');
+ my $texiclean = "";
+ if ($info_texinfos)
+ {
+ $texiclean = handle_texinfo_helper ($info_texinfos);
+ }
$output_rules .= file_contents ('texinfos',
new Automake::Location,
- TEXICLEAN => $texiclean,
- 'LOCAL-TEXIS' => $do_something);
+ TEXICLEAN => $texiclean,
+ 'LOCAL-TEXIS' => !!$info_texinfos);
}
}
+# define_files_variable ($VAR, \@BASENAME, $EXTENSION, $WHERE)
+# -----------------------------------------------------------
+# Define the $VAR which content is the list of file names composed of
+# a @BASENAME and the $EXTENSION.
+sub define_files_variable ($\@$$)
+{
+ my ($var, $basename, $extension, $where) = @_;
+ define_variable ($var,
+ join (' ', map { "$_.$extension" } @$basename),
+ $where);
+}
+
+
# Like define_variable, but define a variable to be the configure
# substitution by the same name.
sub define_configure_variable ($)
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57a for GNU Automake 1.7a.
+# Generated by GNU Autoconf 2.57b for GNU Automake 1.7a.
#
# Report bugs to <bug-automake@gnu.org>.
#
if $ac_init_version; then
cat <<\_ACEOF
GNU Automake configure 1.7a
-generated by GNU Autoconf 2.57a
+generated by GNU Autoconf 2.57b
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Automake $as_me 1.7a, which was
-generated by GNU Autoconf 2.57a. Invocation command line was
+generated by GNU Autoconf 2.57b. Invocation command line was
$ $0 $@
cat >&5 <<_CSEOF
This file was extended by GNU Automake $as_me 1.7a, which was
-generated by GNU Autoconf 2.57a. Invocation command line was
+generated by GNU Autoconf 2.57b. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
GNU Automake config.status 1.7a
-configured by $0, generated by GNU Autoconf 2.57a,
+configured by $0, generated by GNU Autoconf 2.57b,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2003 Free Software Foundation, Inc.
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- ps-recursive html-recursive install-info-recursive \
+RECURSIVE_TARGETS = dvi-recursive html-recursive info-recursive \
+ pdf-recursive ps-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
clean clean-generic clean-recursive ctags ctags-recursive \
distclean distclean-generic distclean-recursive distclean-tags \
- distdir dvi dvi-am dvi-recursive html html-am html-recursive \
- info info-am info-recursive install install-am install-data \
- install-data-am install-data-recursive \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-recursive \
install-dist_perllibDATA install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
- install-info-recursive install-man install-recursive \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am installdirs-recursive maintainer-clean \
+ install-man install-recursive install-strip installcheck \
+ installcheck-am installdirs installdirs-am \
+ installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
- pdf-am pdf-recursive ps ps-am ps-recursive tags tags-recursive \
- uninstall uninstall-am uninstall-dist_perllibDATA \
- uninstall-info-am uninstall-info-recursive uninstall-recursive
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-dist_perllibDATA uninstall-info-am \
+ uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
- ps-recursive html-recursive install-info-recursive \
+RECURSIVE_TARGETS = dvi-recursive html-recursive info-recursive \
+ pdf-recursive ps-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
clean clean-generic clean-recursive ctags ctags-recursive \
distclean distclean-generic distclean-recursive distclean-tags \
- distdir dvi dvi-am dvi-recursive html html-am html-recursive \
- info info-am info-recursive install install-am install-data \
- install-data-am install-data-recursive \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-recursive \
install-dist_pkgvdataDATA install-dist_scriptDATA install-exec \
install-exec-am install-exec-recursive install-info \
- install-info-am install-info-recursive install-man \
- install-recursive install-strip installcheck installcheck-am \
- installcheck-local installdirs installdirs-am \
- installdirs-recursive maintainer-clean \
+ install-info-am install-man install-recursive install-strip \
+ installcheck installcheck-am installcheck-local installdirs \
+ installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
- pdf-am pdf-recursive ps ps-am ps-recursive tags tags-recursive \
- uninstall uninstall-am uninstall-dist_pkgvdataDATA \
- uninstall-dist_scriptDATA uninstall-info-am \
- uninstall-info-recursive uninstall-recursive
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA \
+ uninstall-info-am uninstall-info-recursive uninstall-recursive
install-data-hook:
$(DVIPS) -o $@ $<
endif %?LOCAL-TEXIS%
-.PHONY: info info-am dvi dvi-am pdf pdf-am html html-am
+.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
if %?SUBDIRS%
-RECURSIVE_TARGETS += info-recursive dvi-recursive pdf-recursive ps-recursive
-RECURSIVE_TARGETS += html-recursive
-.PHONY info: info-recursive
-.PHONY dvi: dvi-recursive
-.PHONY pdf: pdf-recursive
-.PHONY ps: ps-recursive
-.PHONY html: html-recursive
+RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
+RECURSIVE_TARGETS += pdf-recursive ps-recursive
+dvi: dvi-recursive
+html: html-recursive
+info: info-recursive
+pdf: pdf-recursive
+ps: ps-recursive
else !%?SUBDIRS%
-info: info-am
dvi: dvi-am
+html: html-am
+info: info-am
pdf: pdf-am
ps: ps-am
-html: html-am
endif !%?SUBDIRS%
if %?LOCAL-TEXIS%
-info-am: $(INFO_DEPS)
dvi-am: $(DVIS)
+html-am: $(HTMLS)
+info-am: $(INFO_DEPS)
pdf-am: $(PDFS)
ps-am: $(PSS)
-html-am: $(HTMLS)
else ! %?LOCAL-TEXIS%
-info-am:
dvi-am:
+html-am:
+info-am:
pdf-am:
ps-am:
-html-am:
endif ! %?LOCAL-TEXIS%
am__installdirs += $(DESTDIR)$(infodir)
install-data-am: install-info-am
endif %?LOCAL-TEXIS%
+.PHONY: install-info
if %?SUBDIRS%
RECURSIVE_TARGETS += install-info-recursive
-.PHONY install-info: install-info-recursive
+install-info: install-info-recursive
else !%?SUBDIRS%
install-info: install-info-am
endif !%?SUBDIRS%
endif %?INSTALL-INFO%
.PHONY: install-info-am
-
if %?LOCAL-TEXIS%
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
## `clean-info' is a target that users can use.
if %?LOCAL-TEXIS%
+.PHONY mostlyclean-am: mostlyclean-aminfo
.PHONY: mostlyclean-aminfo
-mostlyclean-am: mostlyclean-aminfo
mostlyclean-aminfo:
## Use `-rf', not just `-f', because %TEXICLEAN% also contains
## any directory created by `makeinfo --html'.
-rm -rf %TEXICLEAN%
-.PHONY: maintainer-clean-aminfo
-maintainer-clean-am: maintainer-clean-aminfo
+.PHONY maintainer-clean-am: maintainer-clean-aminfo
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
## .iNN files are DJGPP-style info files.