build: add install_docs target

This commit is contained in:
Ariadne Conill 2020-07-24 08:32:58 -06:00
parent 475aeb2992
commit 532aaa30de

View file

@ -70,12 +70,26 @@ install: all
.scd.1 .scd.2 .scd.3 .scd.4 .scd.5 .scd.6 .scd.7 .scd.8: .scd.1 .scd.2 .scd.3 .scd.4 .scd.5 .scd.6 .scd.7 .scd.8:
${SCDOC} < $< > $@ ${SCDOC} < $< > $@
MANPAGES = \ MANPAGES_8 = \
doc/ifquery.8 \ doc/ifquery.8 \
doc/ifup.8 \ doc/ifup.8 \
doc/ifdown.8 \ doc/ifdown.8
MANPAGES_5 = \
doc/interfaces.5 doc/interfaces.5
MANPAGES = ${MANPAGES_5} ${MANPAGES_8}
docs: ${MANPAGES} 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 .SUFFIXES: .scd .1 .2 .3 .4 .5 .6 .7 .8