From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6612F138350 for ; Mon, 10 Feb 2020 17:31:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76F98E08ED; Mon, 10 Feb 2020 17:31:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5C9D4E08ED for ; Mon, 10 Feb 2020 17:31:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0240134E9C2 for ; Mon, 10 Feb 2020 17:31:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 40D4510D for ; Mon, 10 Feb 2020 17:31:48 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1581098395.c90f1ae71883907bf2c94949a6e69e066888985b.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: / X-VCS-Repository: proj/devmanual X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: c90f1ae71883907bf2c94949a6e69e066888985b X-VCS-Branch: master Date: Mon, 10 Feb 2020 17:31:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f86ae58-c3d8-45c2-8519-0db2eccefdf9 X-Archives-Hash: 0d498a9918f4978d361205ab88f23107 commit: c90f1ae71883907bf2c94949a6e69e066888985b Author: Ulrich Müller gentoo org> AuthorDate: Fri Feb 7 13:39:20 2020 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Feb 7 17:59:55 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c90f1ae7 Makefile: Add install target. Signed-off-by: Ulrich Müller gentoo.org> Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7b5569f..d8e3547 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,14 @@ HTMLS := $(subst text.xml,index.html,$(XMLS)) ECLASS_HTMLS := $(filter ./eclass-reference/%/index.html,$(ALL_FILES)) IMAGES := $(patsubst %.svg,%.png,$(SVGS)) +CSS_FILES = devmanual.css offline.css +JS_FILES = search.js documents.js + +prefix = /usr/local/share +docdir = $(prefix)/doc/devmanual +htmldir = $(docdir) +DESTDIR = + # Nonzero value disables external assets for offline browsing. OFFLINE = 0 @@ -54,6 +62,17 @@ documents.js: bin/build_search_documents.py $(XMLS) %.html: $$(dir $$@)text.xml devbook.xsl xsl/*.xsl $$(subst text.xml,index.html,$$(wildcard $$(dir $$@)*/text.xml)) xsltproc --param offline "$(OFFLINE)" devbook.xsl $< > $@ +install: all + set -e; \ + for file in $(HTMLS) $(ECLASS_HTMLS) $(IMAGES); do \ + install -d "$(DESTDIR)$(htmldir)"/$${file%/*}; \ + install -m 644 $${file} "$(DESTDIR)$(htmldir)"/$${file}; \ + done + install -m 644 $(CSS_FILES) "$(DESTDIR)$(htmldir)"/ + if test $(OFFLINE) -eq 0; then \ + install -m 644 $(JS_FILES) "$(DESTDIR)$(htmldir)"/; \ + fi + validate: @xmllint --noout --dtdvalid devbook.dtd $(XMLS) \ && echo "xmllint validation successful" @@ -80,4 +99,4 @@ delete-old: clean: @rm -f $(HTMLS) $(IMAGES) _documents.js documents.js -.PHONY: all prereq validate build tidy delete-old clean +.PHONY: all prereq build install validate tidy delete-old clean