From 532aaa30de6c6dbe61b164b66fb44e444fcf5d0f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 24 Jul 2020 08:32:58 -0600 Subject: [PATCH] build: add install_docs target --- Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fe0f01f..89ce1d7 100644 --- a/Makefile +++ b/Makefile @@ -70,12 +70,26 @@ install: all .scd.1 .scd.2 .scd.3 .scd.4 .scd.5 .scd.6 .scd.7 .scd.8: ${SCDOC} < $< > $@ -MANPAGES = \ +MANPAGES_8 = \ doc/ifquery.8 \ doc/ifup.8 \ - doc/ifdown.8 \ + doc/ifdown.8 + +MANPAGES_5 = \ doc/interfaces.5 +MANPAGES = ${MANPAGES_5} ${MANPAGES_8} + docs: ${MANPAGES} +install_docs: docs + for i in ${MANPAGES_5}; do \ + target=$$(basename $$i); \ + install -D -m644 $$i ${DESTDIR}/usr/share/man/man5/$$target; \ + done + for i in ${MANPAGES_8}; do \ + target=$$(basename $$i); \ + install -D -m644 $$i ${DESTDIR}/usr/share/man/man8/$$target; \ + done + .SUFFIXES: .scd .1 .2 .3 .4 .5 .6 .7 .8