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