]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - fortune/datfiles/Makefile
d9b44a3588229406404721eb263bcf7d1df2660d
[bsdgames-darwin.git] / fortune / datfiles / Makefile
1 # $NetBSD: Makefile,v 1.37 2008/03/21 21:09:48 reed 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 unamerican-o limerick \
7 netbsd farber netbsd-tips
8 DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
9 fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
10 limerick.dat limerick-o limerick-o.dat unamerican-o \
11 unamerican-o.dat netbsd.dat netbsd-o netbsd-o.dat \
12 farber.dat netbsd-tips.dat
13
14 # TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
15 # "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
16 # IN bsd.own.mk OR /etc/mk.conf.
17
18 INSTALL_OFFENSIVE_FORTUNES?= YES
19 .if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
20 TYPE= real
21 .else
22 TYPE= fake
23 .endif
24
25 CLEANFILES+=${DATFILES}
26
27 STRFILEDIR!=cd $(.CURDIR)/../strfile; ${PRINTOBJDIR}
28 STRFILE=${STRFILEDIR}/strfile
29
30 .if ${MKSHARE} != "no"
31 FILES=${SRCFILES} ${DATFILES}
32 FILESDIR=/usr/share/games/fortune
33 .endif
34
35 realall: ${DATFILES}
36
37 # Normal fortunes: build directly from data files.
38
39 fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat netbsd-tips.dat:
40 ${_MKTARGET_CREATE}
41 ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
42 fortunes.dat: fortunes
43 fortunes2.dat: fortunes2
44 startrek.dat: startrek
45 zippy.dat: zippy
46 limerick.dat: limerick
47 netbsd.dat: netbsd
48 farber.dat: farber
49 netbsd-tips.dat: netbsd-tips
50
51 # Obscene fortunes: we have to build source and data files
52
53 fortunes-o: fortunes-o.${TYPE}
54 ${_MKTARGET_CREATE}
55 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
56 fortunes-o.dat: fortunes-o
57 ${_MKTARGET_CREATE}
58 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
59
60 fortunes2-o: fortunes2-o.${TYPE}
61 ${_MKTARGET_CREATE}
62 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
63 fortunes2-o.dat: fortunes2-o
64 ${_MKTARGET_CREATE}
65 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
66
67 limerick-o: limerick-o.${TYPE}
68 ${_MKTARGET_CREATE}
69 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
70 limerick-o.dat: limerick-o
71 ${_MKTARGET_CREATE}
72 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
73
74 unamerican-o: unamerican-o.${TYPE}
75 ${_MKTARGET_CREATE}
76 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
77 unamerican-o.dat: unamerican-o
78 ${_MKTARGET_CREATE}
79 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
80
81 netbsd-o: netbsd-o.${TYPE}
82 ${_MKTARGET_CREATE}
83 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
84 netbsd-o.dat: netbsd-o
85 ${_MKTARGET_CREATE}
86 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
87
88
89 .include <bsd.prog.mk>