diff options
author | Roy Marples <roy@marples.name> | 2008-01-10 16:35:59 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-10 16:35:59 +0000 |
commit | 43147845209873b0776bd75d363913fe25611f49 (patch) | |
tree | ab3295c30664476d8d05b0fe5fe9ace702ade5ea /man/Makefile | |
parent | 2643f2e605f102d2c2fa098d0cf5400d3795ed4a (diff) |
Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's.
Diffstat (limited to 'man/Makefile')
-rw-r--r-- | man/Makefile | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/man/Makefile b/man/Makefile index 5375ce90..eaae253f 100644 --- a/man/Makefile +++ b/man/Makefile @@ -1,34 +1,37 @@ -DIR = /usr/share/man -_MAN3_SH = ls -1 *.3 -_MAN3 != $(_MAN3_SH) -MAN3 = $(_MAN3)$(shell $(_MAN3_SH)) -_MAN8_SH = ls -1 *.8 -_MAN8 != $(_MAN8_SH) -MAN8 = $(_MAN8)$(shell $(_MAN8_SH)) - -TOPDIR = .. -include $(TOPDIR)/default.mk +DIR= /usr/share/man +_MAN3_SH= ls -1 *.3 +_MAN3!= ${_MAN3_SH} +MAN3= ${_MAN3}$(shell ${_MAN3_SH}) +_MAN8_SH= ls -1 *.8 +_MAN8!= ${_MAN8_SH} +MAN8= ${_MAN8}$(shell ${_MAN8_SH}) # 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} \ - $(DESTDIR)/$(DIR)/man$${suffix}/$${link}.$${suffix} ; \ - fi; \ - done; +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} \ + ${DESTDIR}/${DIR}/man$${suffix}/$${link}.$${suffix} ; \ + fi; \ + done; -install:: - $(INSTALL) -d $(DESTDIR)/$(DIR)/man3 - for man in $(MAN3); do \ - $(INSTALL) -m 0644 "$$man" $(DESTDIR)/$(DIR)/man3 || exit $$?; \ - $(MAKE_LINKS) \ - done - $(INSTALL) -d $(DESTDIR)/$(DIR)/man8 - for man in $(MAN8); do \ - $(INSTALL) -m 0644 "$$man" $(DESTDIR)/$(DIR)/man8 || exit $$?; \ - $(MAKE_LINKS) \ +INSTALL?= install + +all: + +install: + ${INSTALL} -d ${DESTDIR}/${DIR}/man3 + for man in ${MAN3}; do \ + ${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man3 || exit $$?; \ + ${MAKE_LINKS} \ done + ${INSTALL} -d ${DESTDIR}/${DIR}/man8 + for man in ${MAN8}; do \ + ${INSTALL} -m 0644 "$$man" ${DESTDIR}/${DIR}/man8 || exit $$?; \ + ${MAKE_LINKS} \ + done + +clean: |