X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/beb54af10082dc588132b2c0d32e050028b72c78..78ed81a334dab56aa7a876792a473d67d4359c25:/gnu/usr.bin/man/manpath/Makefile diff --git a/gnu/usr.bin/man/manpath/Makefile b/gnu/usr.bin/man/manpath/Makefile index 81897ab3ab..c86bf1be84 100644 --- a/gnu/usr.bin/man/manpath/Makefile +++ b/gnu/usr.bin/man/manpath/Makefile @@ -1,14 +1,30 @@ PROG= manpath -MAN1= manpath.1 SRCS= manpath.c -LDADD+= -L${.CURDIR}/../lib -lman -CFLAGS+= -I${.CURDIR}/../lib -DMAIN -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS -DALT_SYSTEMS +.if exists(${.CURDIR}/../lib/obj) +LDADD= -L${.CURDIR}/../lib/obj -lman +.else +LDADD= -L${.CURDIR}/../lib/ -lman +.endif -manpath.1: manpath.man +.if exists(${.CURDIR}/obj) +MAN1=${.CURDIR}/obj/manpath.1 +.else +MAN1=${.CURDIR}/manpath.1 +.endif + +DPADD+= ${MAN1} +CFLAGS+= -DMAIN -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS +CFLAGS+= -DALT_SYSTEMS -I${.CURDIR}/../lib -I${.CURDIR}/../lib/obj +CLEANFILES+= ${MAN1} + +${MAN1}: ${.CURDIR}/manpath.man 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},' \ - manpath.man > manpath.1 + ${.CURDIR}/manpath.man > ${MAN1} + +afterinstall: + install -c -o bin -g bin -m 555 ${.CURDIR}/manpath.config ${DESTDIR}${manpath_config_file} .include