]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
maint: include versioned manual in update
authorMike Frysinger <vapier@gentoo.org>
Mon, 31 Jan 2022 07:30:11 +0000 (02:30 -0500)
committerMike Frysinger <vapier@gentoo.org>
Tue, 1 Feb 2022 02:47:07 +0000 (21:47 -0500)
When publishing the updated manual, include the versioned copy too,
and have their index.html link to the full version index.

* maintainer/maint.mk: Copy manual to manual/$(VERSION)/, and insert
index-full.html link into index.html.

maintainer/maint.mk

index 7303a05cf913df303c5b421eb5cd647f1b0ac430..0512467cbc822f56805625458a7eff13f78e08a6 100644 (file)
@@ -386,6 +386,11 @@ export CVS_RSH
 .PHONY: web-manual web-manual-update
 web-manual web-manual-update: t = $@.dir
 
+MANUAL_VERSION_HTML = \
+       <p>See the <a href="index-full.html">full version index</a> for the manual for other releases of Automake.</p>
+MANUAL_VERSION_HTML_PARENT = \
+       <p>See the <a href="../index-full.html">full version index</a> for the manual for other releases of Automake.</p>
+
 # Build manual in several formats.  Note to the recipe:
 # 1. The symlinking of automake.texi into the temporary directory is
 #    required to pacify extra checks from gendocs.sh.
@@ -424,14 +429,20 @@ web-manual-update:
        $(AM_V_at)mkdir $t
        $(AM_V_at)cd $t \
          && $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \
-                   co $(PACKAGE)/manual
+                   co -l $(PACKAGE)/manual \
+         && cd $(PACKAGE)/manual \
+         && $(CVS) up html_node
        @# According to the rsync manpage, "a trailing slash on the
        @# source [...] avoids creating an additional directory
        @# level at the destination".  So the trailing '/' after
        @# '$(web_manual_dir)' below is intended.
        $(AM_V_at)$(RSYNC) -avP $(web_manual_dir)/ $t/$(PACKAGE)/manual
+       $(AM_V_at)sed -i '/This page generated by the/i$(MANUAL_VERSION_HTML)\n' $t/$(PACKAGE)/manual/index.html
+       $(AM_V_at)$(RSYNC) -avP $(web_manual_dir)/ $t/$(PACKAGE)/manual/$(VERSION)
+       $(AM_V_at)sed -i '/This page generated by the/i$(MANUAL_VERSION_HTML_PARENT)\n' $t/$(PACKAGE)/manual/$(VERSION)/index.html
        $(AM_V_GEN): \
          && cd $t/$(PACKAGE)/manual \
+         && $(CVS) add $(VERSION) $(VERSION)/*/ \
          && new_files=`$(CVSU) --types='?'` \
          && new_files=`echo "$$new_files" | sed s/^..//` \
          && { test -z "$$new_files" || $(CVS) add -ko $$new_files; } \