• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Mercurial Queues Emulation for Git


Commit MetaInfo

修訂053bd84260104ac597d2f97b1b0dba0145419fe5 (tree)
時間2019-06-26 14:47:51
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Automate publication of documentation in optional formats.

* Makefile.in (pdf, all-pdf, install-pdf): Define new rules; these
format the man-pages, and store them as publication-ready PDF files.
(ps, all-ps, install-ps): Likewise, storing as PostScript files.
(dvi, all-dvi, install-dvi, html, all-html, install-html)
(info, all-info, install-info): Decline to publish.

Change Summary

差異

--- a/Makefile.in
+++ b/Makefile.in
@@ -156,6 +156,7 @@ ${bindir} ${package_hooksdir} ${package_libexecdir} ${man1dir}:
156156 $(MKDIR_P) $@
157157
158158 INSTALL := @INSTALL@
159+INSTALL_DATA := @INSTALL_DATA@
159160 install: installdirs install-bin-scripts install-libexec-scripts
160161
161162 INSTALL_SCRIPTS = for script in $1; do $(call DO_INSTALL,$2 $$script,$3); done
@@ -228,6 +229,52 @@ manpage_installer_script = sed \
228229 manpage_template_subst = 's/@$1@/$($(if $2,$2,$1))/'
229230
230231
232+# Documentation
233+# =============
234+#
235+# Man-page documentation is required, to support "git help";
236+# it is automatically provided when the package is installed.
237+# The following will deliver copies of this documentation, in
238+# optional PostScript and PDF formats, as built by invoking
239+# GNU standard "ps", "install-ps", "pdf", and "install-pdf"
240+# make objectives.
241+#
242+.PHONY: pdf install-pdf ps install-ps
243+PACKAGE_DOCDIR := @docdir@/$(PACKAGE_VERSION)
244+
245+all_manpages := $(notdir $(wildcard ${srcdir}/man/*.man))
246+all-pdf-internal all-ps-internal: all-%-internal: $(all_manpages:.man=.%)
247+
248+pdf ps: %: all-%
249+all-pdf all-ps: all-%: ${CURDIR}/tmp/share/man/man1/timestamp
250+ $(QUIET_MAKE) all-$*-internal prefix=${CURDIR}/tmp
251+
252+install-pdf install-ps: install-%: $(all_manpages:.man=.%)
253+ $(MKDIR_P) ${PACKAGE_DOCDIR}/$*
254+ $(INSTALL_DATA) $^ ${PACKAGE_DOCDIR}/$*
255+
256+${CURDIR}/tmp/share/man/man1/timestamp: configure
257+ rm -rf $(dir $@) && $(MKDIR_P) $(dir $@) && > $@
258+
259+%.1: %.1.man ${CURDIR}/tmp/share/man/man1/timestamp
260+ $(QUIET_MAKE) ${CURDIR}/tmp/share/man/man1/$@ prefix=${CURDIR}/tmp
261+ rm -f $@; ln ${CURDIR}/tmp/share/man/man1/$@ $@
262+
263+%.1.pdf: %.1
264+ MANPATH=${CURDIR}/tmp/share/man man -t $* | ps2pdf - $@
265+
266+%.1.ps: %.1
267+ MANPATH=${CURDIR}/tmp/share/man man -t $* > $@
268+
269+# OTOH, we simply decline to support the other GNU standard
270+# documentation formats, namely "info", "dvi", and "html".
271+#
272+dvi html info: %: all-%
273+all-dvi all-html all-info: all-%: install-%
274+install-dvi install-html install-info: install-%:
275+ $(error "Sorry: '$*' documentation is unsupported for this package!")
276+
277+
231278 # Distribution
232279 # ============
233280 #
@@ -264,7 +311,6 @@ bindist: $(PACKAGE_TMPDIR)
264311 cd $^; tar cf - * | xz -c > ../$(PACKAGE_DISTNAME)-bin.tar.xz
265312 rm -rf $(PACKAGE_TMPDIR)
266313
267-PACKAGE_DOCDIR := @docdir@/$(PACKAGE_VERSION)
268314 bindist-licence: LICENCE FDL-1.3
269315 $(MKDIR_P) ${PACKAGE_DOCDIR}
270316 $(call INSTALL_SCRIPTS,$^,-m 644,${PACKAGE_DOCDIR})