-# $NetBSD: Makefile,v 1.10 1996/10/18 02:43:36 thorpej Exp $
+# $NetBSD: Makefile,v 1.11 1997/03/24 22:15:37 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= atc
game_4 novice two-corners
CLEANFILES=grammar.c y.tab.h lex.c
HIDEGAME=hidegame
-
-beforeinstall:
- @if [ ! -d ${DESTDIR}/usr/share/games/atc ]; then \
- /bin/rm -f ${DESTDIR}/usr/share/games/atc ; \
- mkdir -p ${DESTDIR}/usr/share/games/atc ; \
- chown root.wheel ${DESTDIR}/usr/share/games/atc ; \
- chmod 755 ${DESTDIR}/usr/share/games/atc ; \
- else \
- true ; \
- fi
- (cd ${.CURDIR}/games; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 400 \
- ${GAMES} ${DESTDIR}/usr/share/games/atc)
+FILES=${GAMES:S@^@${.CURDIR}/games/@g}
+FILESDIR=/usr/share/games/atc
+FILESMODE=400
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.6 1996/09/26 00:04:42 mrg Exp $
+# $NetBSD: Makefile,v 1.7 1997/03/24 22:15:38 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/11/93
SUBDIR= boggle mkdict mkindex
printf "xxx:\n\techo \$${.OBJDIR}/mkdict\n" | ${MAKE} -r -s -f - xxx
MKINDEX!=cd $(.CURDIR)/mkindex; \
printf "xxx:\n\techo \$${.OBJDIR}/mkindex\n" | ${MAKE} -r -s -f - xxx
+WORDS=${DESTDIR}/usr/share/dict/words
+FILES=dictionary dictindex
+FILESDIR=/usr/share/games/boggle
+CLEANFILES+=${FILES}
-beforeinstall:
- rm -f ${DESTDIR}/usr/share/games/boggle/dictionary
- ${MKDICT} < ${DESTDIR}/usr/share/dict/words > \
- ${DESTDIR}/usr/share/games/boggle/dictionary
- rm -f ${DESTDIR}/usr/share/games/boggle/dictindex
- ${MKINDEX} < ${DESTDIR}/usr/share/games/boggle/dictionary > \
- ${DESTDIR}/usr/share/games/boggle/dictindex
- chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/games/boggle/dictionary
- chmod 444 ${DESTDIR}/usr/share/games/boggle/dictionary
- chown ${BINOWN}.${BINGRP} ${DESTDIR}/usr/share/games/boggle/dictindex
- chmod 444 ${DESTDIR}/usr/share/games/boggle/dictindex
+all: ${FILES}
-.include <bsd.subdir.mk>
+${MKDICT} ${MKINDEX}: ${SUBDIR}
+
+
+dictionary: ${MKDICT} ${WORDS}
+ rm -f ${.TARGET}
+ ${MKDICT} < ${WORDS} > ${.TARGET}
+
+dictindex: ${MKINDEX} dictionary
+ rm -f ${.TARGET}
+ ${MKINDEX} < dictionary > ${.TARGET}
+
+.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.4 1996/10/18 02:44:27 thorpej Exp $
+# $NetBSD: Makefile,v 1.5 1997/03/24 22:15:39 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/11/93
PROG= boggle
LDADD= -lcurses -ltermlib
HIDEGAME=hidegame
MAN= boggle.6
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/helpfile \
- ${DESTDIR}/usr/share/games/boggle/helpfile
+FILES= helpfile
+FILESDIR=/usr/share/games/boggle
.include "../../Makefile.inc"
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.5 1996/10/18 02:45:01 thorpej Exp $
+# $NetBSD: Makefile,v 1.6 1997/03/24 22:15:40 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= caesar
DPADD= ${LIBM}
LDADD= -lm
MLINKS= caesar.6 rot13.6
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/rot13.sh ${DESTDIR}/usr/games/rot13
+SCRIPTS=rot13.sh
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.6 1996/10/18 02:45:34 thorpej Exp $
+# $NetBSD: Makefile,v 1.7 1997/03/24 22:15:41 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= cribbage
SRCS= extern.c crib.c cards.c instr.c io.c score.c support.c
MAN= cribbage.6
HIDEGAME=hidegame
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/cribbage.n \
- ${DESTDIR}/usr/share/games/cribbage.instr
+FILES= cribbage.n
+FILESNAME=cribbage.instr
+FILESDIR=/usr/share/games
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.7 1996/10/18 02:46:02 thorpej Exp $
+# $NetBSD: Makefile,v 1.8 1997/03/24 22:15:42 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= fish
MAN= fish.6
HIDEGAME=hidegame
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/fish.instr \
- ${DESTDIR}/usr/share/games/fish.instr
+FILES=fish.instr
+FILESDIR=/usr/share/games
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.17 1996/12/23 01:14:34 cgd Exp $
+# $NetBSD: Makefile,v 1.18 1997/03/24 22:15:43 christos Exp $
# @(#)Makefile 8.2 (Berkeley) 4/19/94
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
printf "xxx:\n\techo \$${.OBJDIR}/strfile\n" | \
${MAKE} -r -s -f - xxx | grep strfile
-all: ${DATFILES}
+FILES=${SRCFILES} ${DATFILES}
+FILESDIR=/usr/share/games/fortune
-install:
- (cd ${.CURDIR} && ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${SRCFILES} ${DESTDIR}/usr/share/games/fortune)
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${DATFILES} ${DESTDIR}/usr/share/games/fortune
+all: ${DATFILES}
# Normal fortunes: build directly from data files.
-# $NetBSD: Makefile,v 1.18 1997/01/07 12:09:53 tls Exp $
+# $NetBSD: Makefile,v 1.19 1997/03/24 22:15:44 christos Exp $
# @(#)Makefile 8.2 (Berkeley) 4/27/95
PROG= hack
LDADD+= -ltermcap -lcompat
HIDEGAME=hidegame
CLEANFILES+=hack.onames.h makedefs
+FILES=hh data
+FILESDIR=/var/games/hackdir
${PROG}: hack.onames.h
makedefs: makedefs.c
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/${.PREFIX}.c ${LDADD}
-beforeinstall:
+.if !exists(${DESTDIR}${FILESDIR}/perm)
+proginstall:: clobber
+.endif
+
+clobber:
${INSTALL} -c -o games -g games -m 600 /dev/null \
${DESTDIR}/var/games/hackdir/perm
${INSTALL} -c -o games -g games -m 600 /dev/null \
${DESTDIR}/var/games/hackdir/record
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/help \
- ${.CURDIR}/hh ${.CURDIR}/data ${DESTDIR}/var/games/hackdir
rm -f ${DESTDIR}/var/games/hackdir/bones*
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.9 1996/10/18 02:48:24 thorpej Exp $
+# $NetBSD: Makefile,v 1.10 1997/03/24 22:15:46 christos Exp $
# @(#)Makefile 5.12 (Berkeley) 5/30/93
# EXTRA
DPADD= ${LIBTERM} ${LIBCOMPAT}
LDADD= -ltermcap -lcompat
HIDEGAME=hidegame
-
-beforeinstall:
- (cd ${.CURDIR}/datfiles; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} \
- -m 444 larnmaze larnopts larn.help ${DESTDIR}/usr/share/games/larn)
+DAT=larnmaze larnopts larn.help
+FILES=${DAT:S@^@${.CURDIR}/datfiles/@g}
+FILESDIR=/usr/share/games/larn
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.13 1996/10/18 02:48:56 thorpej Exp $
+# $NetBSD: Makefile,v 1.14 1997/03/24 22:15:47 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= monop
LDADD+= -lcompat
HIDEGAME=hidegame
CLEANFILES+=initdeck cards.pck
+FILES=cards.pck
+FILESDIR=/usr/share/games
monop: cards.pck
initdeck: initdeck.c
${CC} ${CFLAGS} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${.CURDIR}/initdeck.c ${LDADD}
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 cards.pck \
- ${DESTDIR}/usr/share/games
-
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.10 1996/10/18 02:49:35 thorpej Exp $
+# $NetBSD: Makefile,v 1.11 1997/03/24 22:15:48 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= quiz
midearth morse mult murders poetry posneg pres province seq-easy \
seq-hard sexes sov spell state trek ucc
HIDEGAME=hidegame
-
-beforeinstall:
- (cd ${.CURDIR}/datfiles; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} \
- -m 444 ${CATS} ${DESTDIR}/usr/share/games/quiz.db)
+FILES= ${CATS:S@^@${.CURDIR}/datfiles/@}
+FILESDIR=/usr/share/games/quiz.db
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.6 1996/10/18 02:50:15 thorpej Exp $
+# $NetBSD: Makefile,v 1.7 1997/03/24 22:15:49 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= robots
LDADD= -lcurses -ltermlib
HIDEGAME=hidegame
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
- ${DESTDIR}/var/games/robots_roll
+FILES=/dev/null
+FILESNAME=robots_roll
+FILESMODE=600
+FILESDIR=/var/games
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.5 1996/10/18 02:50:57 thorpej Exp $
+# $NetBSD: Makefile,v 1.6 1997/03/24 22:15:50 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
NOOBJ= noobj
all wargames clean cleandir depend lint tags:
-
-install:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/wargames.sh ${DESTDIR}/usr/games/wargames
+SCRIPTS=wargames.sh
.include <bsd.prog.mk>
-# $NetBSD: Makefile,v 1.5 1996/10/18 02:51:24 thorpej Exp $
+# $NetBSD: Makefile,v 1.6 1997/03/24 22:15:51 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= wump
MAN= wump.6
HIDEGAME=hidegame
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/wump.info \
- ${DESTDIR}/usr/share/games
+FILES=wump.info
+FILESDIR=/usr/share/games
.include <bsd.prog.mk>