openrc/man/Makefile

36 lines
958 B
Makefile
Raw Normal View History

MAN3= einfo.3 \
rc_config.3 rc_deptree.3 rc_find_pids.3 rc_plugin_hook.3 \
rc_runlevel.3 rc_service.3 rc_strcatpaths.3 rc_strlist.3
MAN8= rc-status.8 rc-update.8 rc.8 runscript.8 start-stop-daemon.8
2007-12-24 17:18:33 +05:30
2007-12-25 04:04:22 +05:30
# Handy macro to create symlinks
# This does rely on correctly formatting our manpages!
MAKE_LINKS= suffix=$${man\#*.}; \
prefix=$${man%%.*}; \
for link in `sed -e 's/ ,//g' \
-n -e '/^\.Sh NAME$$/,/\.Sh/ s/\.Nm //p' $${man}`; do \
if test "$${link}" != "$${prefix}" ; then \
ln -sf $${man} \
2008-01-11 21:33:38 +05:30
${DESTDIR}/${MANDIR}$${suffix}/$${link}.$${suffix} ; \
fi; \
done;
2007-12-25 04:04:22 +05:30
2008-01-11 21:33:38 +05:30
MK= ../mk
include ${MK}/sys.mk
all:
install:
2008-01-11 21:33:38 +05:30
${INSTALL} -d ${DESTDIR}/${MANDIR}3
for man in ${MAN3}; do \
2008-01-11 21:33:38 +05:30
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}3 || exit $$?; \
${MAKE_LINKS} \
2007-12-24 17:18:33 +05:30
done
2008-01-11 21:33:38 +05:30
${INSTALL} -d ${DESTDIR}/${MANDIR}8
for man in ${MAN8}; do \
2008-01-11 21:33:38 +05:30
${INSTALL} -m ${MANMODE} "$$man" ${DESTDIR}/${MANDIR}8 || exit $$?; \
${MAKE_LINKS} \
done
clean: