public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Subject: [PATCH 7/8] winsup/doc: Make and install manpages for utils
Date: Mon, 15 Jun 2015 12:37:00 -0000	[thread overview]
Message-ID: <1434371793-3980-8-git-send-email-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <1434371793-3980-1-git-send-email-jon.turney@dronecode.org.uk>

Use 'xmlto man' to make manpages for utils
(docbook2x-man could also be used, but since we already use xmlto...)

This will generate multiple .1 files as an output, but we don't know what they
will be called, so use a timestamp file for build avoidance when the
dependencies haven't changed.

2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>

	* Makefile.in (install-man, utils2man.stamp): Add rules to build
	and install manpages for utils.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog   |  5 +++++
 winsup/doc/Makefile.in | 18 +++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 7d33752..341374f 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,10 @@
 2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* Makefile.in (install-man, utils2man.stamp): Add rules to build
+	and install manpages for utils.
+
+2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* xidepend: Write a Makefile fragment defining variables
 	containing all the XIncluded sources, rather than a dependency on
 	those sources.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 79a050a..bb2ad36 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -16,6 +16,8 @@ prefix:=@prefix@
 datarootdir:=@datarootdir@
 docdir = @docdir@
 htmldir = @htmldir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
 
 override INSTALL:=@INSTALL@
 override INSTALL_DATA:=@INSTALL_DATA@
@@ -37,7 +39,7 @@ FAQ_SOURCES:= $(wildcard $(srcdir)/faq*.xml)
 .html.body:
 	$(srcdir)/bodysnatcher.pl $<
 
-.PHONY: all clean install install-all install-pdf install-html
+.PHONY: all clean install install-all install-pdf install-html install-man
 
 all: Makefile Makefile.dep \
 	cygwin-ug-net/cygwin-ug-net.html \
@@ -45,7 +47,8 @@ all: Makefile Makefile.dep \
 	cygwin-api/cygwin-api.html \
 	faq/faq.body faq/faq.html \
 	cygwin-ug-net/cygwin-ug-net.pdf \
-	cygwin-api/cygwin-api.pdf
+	cygwin-api/cygwin-api.pdf \
+	utils2man.stamp
 
 Makefile: $(srcdir)/Makefile.in
 	/bin/sh ./config.status
@@ -54,10 +57,11 @@ clean:
 	rm -f Makefile.dep
 	rm -f *.html *.html.gz
 	rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
+	rm -f *.1 utils2man.stamp
 
 install: install-all
 
-install-all: install-pdf install-html
+install-all: install-pdf install-html install-man
 
 install-pdf: cygwin-ug-net/cygwin-ug-net.pdf cygwin-api/cygwin-api.pdf
 	@$(MKDIRP) $(DESTDIR)$(docdir)
@@ -71,6 +75,10 @@ install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
 	$(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
 	$(INSTALL_DATA) cygwin-api/cygwin-api.html $(DESTDIR)$(htmldir)/cygwin-api/index.html
 
+install-man: utils2man.stamp
+	@$(MKDIRP) $(DESTDIR)$(man1dir)
+	$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
+
 cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) cygwin.xsl
 	-$(XMLTO) html-nochunks -m $(srcdir)/cygwin.xsl $<
 	-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
@@ -83,6 +91,10 @@ cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) cygwin.xsl
 cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<
 
+utils2man.stamp: $(cygwin-ug-net_SOURCES)
+	$(XMLTO) man $<
+	@touch $@
+
 cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) cygwin.xsl
 	-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
 
-- 
2.1.4

  parent reply	other threads:[~2015-06-15 12:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 12:36 [PATCH 0/8] Generate utilities manpages Jon TURNEY
2015-06-15 12:37 ` [PATCH 2/8] winsup/doc: Fix xidepend to handle relative pathnames Jon TURNEY
2015-06-15 17:02   ` Corinna Vinschen
2015-06-15 12:37 ` Jon TURNEY [this message]
2015-06-15 18:12   ` [PATCH 7/8] winsup/doc: Make and install manpages for utils Corinna Vinschen
2015-06-15 12:37 ` [PATCH 6/8] winsup/doc: Make it easier to extend xidepend to more targets Jon TURNEY
2015-06-15 17:15   ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 5/8] winsup/doc: Convert utils.xml to using refentry Jon TURNEY
2015-06-15 17:11   ` Corinna Vinschen
2015-06-16  9:28     ` Jon TURNEY
2015-06-16  9:45       ` Corinna Vinschen
2015-06-16 11:09         ` Jon TURNEY
2015-06-16 12:49           ` Corinna Vinschen
2015-06-16 17:33             ` Jon TURNEY
2015-06-16 17:49               ` Corinna Vinschen
2015-06-16 18:50                 ` Jon TURNEY
2015-06-16 19:17                   ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 3/8] winsup/doc: Some preparatory XML fixes Jon TURNEY
2015-06-15 17:04   ` Corinna Vinschen
2015-06-16  9:22     ` Jon TURNEY
2015-06-16  9:35       ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 4/8] winsup/doc: Use fo.xsl to customize PDF generation from DocBook XML Jon TURNEY
2015-06-15 17:05   ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 8/8] winsup/doc: Fix an issue with parallel make Jon TURNEY
2015-06-15 17:16   ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 1/8] winsup/doc: Remove tarball target from .PHONY Jon TURNEY
2015-06-15 16:52   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434371793-3980-8-git-send-email-jon.turney@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).