]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - fortune/datfiles/Makefile
- Makefile cleanups
[bsdgames-darwin.git] / fortune / datfiles / Makefile
1 # $NetBSD: Makefile,v 1.18 1997/03/24 22:15:43 christos Exp $
2 # @(#)Makefile 8.2 (Berkeley) 4/19/94
3
4 .include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
5
6 SRCFILES= fortunes fortunes2 startrek zippy
7 DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
8 fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
9 limerick limerick.dat
10
11 # TO AVOID INSTALLIND THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
12 # "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
13 # IN bsd.own.mk OR /etc/mk.conf.
14
15 INSTALL_OFFENSIVE_FORTUNES?= YES
16 .if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
17 TYPE= real
18 .else
19 TYPE= fake
20 .endif
21
22 CLEANFILES+=${DATFILES}
23
24 STRFILE!=cd $(.CURDIR)/../strfile; \
25 printf "xxx:\n\techo \$${.OBJDIR}/strfile\n" | \
26 ${MAKE} -r -s -f - xxx | grep strfile
27
28 FILES=${SRCFILES} ${DATFILES}
29 FILESDIR=/usr/share/games/fortune
30
31 all: ${DATFILES}
32
33 # Normal fortunes: build directly from data files.
34
35 fortunes.dat fortunes2.dat startrek.dat zippy.dat:
36 ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
37 fortunes.dat: fortunes
38 fortunes2.dat: fortunes2
39 startrek.dat: startrek
40 zippy.dat: zippy
41
42 # Obscene fortunes: we have to build source and data files
43
44 fortunes-o: fortunes-o.${TYPE}
45 tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
46 fortunes-o.dat: fortunes-o
47 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
48
49 fortunes2-o: fortunes2-o.${TYPE}
50 tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
51 fortunes2-o.dat: fortunes2-o
52 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
53
54 limerick: limerick.${TYPE}
55 tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
56 limerick.dat: limerick
57 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
58
59
60 .include <bsd.prog.mk>