[Dropping texinfo-devel]

On 08/13/2012 10:17 AM, Stefano Lattarini wrote:
> Hi Karl.
> 
> On 08/13/2012 12:25 AM, Karl Berry wrote:
>> Split info files were indeed just about efficiency, especially memory
>> size.
>>
> Thanks for confirming.  Some nice simplifications awaits then, yippy!
>
Here it is (attached).  I will push shortly (or by this evening).

Regards,
  Stefano
>From dd603e21f7ba2410adeab2348aa540947dcffee1 Mon Sep 17 00:00:00 2001
Message-Id: <dd603e21f7ba2410adeab2348aa540947dcffee1.1344865184.git.stefano.lattar...@gmail.com>
From: Stefano Lattarini <[email protected]>
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:
<http://lists.gnu.org/archive/html/automake-ng/2012-08/msg00116.html>
<http://lists.gnu.org/archive/html/texinfo-devel/2012-08/msg00015.html>

* 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 <[email protected]>
---
 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 $@ $@-[0-9] $@-[0-9][0-9]; 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 $@-t $<
+	$(AM_V_at)mv -f $@-t $@
 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

Reply via email to