xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: [DOCSDAY PATCH for-4.6] docs: Fix installation of man8 pages
Date: Thu, 27 Aug 2015 20:13:16 +0100	[thread overview]
Message-ID: <1440702796-3325-1-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <21983.21430.211094.1937@mariner.uk.xensource.com>

c/s a430436 "docs: Support for generating man(8) pages" accidentally
failed to update to the install and clean rules for man8 pages, meaning
that c/s 7b21214 "docs: Move xentrace.8 to docs/man/xentrace.pod.8"
caused a packaging regression when it came to xentop.8

To avoid similar bugs in the future, move the generation of the build,
install and clean rules into the manpage metarule.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 docs/Makefile |   35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index 3d77913..d25e6c7 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -58,20 +58,15 @@ else
 	@echo "fig2dev (transfig) not installed; skipping figs."
 endif
 
-.PHONY: man-pages
-man-pages: $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN8)
-
 .PHONY: pdf
 pdf: $(DOC_PDF)
 
 .PHONY: clean
-clean:
+clean: clean-man-pages
 	$(MAKE) -C figs clean
 	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
 	rm -rf *.ilg *.log *.ind *.toc *.bak *.tmp core
 	rm -rf html txt pdf
-	rm -rf man5
-	rm -rf man1
 
 .PHONY: distclean
 distclean: clean
@@ -80,6 +75,8 @@ distclean: clean
 
 # Top level install targets
 
+.PHONY: man-pages install-man-pages clean-man-pages
+
 # Metarules for generating manpages.  Run with $(1) substitued for section
 define GENERATE_MANPAGE_RULES
 
@@ -110,17 +107,31 @@ else
 	@echo "pod2text not installed; skipping $$@"
 endif
 
+# Build
+.PHONY: man$(1)-pages
+man$(1)-pages: $$(DOC_MAN$(1))
+
+# Install
+.PHONY: install-man$(1)-pages
+install-man$(1)-pages: man$(1)-pages
+	$(INSTALL_DIR) $(DESTDIR)$(mandir)
+	cp -r man$(1) $(DESTDIR)$(mandir)
+
+# Clean
+.PHONY: clean-man$(1)-pages
+clean-man$(1)-pages:
+	rm -rf man$(1)
+
+# Link buld/install/clean to toplevel rules
+man-pages: man$(1)-pages
+install-man-pages: install-man$(1)-pages
+clean-man-pages: clean-man$(1)-pages
+
 endef
 
 # Generate manpage rules for each section
 $(foreach i,1 5 8,$(eval $(call GENERATE_MANPAGE_RULES,$(i))))
 
-.PHONY: install-man-pages
-install-man-pages: man-pages
-	$(INSTALL_DIR) $(DESTDIR)$(mandir)
-	cp -R man1 $(DESTDIR)$(mandir)
-	cp -R man5 $(DESTDIR)$(mandir)
-
 .PHONY: install-html
 install-html: html txt figs
 	$(INSTALL_DIR) $(DESTDIR)$(docdir)
-- 
1.7.10.4

  reply	other threads:[~2015-08-27 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26  9:09 [DOCS DAY] [PATCH for-4.6 0/5] Cleanup of docs spread throughout the tree Andrew Cooper
2015-08-26  9:09 ` [PATCH for-4.6 1/5] docs: Move misc README's into docs/misc/ Andrew Cooper
2015-08-26  9:09 ` [PATCH for-4.6 2/5] docs: Move xentop.1 to docs/man/xentop.pod.1 Andrew Cooper
2015-08-26  9:09 ` [PATCH for-4.6 3/5] docs: Move xentrace_format.1 to docs/man/xentrace_format.pod.1 Andrew Cooper
2015-08-26  9:09 ` [PATCH for-4.6 4/5] docs: Support for generating man(8) pages Andrew Cooper
2015-08-26  9:09 ` [PATCH for-4.6 5/5] docs: Move xentrace.8 to docs/man/xentrace.pod.8 Andrew Cooper
2015-08-26 14:54 ` [DOCS DAY] [PATCH for-4.6 0/5] Cleanup of docs spread throughout the tree Wei Liu
2015-08-27 18:15   ` Ian Jackson
2015-08-27 19:13     ` Andrew Cooper [this message]
2015-08-28  9:50       ` [DOCSDAY PATCH for-4.6] docs: Fix installation of man8 pages Ian Jackson

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=1440702796-3325-1-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 NNTP newsgroup(s).