1.if exists(${.CURDIR}/obj) 2MAN1= ${.CURDIR}/obj/japropos.1 3EMAN1= ${.CURDIR}/obj/japropos.1.eng.gz 4TARG= ${.CURDIR}/obj/japropos 5.else 6MAN1= ${.CURDIR}/japropos.1 7EMAN1= ${.CURDIR}/japropos.1.eng.gz 8TARG= ${.CURDIR}/japropos 9.endif 10 11#MLINKS= japropos.1 jwhatis.1 12 13MANDEPEND= ${MAN1} 14 15CLEANFILES+= ${TARG} ${MAN1} ${EMAN1} 16 17all: ${TARG} ${MAN1} ${EMAN1} 18 19depend rcsfreeze tags all: 20 @echo -n 21 22${TARG}: ${.CURDIR}/apropos.sh 23 sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ 24 -e 's,%pager%,${pager},' \ 25 ${.CURDIR}/apropos.sh > ${.TARGET} 26 27${MAN1}: ${.CURDIR}/japropos.man 28 sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ 29 -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \ 30 -e 's,%manpath_config_file%,${manpath_config_file},' \ 31 ${.CURDIR}/japropos.man > ${.TARGET} 32 33${EMAN1}: ${.CURDIR}/japropos.man.eng 34 sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ 35 -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \ 36 -e 's,%manpath_config_file%,${manpath_config_file},' \ 37 ${.CURDIR}/japropos.man.eng | \ 38 ${compress} > ${.TARGET} 39 40install: ${TARG} man_install after_maninstall 41 ${INSTALL} -m 555 ${TARG} ${DESTDIR}${BINDIR} 42 ln -sf japropos ${DESTDIR}${BINDIR}/jwhatis 43 44.if !defined(NO_MAN) 45man_install: ${MAN1} 46 ${INSTALL} -m 444 ${MAN1} ${DESTDIR}${MANDIR}1 47 ln -sf japropos.1.gz ${DESTDIR}${MANDIR}1/jwhatis.1.gz 48 49after_maninstall: ${EMAN1} 50 ${INSTALL} -m 444 ${EMAN1} \ 51 ${DESTDIR}${EMANDIR}1/japropos.1.gz 52 ln -sf japropos.1.gz ${DESTDIR}${EMANDIR}1/jwhatis.1.gz 53.else 54man_install: 55after_maninstall: 56.endif 57 58.include "../Makefile.inc" 59 60.include <bsd.prog.mk> 61