Clean this up, and be more consistent:
* Have 'fake' options for all offensive fortune files (fortunes2-o and limerick moved to fortunes2-o.real and limerick.real via repository copy). * build all offensive fortune data files, etc., in the same way. * Have installation of offensive fortunes controlled by one make variable. To disable build/install of offensive fortunes, set INSTALL_OFFENSIVE_FORTUNES to anything other than "YES" on the make command line, in bsd.own.mk, or in /etc/mk.conf or your ${MAKECONF} file. (If changing the setting, you should 'make clean' here and rebuild the fortunes before installing.) * Don't use variables that bsd.prog.mk thinks have certain meanings.
This commit is contained in:
parent
119b0ec653
commit
4f6d05e9a2
@ -1,42 +1,63 @@
|
|||||||
# $NetBSD: Makefile,v 1.16 1996/10/18 02:46:35 thorpej Exp $
|
# $NetBSD: Makefile,v 1.17 1996/12/23 01:14:34 cgd Exp $
|
||||||
# @(#)Makefile 8.2 (Berkeley) 4/19/94
|
# @(#)Makefile 8.2 (Berkeley) 4/19/94
|
||||||
|
|
||||||
SRCS= fortunes fortunes2 startrek zippy
|
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
|
||||||
BLDS= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
|
|
||||||
fortunes-o fortunes-o.dat
|
|
||||||
|
|
||||||
# TO INSTALL THE POTENTIALLY OFFENSIVE FORTUNES, UNCOMMENT THE THREE
|
SRCFILES= fortunes fortunes2 startrek zippy
|
||||||
# LINES AND COMMENT OUT THE FOURTH LINE.
|
DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
|
||||||
|
fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
|
||||||
|
limerick limerick.dat
|
||||||
|
|
||||||
# THE THREE LINES
|
# TO AVOID INSTALLIND THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
|
||||||
SRCS+= fortunes2-o limerick
|
# "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
|
||||||
BLDS+= fortunes2-o.dat limerick.dat
|
# IN bsd.own.mk OR /etc/mk.conf.
|
||||||
TYPE= real
|
|
||||||
|
|
||||||
# THE FOURTH LINE
|
INSTALL_OFFENSIVE_FORTUNES?= YES
|
||||||
#TYPE= fake
|
.if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
|
||||||
|
TYPE= real
|
||||||
|
.else
|
||||||
|
TYPE= fake
|
||||||
|
.endif
|
||||||
|
|
||||||
CLEANFILES+=${BLDS}
|
CLEANFILES+=${DATFILES}
|
||||||
|
|
||||||
STRFILE!=cd $(.CURDIR)/../strfile; \
|
STRFILE!=cd $(.CURDIR)/../strfile; \
|
||||||
printf "xxx:\n\techo \$${.OBJDIR}/strfile\n" | \
|
printf "xxx:\n\techo \$${.OBJDIR}/strfile\n" | \
|
||||||
${MAKE} -r -s -f - xxx | grep strfile
|
${MAKE} -r -s -f - xxx | grep strfile
|
||||||
|
|
||||||
all: ${BLDS}
|
all: ${DATFILES}
|
||||||
|
|
||||||
install: ${SRCS} ${BLDS}
|
install:
|
||||||
(cd ${.CURDIR} && ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
|
(cd ${.CURDIR} && ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||||
${SRCS} ${DESTDIR}/usr/share/games/fortune)
|
${SRCFILES} ${DESTDIR}/usr/share/games/fortune)
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BLDS} \
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||||
${DESTDIR}/usr/share/games/fortune
|
${DATFILES} ${DESTDIR}/usr/share/games/fortune
|
||||||
|
|
||||||
fortunes.dat fortunes2.dat fortunes2-o.dat limerick.dat startrek.dat zippy.dat:
|
# Normal fortunes: build directly from data files.
|
||||||
|
|
||||||
|
fortunes.dat fortunes2.dat startrek.dat zippy.dat:
|
||||||
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
|
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
|
||||||
|
fortunes.dat: fortunes
|
||||||
|
fortunes2.dat: fortunes2
|
||||||
|
startrek.dat: startrek
|
||||||
|
zippy.dat: zippy
|
||||||
|
|
||||||
fortunes-o.dat: fortunes-o
|
# Obscene fortunes: we have to build source and data files
|
||||||
${STRFILE} -rsx fortunes-o ${.TARGET}
|
|
||||||
|
|
||||||
fortunes-o: fortunes-o.${TYPE}
|
fortunes-o: fortunes-o.${TYPE}
|
||||||
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||||
|
fortunes-o.dat: fortunes-o
|
||||||
|
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
|
fortunes2-o: fortunes2-o.${TYPE}
|
||||||
|
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||||
|
fortunes2-o.dat: fortunes2-o
|
||||||
|
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
|
limerick: limerick.${TYPE}
|
||||||
|
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||||
|
limerick.dat: limerick
|
||||||
|
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
File diff suppressed because it is too large
Load Diff
2
games/fortune/datfiles/fortunes2-o.fake
Normal file
2
games/fortune/datfiles/fortunes2-o.fake
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
There are no potentially offensive fortunes installed on this
|
||||||
|
system. For further details, contact your system administrator.
|
File diff suppressed because it is too large
Load Diff
2
games/fortune/datfiles/limerick.fake
Normal file
2
games/fortune/datfiles/limerick.fake
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
There are no potentially offensive fortunes installed on this
|
||||||
|
system. For further details, contact your system administrator.
|
Loading…
Reference in New Issue
Block a user