+2009-04-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Do not remove texinfo outputs upon mostlyclean.
+ * lib/am/texinfos.am: New substitutions %MOSTLYCLEAN%,
+ %MAINTCLEAN%.
+ (clean-aminfo): New target, remove %TEXICLEAN% if nonemtpy,
+ declare phony. Hook this target to ...
+ (clean-am): ... this and ...
+ (?CYGNUS?clean-info): ... this.
+ (maintainer-clean-aminfo): Remove %MAINTCLEAN% if nonempty,
+ for later.
+ (mostlyclean-aminfo): Remove %MOSTLYCLEAN%.
+ * automake.in (handle_texinfo_helper): Return three arrays
+ $MOSTLYCLEAN, $TEXICLEAN, $MAINTCLEAN, instead of one array.
+ Only put LaTeX helper files in $MOSTLYCLEAN, the rest in
+ $TEXICLEAN for now.
+ (handle_texinfo): Accept these, chop off extra newline, and
+ substitute them in `texinfos.am'.
+ * NEWS: Update.
+ * tests/txinfo33.test: New test.
+ * tests/Makefile.am: Update.
+ Report by Bruno Haible.
+
2009-04-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
testsuite: unset TESTS, TEST_LOGS, to avoid interference.
to the rules.
+Bugs fixed in 1.10c:
+
+* Long standing bugs:
+
+ - Texinfo dvi, ps, pdf, and html output files are not removed upon
+ `make mostlyclean' any more; only the LaTeX by-products are.
+
\f
New in 1.10b:
}
-# $TEXICLEANS
+# ($MOSTLYCLEAN, $TEXICLEAN, $MAINTCLEAN)
# handle_texinfo_helper ($info_texinfos)
# --------------------------------------
# Handle all Texinfo source; helper for handle_texinfo.
my (@infobase, @info_deps_list, @texi_deps);
my %versions;
my $done = 0;
- my @texi_cleans;
+ my (@mostly_cleans, @texi_cleans, @maint_cleans) = ('', '', '');
# Build a regex matching user-cleaned files.
my $d = var 'DISTCLEANFILES';
my ($out_file, $vtexi, @clean_files) =
scan_texinfo_file ("$relative_dir/$texi")
or next;
- push (@texi_cleans, @clean_files);
+ push (@mostly_cleans, @clean_files);
# If the Texinfo source is in a subdirectory, create the
# resulting info in this subdirectory. If it is in the current
}
}
- return makefile_wrap ("", "\t ", @texi_cleans);
+ return (makefile_wrap ("", "\t ", @mostly_cleans),
+ makefile_wrap ("", "\t ", @texi_cleans),
+ makefile_wrap ("", "\t ", @maint_cleans));
}
reject_var 'html_TEXINFOS', "HTML generation not yet supported";
my $info_texinfos = var ('info_TEXINFOS');
- my $texiclean = "";
+ my ($mostlyclean, $clean, $maintclean) = ('', '', '');
if ($info_texinfos)
{
- $texiclean = handle_texinfo_helper ($info_texinfos);
+ ($mostlyclean, $clean, $maintclean) = handle_texinfo_helper ($info_texinfos);
+ chomp $mostlyclean;
+ chomp $clean;
+ chomp $maintclean;
}
+
$output_rules .= file_contents ('texinfos',
new Automake::Location,
- TEXICLEAN => $texiclean,
+ MOSTLYCLEAN => $mostlyclean,
+ TEXICLEAN => $clean,
+ MAINTCLEAN => $maintclean,
'LOCAL-TEXIS' => !!$info_texinfos);
}
automake.fn automake.fns automake.ky automake.kys \
automake.log automake.op automake.pg automake.pgs \
automake.tmp automake.toc automake.tp automake.tps \
- automake.tr automake.vr automake.vrs automake.dvi \
- automake.pdf automake.ps automake.html
+ automake.tr automake.vr automake.vrs
+
+clean-aminfo:
+ -test -z "automake.dvi automake.pdf automake.ps automake.html" \
+ || rm -rf automake.dvi automake.pdf automake.ps automake.html
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-aminfo clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- ctags dist-info distclean distclean-generic distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dist_docDATA \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-vti mostlyclean \
- mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
- pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \
- uninstall-info-am uninstall-man uninstall-man1 \
- uninstall-pdf-am uninstall-ps-am
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-aminfo \
+ clean-generic ctags dist-info distclean distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-man1 install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic \
+ maintainer-clean-vti mostlyclean mostlyclean-aminfo \
+ mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am tags \
+ uninstall uninstall-am uninstall-dist_docDATA uninstall-dvi-am \
+ uninstall-html-am uninstall-info-am uninstall-man \
+ uninstall-man1 uninstall-pdf-am uninstall-ps-am
$(dist_man1_MANS): $(top_srcdir)/configure.ac
$(srcdir)/aclocal.1 $(srcdir)/automake.1:
.PHONY mostlyclean-am: mostlyclean-aminfo
.PHONY: mostlyclean-aminfo
mostlyclean-aminfo:
-## Use `-rf', not just `-f', because %TEXICLEAN% also contains
-## any directory created by `makeinfo --html'.
- -rm -rf %TEXICLEAN%
+## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
+## contain any directory created by `makeinfo --html'.
+ -rm -rf %MOSTLYCLEAN%
+
+.PHONY clean-am: clean-aminfo
+clean-aminfo:
+## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
+## contain any directory created by `makeinfo --html'.
+?TEXICLEAN? -test -z "%TEXICLEAN%" \
+?TEXICLEAN? || rm -rf %TEXICLEAN%
.PHONY maintainer-clean-am: maintainer-clean-aminfo
maintainer-clean-aminfo:
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
+## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
+## contain any directory created by `makeinfo --html'.
+?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
+?MAINTCLEAN? || rm -rf %MAINTCLEAN%
?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo
+?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
endif %?LOCAL-TEXIS%
txinfo30.test \
txinfo31.test \
txinfo32.test \
+txinfo33.test \
transform.test \
transform2.test \
unused.test \
txinfo30.test \
txinfo31.test \
txinfo32.test \
+txinfo33.test \
transform.test \
transform2.test \
unused.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# DVIS, PDFS, PSS, HTMLS should not be cleaned upon `mostlyclean'.
+# Similar to txinfo25.test.
+
+required='makeinfo tex texi2dvi-o dvips'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi other.texi sub/another.texi
+END
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+cat > other.texi << 'END'
+\input texinfo
+@setfilename other.info
+@settitle other
+@node Top
+Hello walls.
+@include version2.texi
+@bye
+END
+
+cat > sub/another.texi << 'END'
+\input texinfo
+@setfilename another.info
+@settitle another
+@node Top
+Hello walls.
+@include version3.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# In-tree build.
+./configure
+$MAKE dvi ps pdf html
+
+test -f main.dvi
+test -f main.ps
+test -f main.html || test -d main.html
+test -f main.pdf
+test -f other.pdf
+test -f sub/another.pdf
+
+test -f other.dvi
+test -f other.html || test -d other.html
+test -f other.ps
+test -f sub/another.dvi
+test -f sub/another.html || test -d sub/another.html
+test -f sub/another.ps
+
+$MAKE mostlyclean
+
+ls *.aux && Exit 1
+ls sub/*.aux && Exit 1
+
+test -f main.dvi
+test -f main.ps
+test -f main.html || test -d main.html
+test -f main.pdf
+test -f other.pdf
+test -f sub/another.pdf
+
+test -f other.dvi
+test -f other.html || test -d other.html
+test -f other.ps
+test -f sub/another.dvi
+test -f sub/another.html || test -d sub/another.html
+test -f sub/another.ps
+
+$MAKE clean
+
+test ! -f main.dvi
+test ! -f main.ps
+test ! -f main.html && test ! -d main.html
+test ! -f main.pdf
+test ! -f other.pdf
+test ! -f sub/another.pdf
+test ! -f sub/yetanother.pdf
+
+test ! -f other.dvi
+test ! -f other.html && test ! -d other.html
+test ! -f other.ps
+test ! -f sub/another.dvi
+test ! -f sub/another.html && test ! -d sub/another.html
+test ! -f sub/another.ps
+
+./configure
+$MAKE
+
+$MAKE distcheck
+
+: