1 # $NetBSD: Makefile,v 1.38 2008/09/26 18:23:09 apb 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 STRFILE=${TOOL_STRFILE}
29 .if ${MKSHARE} != "no"
30 FILES=${SRCFILES} ${DATFILES}
31 FILESDIR=/usr/share/games/fortune
36 # Normal fortunes: build directly from data files.
38 fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat netbsd-tips.dat:
40 ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
41 fortunes.dat: fortunes
42 fortunes2.dat: fortunes2
43 startrek.dat: startrek
45 limerick.dat: limerick
48 netbsd-tips.dat: netbsd-tips
50 # Obscene fortunes: we have to build source and data files
52 fortunes-o: fortunes-o.${TYPE}
54 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
55 fortunes-o.dat: fortunes-o
57 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
59 fortunes2-o: fortunes2-o.${TYPE}
61 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
62 fortunes2-o.dat: fortunes2-o
64 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
66 limerick-o: limerick-o.${TYPE}
68 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
69 limerick-o.dat: limerick-o
71 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
73 unamerican-o: unamerican-o.${TYPE}
75 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
76 unamerican-o.dat: unamerican-o
78 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
80 netbsd-o: netbsd-o.${TYPE}
82 tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
83 netbsd-o.dat: netbsd-o
85 ${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
88 .include <bsd.prog.mk>