]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] texinfo: don't support split info files anymore
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Aug 2012 13:00:34 +0000 (15:00 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Aug 2012 13:30:00 +0000 (15:30 +0200)
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 <stefano.lattarini@gmail.com>
lib/am/texibuild.mk
lib/am/texinfos.mk
t/txinfo20.sh

index 86ae249fce9025270ec471f91c9d1e335322a435..51431421a085610b4a511e3373806d52aad753a3 100644 (file)
@@ -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
index 64d10eba1fdef7abfc11370fec052b4946a88bf9..2c99cd94dcb45edc1da905593fffcced8982875a 100644 (file)
@@ -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
index 6faba384933295c685973a37a9eaa3a11a23b9f5..0de50ea40f3d6e746160079785628d756cff396b 100755 (executable)
@@ -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
 
 :