From: Andrew Cooper Subject: [Patch] docs/Makefile: Split the install target Date: Fri, 3 Jan 2014 22:26:09 +0000 Message-ID: <1388787969-24576-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: George Dunlap , Andrew Cooper , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Split the current install target into two subtargets, install-man-pages and install-html, with the main install target depending on both. This helps packagers who want the man pages to put in appropriate rpms/debs, but don't want to build the html developer docs. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: George Dunlap --- I am slightly dubious as to the behaviour of rm-rf'ing the DOCDIR, but the behaviour is left exactly as before, for sake-of-mind when reviewing. I would like this to be taken for 4.4, as I have fallen over it yet again when packing 4.4-rc1 for testing in XenServer. Unlike some of my other fixes to the Xen build system, this is trivial to fix correctly upstream, and will benefit everyone trying to package 4.4 for distros. --- docs/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 8d5d48e..e4bf28c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -78,16 +78,21 @@ distclean: clean rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \ autom4te.cache -.PHONY: install -install: all - rm -rf $(DESTDIR)$(DOCDIR) - $(INSTALL_DIR) $(DESTDIR)$(DOCDIR) - +.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 + rm -rf $(DESTDIR)$(DOCDIR) + $(INSTALL_DIR) $(DESTDIR)$(DOCDIR) [ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR) +.PHONY: install +install: install-man-pages install-html + html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX $(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML) -- 1.7.10.4