From eb99d2de045aaf767a550e40fec018bdeaa719b7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 15 May 2001 02:49:51 +0000 Subject: [PATCH] Fix for texinfo10.test. * tests/Makefile.am (XFAIL_TESTS): Remove texinfo10.test. * lib/am/texinfos.am: Use LOCAL-TEXIS liberally. * automake.in (handle_texinfo_helper): New sub. (handle_texinfo): Rewrote. Now defines LOCAL-TEXIS. * tests/texinfo10.test: Added more cases. --- ChangeLog | 7 +++++++ automake.in | 29 +++++++++++++++++++++-------- lib/am/texinfos.am | 26 +++++++++++++++++++++++++- tests/Makefile.am | 2 +- tests/Makefile.in | 31 +++++++++++++------------------ tests/texinfo10.test | 3 +++ 6 files changed, 70 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c10dfa6..cab0b3bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2001-05-14 Tom Tromey + Fix for texinfo10.test. + * tests/Makefile.am (XFAIL_TESTS): Remove texinfo10.test. + * lib/am/texinfos.am: Use LOCAL-TEXIS liberally. + * automake.in (handle_texinfo_helper): New sub. + (handle_texinfo): Rewrote. Now defines LOCAL-TEXIS. + * tests/texinfo10.test: Added more cases. + Fix for yaccvpath.test: * tests/Makefile.am (XFAIL_TESTS): Removed yaccvpath.test. * lib/am/distdir.am (distdir): Always look for file in build diff --git a/automake.in b/automake.in index a1627ff0..370f021f 100755 --- a/automake.in +++ b/automake.in @@ -2789,22 +2789,23 @@ sub scan_texinfo_file } -# handle_texinfo () +# ($DO-SOMETHING, $TEXICLEANS) +# handle_texinfo_helper () # ----------------- -# Handle all Texinfo source. -sub handle_texinfo +# Handle all Texinfo source; helper for handle_texinfo +sub handle_texinfo_helper { &am_line_error ('TEXINFOS', "`TEXINFOS' is an anachronism; use `info_TEXINFOS'") if &variable_defined ('TEXINFOS'); - return if (! &variable_defined ('info_TEXINFOS') - && ! &variable_defined ('html_TEXINFOS')); + return (0, '') if (! &variable_defined ('info_TEXINFOS') + && ! &variable_defined ('html_TEXINFOS')); if (&variable_defined ('html_TEXINFOS')) { &am_line_error ('html_TEXINFOS', "HTML generation not yet supported"); - return; + return (0, ''); } my @texis = &variable_value_as_list ('info_TEXINFOS', 'all'); @@ -2928,9 +2929,8 @@ sub handle_texinfo 'SUFFIX' => $txsfx)); } + # The return value. my $texiclean = &pretty_print_internal ("", "\t ", @texi_cleans); - $output_rules .= &file_contents ('texinfos', - ('TEXICLEAN' => $texiclean)); push (@dist_targets, 'dist-info'); @@ -2964,6 +2964,19 @@ sub handle_texinfo &require_file_with_line ('info_TEXINFOS', $FOREIGN, 'texinfo.tex'); } } + + return (1, $texiclean); +} + +# handle_texinfo () +# ----------------- +# Handle all Texinfo source. +sub handle_texinfo +{ + my ($do_something, $texiclean) = handle_texinfo_helper (); + $output_rules .= &file_contents ('texinfos', + ('TEXICLEAN' => $texiclean, + 'LOCAL-TEXIS' => $do_something)); } # Handle any man pages. diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index cdffb179..f1c74cf2 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -21,6 +21,7 @@ ## Variables. ## ## ----------- ## +if %?LOCAL-TEXIS% if ! %?CYGNUS% MAKEINFO = @MAKEINFO@ TEXI2DVI = texi2dvi @@ -41,15 +42,19 @@ TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \ echo texi2dvi; \ fi` endif %?CYGNUS% +endif %?LOCAL-TEXIS% + ## ---------- ## ## Building. ## ## ---------- ## ## The way to make PostScript, for those who want it. +if %?LOCAL-TEXIS% DVIPS = dvips .dvi.ps: $(DVIPS) $< -o $@ +endif %?LOCAL-TEXIS% .PHONY: info info-am dvi dvi-am if %?SUBDIRS% @@ -61,8 +66,13 @@ info: info-am dvi: dvi-am endif !%?SUBDIRS% +if %?LOCAL-TEXIS% info-am: $(INFO_DEPS) dvi-am: $(DVIS) +else ! %?LOCAL-TEXIS% +info-am: +dvi-am: +endif ! %?LOCAL-TEXIS% ## ------------ ## @@ -79,8 +89,10 @@ dvi-am: $(DVIS) ## TEXINFOS primary are always installed in infodir, hence install-data ## is hard coded. if %?INSTALL-INFO% +if %?LOCAL-TEXIS% _am_installdirs += $(DESTDIR)$(infodir) install-data-am: install-info-am +endif %?LOCAL-TEXIS% if %?SUBDIRS% RECURSIVE_TARGETS += install-info-recursive .PHONY install-info: install-info-recursive @@ -88,6 +100,8 @@ else !%?SUBDIRS% .PHONY install-info: install-info-am endif !%?SUBDIRS% endif %?INSTALL-INFO% + +if %?LOCAL-TEXIS% install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) @@ -123,6 +137,9 @@ install-info-am: $(INFO_DEPS) install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ else : ; fi +else ! %?LOCAL-TEXIS% +install-info-am: +endif ! %?LOCAL-TEXIS% ## -------------- ## @@ -134,6 +151,7 @@ install-info-am: $(INFO_DEPS) ?!SUBDIRS?.PHONY uninstall-info: uninstall-info-am ?INSTALL-INFO?uninstall-am: uninstall-info-am +if %?LOCAL-TEXIS% uninstall-info-am: $(PRE_UNINSTALL) ## Run two loops here so that we can handle PRE_UNINSTALL and @@ -156,7 +174,11 @@ uninstall-info-am: rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \ else :; fi); \ done +else ! %?LOCAL-TEXIS% +uninstall-info-am: +endif ! %?LOCAL-TEXIS% +if %?LOCAL-TEXIS% .PHONY: dist-info dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ @@ -170,7 +192,7 @@ dist-info: $(INFO_DEPS) || cp -p $$d/$$file $(distdir)/$$file; \ done; \ done - +endif %?LOCAL-TEXIS% ## ---------- ## @@ -180,6 +202,7 @@ dist-info: $(INFO_DEPS) ## The funny name is due to --cygnus influence; in Cygnus mode, ## `clean-info' is a target that users can use. +if %?LOCAL-TEXIS% .PHONY: mostlyclean-aminfo mostlyclean-am: mostlyclean-aminfo mostlyclean-aminfo: @@ -199,3 +222,4 @@ maintainer-clean-aminfo: ?CYGNUS?.PHONY: clean-info ?CYGNUS?clean-info: mostlyclean-aminfo +endif %?LOCAL-TEXIS% diff --git a/tests/Makefile.am b/tests/Makefile.am index 7fcbc0de..2232fcbf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = gnits -XFAIL_TESTS = texinfo10.test subdir5.test +XFAIL_TESTS = subdir5.test TESTS = \ acinclude.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 63537a2a..990c5585 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -13,7 +13,6 @@ @SET_MAKE@ - SHELL = @SHELL@ srcdir = @srcdir@ @@ -34,11 +33,9 @@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include - pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ - top_builddir = .. ACLOCAL = @ACLOCAL@ @@ -52,7 +49,6 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ - NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : @@ -74,7 +70,7 @@ install_sh = @install_sh@ AUTOMAKE_OPTIONS = gnits -XFAIL_TESTS = texinfo10.test subdir5.test +XFAIL_TESTS = subdir5.test TESTS = \ acinclude.test \ @@ -378,15 +374,14 @@ DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: - $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnits tests/Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && \ CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status +uninstall-info-am: tags: TAGS TAGS: @@ -483,11 +478,9 @@ install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am - install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install - mostlyclean-generic: clean-generic: @@ -508,11 +501,11 @@ distclean: distclean-am distclean-am: clean-am distclean-generic distclean-local -dvi: +dvi: dvi-am dvi-am: -info: +info: info-am info-am: @@ -520,7 +513,7 @@ install-data-am: install-exec-am: -install-info: +install-info: install-info-am install-man: @@ -534,20 +527,22 @@ mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic -uninstall-am: +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-am .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic distclean-local distdir dvi dvi-am \ info info-am install install-am install-data install-data-am \ - install-exec install-exec-am install-info install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic uninstall uninstall-am + install-exec install-exec-am install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic uninstall uninstall-am \ + uninstall-info-am distclean-local: -rm -rf testSubDir - # 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. .NOEXPORT: diff --git a/tests/texinfo10.test b/tests/texinfo10.test index 80ebf8a1..f93edbce 100755 --- a/tests/texinfo10.test +++ b/tests/texinfo10.test @@ -20,3 +20,6 @@ echo '@setfilename maude.info' > sub/maude.texi $AUTOMAKE || exit 1 grep dvi-recursive Makefile.in +grep '[^-]info-recursive' Makefile.in +grep '[^n]install-info-recursive' Makefile.in +grep uninstall-info-recursive Makefile.in -- 2.43.5