From 54f447785db107c76f01a7a372ff3391293eb2c5 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 29 Jan 2024 13:09:07 -0800 Subject: [PATCH] doc: Install man1 page using Makefile - Also fix a typo with target name. - Remove redundant OUTPUT= declarations. - Make sure that 'manual-pages' PHONY target is not attempted to be removed on clean. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 147926ae4..614394d1e 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,8 +1,6 @@ #!/usr/bin/make -f # SPDX-License-Identifier: AGPL-3.0-or-later -OUTPUTS=freedombox-manual.pdf plinth.1 manual-pages - MANUAL_LANGUAGES=en es MANUAL_URL="https://wiki.debian.org/{lang-fragment}FreedomBox/Manual?action=show&mimetype=text%2Fdocbook" @@ -11,11 +9,12 @@ MANUAL_PAGE_URL_RAW="https://wiki.debian.org/{page}?action=raw" DESTDIR= INSTALL_DIR=$(DESTDIR)/usr/share/freedombox +MAN_INSTALL_DIR=$(DESTDIR)/usr/share/man SCRIPTS_DIR=scripts manual-pdfs=$(foreach lang,$(MANUAL_LANGUAGES),manual/$(lang)/freedombox-manual.pdf) manual-xmls=$(patsubst %.pdf,%.xml,$(manual-pdfs)) -OUTPUTS=$(manual-pdfs) plinth.1 manual-pages +OUTPUTS=$(manual-pdfs) plinth.1 INSTALL_OPTS=-D --mode=644 @@ -32,9 +31,10 @@ ifneq ($(DEBUG),) endif .PHONY: all install -all: $(OUTPUTS) +all: $(OUTPUTS) manual-pages install: all + install $(INSTALL_OPTS) -t $(MAN_INSTALL_DIR)/man1 plinth.1 for file in $(manual-pages-part-html) $(manual-pdfs); do \ install $(INSTALL_OPTS) -t $(INSTALL_DIR)/$$(dirname $${file}) \ $${file} ; \ @@ -67,7 +67,7 @@ fetch: $(fetch-main-list) $(fetch-pages-list) # Remove raw wiki pages and images before fetching to drop items deleted # upstream. -featch-cleanup-%: lang = $* +fetch-cleanup-%: lang = $* $(fetch-cleanup-list): fetch-cleanup-%: rm -f manual/$(lang)/*.raw.wiki rm -f manual/$(lang)/images/*.png manual/$(lang)/images/*.jpg