summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-12-10 21:13:42 +0000
committerbillf <billf@FreeBSD.org>1999-12-10 21:13:42 +0000
commiteeb2dbc8d87fc13f9b937f94fcc499f662567fee (patch)
tree335c4440861d51b2cd7adf6cd38eed83554f6262 /games
parentda5ff8ce2a3b17bc02c075958b89e0fbb8f5b16b (diff)
downloadFreeBSD-src-eeb2dbc8d87fc13f9b937f94fcc499f662567fee.zip
FreeBSD-src-eeb2dbc8d87fc13f9b937f94fcc499f662567fee.tar.gz
1. Don't overwrite scorefiles if they already exist.
PR: bin/13068 Submitted by: Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk> 2. Sprinkle $FreeBSD$ around.
Diffstat (limited to 'games')
-rw-r--r--games/battlestar/Makefile3
-rw-r--r--games/canfield/canfield/Makefile3
-rw-r--r--games/cribbage/Makefile3
-rw-r--r--games/hack/Makefile7
-rw-r--r--games/larn/Makefile5
-rw-r--r--games/phantasia/Makefile7
-rw-r--r--games/robots/Makefile3
-rw-r--r--games/rogue/Makefile3
-rw-r--r--games/sail/Makefile3
-rw-r--r--games/snake/snake/Makefile5
10 files changed, 39 insertions, 3 deletions
diff --git a/games/battlestar/Makefile b/games/battlestar/Makefile
index 96e26bb..ea449e9 100644
--- a/games/battlestar/Makefile
+++ b/games/battlestar/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= battlestar
SRCS= battlestar.c com1.c com2.c com3.c com4.c com5.c com6.c com7.c \
@@ -11,7 +12,9 @@ HIDEGAME=hidegame
#CFLAGS+= -Wall -W
beforeinstall:
+.if !exists(${DESTDIR}/var/games/battlestar.log)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/battlestar.log
+.endif
.include <bsd.prog.mk>
diff --git a/games/canfield/canfield/Makefile b/games/canfield/canfield/Makefile
index a3b3a7c..bd361ab 100644
--- a/games/canfield/canfield/Makefile
+++ b/games/canfield/canfield/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= canfield
MAN6= canfield.6
@@ -8,8 +9,10 @@ HIDEGAME=hidegame
MLINKS= canfield.6 cfscores.6
beforeinstall:
+.if !exists(${DESTDIR}/var/games/cfscores)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/cfscores
+.endif
.include "../../Makefile.inc"
.include <bsd.prog.mk>
diff --git a/games/cribbage/Makefile b/games/cribbage/Makefile
index a21ae20..1265970 100644
--- a/games/cribbage/Makefile
+++ b/games/cribbage/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= cribbage
DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBCOMPAT}
@@ -10,7 +11,9 @@ HIDEGAME=hidegame
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${.CURDIR}/cribbage.n ${DESTDIR}${SHAREDIR}/games/cribbage.instr
+.if !exists(${DESTDIR}/var/games/criblog)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/criblog
+.endif
.include <bsd.prog.mk>
diff --git a/games/hack/Makefile b/games/hack/Makefile
index 9875900..e2ad5d3 100644
--- a/games/hack/Makefile
+++ b/games/hack/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= hack
SRCS= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
@@ -31,14 +32,16 @@ makedefs: makedefs.o
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} /dev/null \
${DESTDIR}/var/games/hackdir/perm
+.if !exists(${DESTDIR}/var/games/hackdir/record)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 460 /dev/null \
${DESTDIR}/var/games/hackdir/record
+.endif
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 440 ${.CURDIR}/rumors \
${DESTDIR}/var/games/hackdir/rumors
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${.CURDIR}/help ${.CURDIR}/hh ${.CURDIR}/data \
${DESTDIR}/var/games/hackdir
- rm -f ${DESTDIR}/var/games/hackdir/bones* \
- ${DESTDIR}/var/games/hackdir/save/*
+# rm -f ${DESTDIR}/var/games/hackdir/bones* \
+# ${DESTDIR}/var/games/hackdir/save/*
.include <bsd.prog.mk>
diff --git a/games/larn/Makefile b/games/larn/Makefile
index b31c431..43b0468 100644
--- a/games/larn/Makefile
+++ b/games/larn/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 5.12 (Berkeley) 5/30/93
+# $FreeBSD$
# EXTRA
# Incorporates code to gather additional performance statistics
@@ -65,9 +66,13 @@ beforeinstall:
(cd ${.CURDIR}/datfiles; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NOBINMODE} larnmaze larnopts larn.help \
${DESTDIR}${SHAREDIR}/games/larn)
+.if !exists(${DESTDIR}/var/games/larn/lscore12.0)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \
${DESTDIR}/var/games/larn/lscore12.0
+.endif
+.if !exists(${DESTDIR}/var/games/larn/llog12.0)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 660 /dev/null \
${DESTDIR}/var/games/larn/llog12.0
+.endif
.include <bsd.prog.mk>
diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile
index db32133..8478020 100644
--- a/games/phantasia/Makefile
+++ b/games/phantasia/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= phantasia
SRCS= main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
@@ -24,8 +25,12 @@ setup: cross-phantglobs.o setup.o ${LIBM}
${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:M*.o} -lm
beforeinstall:
+.for file in ${DATAFILES}
+.if !exists(${DESTDIR}/var/games/phantasia/${file})
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 660 \
- ${DATAFILES} ${DESTDIR}/var/games/phantasia
+ ${file} ${DESTDIR}/var/games/phantasia
+.endif
+.endfor
# Make Phantasia map. Change the map commands reflect your installation.
# PLOTDEVICE is used for plotting the map. Change as appropriate.
diff --git a/games/robots/Makefile b/games/robots/Makefile
index 18503e0..6ef8d9c 100644
--- a/games/robots/Makefile
+++ b/games/robots/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= robots
CFLAGS+=-DMAX_PER_UID=5
@@ -10,7 +11,9 @@ LDADD= -lcurses -ltermcap -lcompat
HIDEGAME=hidegame
beforeinstall:
+.if !exists(${DESTDIR}/var/games/robots_roll)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/robots_roll
+.endif
.include <bsd.prog.mk>
diff --git a/games/rogue/Makefile b/games/rogue/Makefile
index c0a038d..58846a1 100644
--- a/games/rogue/Makefile
+++ b/games/rogue/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= rogue
CFLAGS+=-DUNIX -fwritable-strings
@@ -11,7 +12,9 @@ HIDEGAME=hidegame
MAN6= rogue.6
beforeinstall:
+.if !exists(${DESTDIR}/var/games/rogue.scores)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/rogue.scores
+.endif
.include <bsd.prog.mk>
diff --git a/games/sail/Makefile b/games/sail/Makefile
index d6ee0db..e73ccc9 100644
--- a/games/sail/Makefile
+++ b/games/sail/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= sail
SRCS= main.c pl_main.c pl_1.c pl_2.c pl_3.c pl_4.c pl_5.c pl_6.c pl_7.c \
@@ -10,7 +11,9 @@ LDADD= -lcurses -ltermcap -lcompat
HIDEGAME=hidegame
beforeinstall:
+.if !exists(${DESTDIR}/var/games/saillog)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/saillog
+.endif
.include <bsd.prog.mk>
diff --git a/games/snake/snake/Makefile b/games/snake/snake/Makefile
index a119453..220c4bf 100644
--- a/games/snake/snake/Makefile
+++ b/games/snake/snake/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
+# $FreeBSD$
PROG= snake
SRCS= snake.c move.c
@@ -9,10 +10,14 @@ HIDEGAME=hidegame
MLINKS= snake.6 snscore.6
beforeinstall:
+.if !exists(${DESTDIR}/var/games/snakerawscores)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/snakerawscores
+.endif
+.if !exists(${DESTDIR}/var/games/snake.log)
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
${DESTDIR}/var/games/snake.log
+.endif
.include "../../Makefile.inc"
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud