1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/gnu/usr.bin/man/Makefile.shprog

31 lines
784 B
Makefile
Raw Normal View History

1999-08-27 23:37:10 +00:00
# $FreeBSD$
# This may become bsd.shprog.mk. The general version would have to handle:
# - arbitrary sed substitutions.
# - programs without man pages.
# - programs with man pages in sections other than section 1.
MAN1= ${SHPROG:S/$/.1/g}
CLEANFILES+= ${SHPROG} ${MAN1}
all: ${SHPROG}
.sh:
sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
-e 's,%pager%,${pager},' \
${.ALLSRC} > ${.TARGET}
.SUFFIXES: .man .1
.man.1:
sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
-e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \
-e 's,%manpath_config_file%,${manpath_config_file},' \
${.ALLSRC} > ${.TARGET}
beforeinstall:
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${SHPROG} ${DESTDIR}${BINDIR}
.include <bsd.prog.mk>