>From dd603e21f7ba2410adeab2348aa540947dcffee1 Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Mon, 13 Aug 2012 15:00:34 +0200 Subject: [PATCH] [ng] texinfo: don't support split info files anymore They were once required for performance or memory-saving reasons; but such considerations, while certainly relevant in the past, will, thanks to today's powerful machines, get less and less important in the future, shrinking to irrelevance soon enough ("soon" for what concerns the Automake-NG timetable, at least). So, since the need to cater to split '.info' output files adds some annoying complexity in some places of the Automake-NG codebase, we simply stop supporting them. This change should actually be almost transparent to the users. References: * lib/am/texinfos.mk (.am/install-info, uninstall-info-am, dist-info, am.clean.maint.f): Simplify moderately. * lib/am/texibuild.mk (am.texi.build.info): Simplify greatly. * t/txinfo20.sh: Adjust. Signed-off-by: Stefano Lattarini --- lib/am/texibuild.mk | 36 +++++------------------------------- lib/am/texinfos.mk | 14 ++++---------- t/txinfo20.sh | 7 ------- 3 files changed, 9 insertions(+), 48 deletions(-) diff --git a/lib/am/texibuild.mk b/lib/am/texibuild.mk index 86ae249..5143142 100644 --- a/lib/am/texibuild.mk +++ b/lib/am/texibuild.mk @@ -43,37 +43,11 @@ endef define am.texi.build.info $(if $1,,$(AM_V_at)$(am.cmd.ensure-target-dir-exists)) -## Back up the info files before running makeinfo. This is the cheapest -## way to ensure that -## 1) If the texinfo file shrinks (or if you start using --no-split), -## you'll not be left with some dead info files lying around -- dead -## files which would end up in the distribution. -## 2) If the texinfo file has some minor mistakes which cause makeinfo -## to fail, the info files are not removed. (They are needed by the -## developer while he writes documentation.) - $(AM_V_MAKEINFO)restore=: && backupdir=.am$$$$ && \ - $(if $1,cd $(srcdir) &&) \ - rm -rf $$backupdir && mkdir $$backupdir && \ -## If makeinfo is not installed we must not backup the files so -## 'missing' can do its job and touch $@ if it exists. - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ address@hidden address@hidden; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - $(if $(am.texi.info-in-srcdir),cd '$(CURDIR)' &&) \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ - -I $(@D) -I $(srcdir)/$(@D) -o $@ $<; \ - then \ - rc=0; \ - $(if $(am.texi.info-in-srcdir),cd $(srcdir) || exit 1;) \ - else \ - rc=$$?; \ -## Beware that backup info files might come from a subdirectory. - $(if $(am.texi.info-in-srcdir),cd $(srcdir) &&) \ - $$restore $$backupdir/* $(@D) || exit 1; \ - fi; \ - rm -rf $$backupdir; exit $$rc +## If the texinfo file has some minor mistakes which cause makeinfo +## to fail, the info files are not removed. + $(AM_V_MAKEINFO)$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ + --no-split -I $(@D) -I $(srcdir)/$(@D) -o address@hidden $< + $(AM_V_at)mv -f address@hidden $@ endef define am.texi.build.html diff --git a/lib/am/texinfos.mk b/lib/am/texinfos.mk index 64d10eb..2c99cd9 100644 --- a/lib/am/texinfos.mk +++ b/lib/am/texinfos.mk @@ -159,11 +159,7 @@ install-html-am: .am/install-html @$(NORMAL_INSTALL) $(call am.texi.create-installdir,$(infodir)) @list='$(and $(infodir),$^)'; test -n "$$list" || exit 0; \ - for file in $$list; do \ - for ifile in $$file $$file-[0-9] $$file-[0-9][0-9]; do \ - test ! -f $$ifile || echo "$$ifile"; \ - done; \ - done | $(am__base_list) | \ + for p in $$list; do echo "$$p"; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; \ @@ -267,15 +263,13 @@ uninstall-info-am: done; \ else :; fi @$(NORMAL_UNINSTALL) - $(call am.uninst.cmd,$(infodir),\ - $(foreach i,$(notdir $(INFO_DEPS)),$i $i-[0-9] $i-[0-9][0-9])) + $(call am.uninst.cmd,$(infodir),$(notdir $(INFO_DEPS))) .PHONY: dist-info dist-info: $(INFO_DEPS) - @$(foreach f,$(foreach x,$^,$(wildcard $x $x-[0-9] $x-[0-9][0-9])), \ - cp -p $f $(distdir)/$(patsubst $(srcdir)/%,%,$f);) + @$(foreach f,$^,cp -p $f $(distdir)/$(patsubst $(srcdir)/%,%,$f);) -am.clean.maint.f += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9]) +am.clean.maint.f += $(INFO_DEPS) endif # !info_TEXINFOS diff --git a/t/txinfo20.sh b/t/txinfo20.sh index 6faba38..0de50ea 100755 --- a/t/txinfo20.sh +++ b/t/txinfo20.sh @@ -45,10 +45,6 @@ $AUTOCONF ./configure $MAKE -# Feign more info files. -: > main.info-1 -: > sub/main.info-1 - # Break main.texi. $sleep cp main.texi main.old @@ -64,15 +60,12 @@ END # makeinfo will bail out, but we should conserve the old info files. $MAKE && exit 1 test -f main.info -test -f main.info-1 # Restore main.texi, and break sub/main.texi. cp main.texi sub/main.texi mv main.old main.texi $MAKE && exit 1 test -f main.info -test ! -e main.info-1 test -f sub/main.info -test -f sub/main.info-1 : -- 1.7.12.rc0.129.g61b472e