Makefile revision 1.3
1#	@(#)Makefile	5.2 (Berkeley) 5/6/91
2
3#
4# set `OBSCENE' to "real" to have obscene fortunes installed,
5# fake to have a note stating that they're not installed
6# isntalled in their place
7#
8OBSCENE=real
9
10NORMDAT= fortunes.dat startrek.dat zippy.dat
11OBSDAT=	fortunes-o.dat
12DATFILES= ${NORMDAT} ${OBSDAT}
13
14CLEANFILES+=${DATFILES}
15
16install: ${DATFILES}
17	@if [ ! -d ${DESTDIR}/usr/share/games/fortune ]; then \
18                /bin/rm -f ${DESTDIR}/usr/share/games/fortune ; \
19                mkdir -p ${DESTDIR}/usr/share/games/fortune ; \
20                chown root.wheel ${DESTDIR}/usr/share/games/fortune ; \
21                chmod 755 ${DESTDIR}/usr/share/games/fortune ; \
22        else \
23                true ; \
24        fi
25	install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${DATFILES} \
26	    ${DESTDIR}/usr/share/games/fortune
27	(cd ${.CURDIR} && install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
28		${NORMDAT:R} ${DESTDIR}/usr/share/games/fortune)
29	(cd ${.CURDIR} && install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
30		${OBSDAT:R}.${OBSCENE}.rot13 \
31		${DESTDIR}/usr/share/games/fortune/${OBSDAT:R})
32
33fortunes-o.dat: ${.TARGET:R}.${OBSCENE}.rot13
34	${.CURDIR}/../strfile/obj/strfile -rsx \
35	    ${.CURDIR}/${.TARGET:R}.${OBSCENE}.rot13 ${.TARGET}
36
37fortunes.dat startrek.dat zippy.dat: ${.TARGET:R}
38	${.CURDIR}/../strfile/obj/strfile -rs \
39	    ${.CURDIR}/${.TARGET:R} ${.TARGET}
40
41.include <bsd.prog.mk>
42