1 # $NetBSD: Makefile,v 1.37 2008/03/21 21:09:48 reed Exp $
2 # @(#)Makefile 8.2 (Berkeley) 4/19/94
4 .include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
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
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.
18 INSTALL_OFFENSIVE_FORTUNES?= YES
19 .if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
25 CLEANFILES+=${DATFILES}
27 STRFILEDIR!=cd $(.CURDIR)/../strfile; ${PRINTOBJDIR}
28 STRFILE=${STRFILEDIR}/strfile
30 .if ${MKSHARE} != "no"
31 FILES=${SRCFILES} ${DATFILES}
32 FILESDIR=/usr/share/games/fortune
37 # Normal fortunes: build directly from data files.
39 fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat netbsd-tips.dat:
41 ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
42 fortunes.dat: fortunes
43 fortunes2.dat: fortunes2
44 startrek.dat: startrek
46 limerick.dat: limerick
49 netbsd-tips.dat: netbsd-tips
51 # Obscene fortunes: we have to build source and data files
53 fortunes-o: fortunes-o.${TYPE}
55 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
56 fortunes-o.dat: fortunes-o
58 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
60 fortunes2-o: fortunes2-o.${TYPE}
62 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
63 fortunes2-o.dat: fortunes2-o
65 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
67 limerick-o: limerick-o.${TYPE}
69 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
70 limerick-o.dat: limerick-o
72 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
74 unamerican-o: unamerican-o.${TYPE}
76 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
77 unamerican-o.dat: unamerican-o
79 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
81 netbsd-o: netbsd-o.${TYPE}
83 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
84 netbsd-o.dat: netbsd-o
86 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
89 .include <bsd.prog.mk>