From b8301917ec55e6999002864354a5f3ccc721bf6d Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 13 Jan 2006 12:42:14 +0100 Subject: [PATCH] Add install-doc rule --- doc/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/Makefile b/doc/Makefile index 43b164554..910575279 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -6,6 +6,12 @@ SUBDIRS = man # A little trick to simplify some of the rules. VPATH = $(builddir):$(srcdir):$(top_srcdir)/contrib/perl +docdir = $(datadir)/doc + +# Used by install-doc +HTML_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/html +PDF_DIR = $(DESTDIR)$(docdir)/$(PACKAGE)/pdf + ############################################################################# # Build files @@ -54,6 +60,19 @@ man: txt $(MAN_DOCS) all-docs: man html pdf +install-doc: all-docs install + $(foreach doc,$(HTML_DOCS), \ + if test -d $(doc); then \ + $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html/$(doc); \ + $(call ncmd,installdata,$(doc)/*,$(HTML_DIR)/$(doc)); \ + else \ + $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/html; \ + $(call ncmd,installdata,$(doc),$(HTML_DIR)); \ + fi;) + $(foreach doc,$(PDF_DOCS), \ + $(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(PACKAGE)/pdf; \ + $(call ncmd,installdata,$(doc),$(PDF_DIR);)) + update-man: man $(call cmd,installdata,elinks.1,man/man1/elinks.1.in) $(call cmd,installdata,elinkskeys.5,man/man5/)