From bae50c403e053e5ef8d399f1adb6677e2c4fabf8 Mon Sep 17 00:00:00 2001 From: simonb Date: Tue, 27 Mar 2001 02:23:28 +0000 Subject: Build the data files in the obj/compile directory and install them with FILES and FILESDIR. "Problem" reported by David Querbach on current-users. --- phantasia/Makefile | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'phantasia/Makefile') diff --git a/phantasia/Makefile b/phantasia/Makefile index 35afaa32..e7f31f06 100644 --- a/phantasia/Makefile +++ b/phantasia/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2000/06/20 16:07:04 matt Exp $ +# $NetBSD: Makefile,v 1.22 2001/03/27 02:23:28 simonb Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 .include # for UNPRIVILEGED @@ -12,9 +12,26 @@ HIDEGAME=hidegame SETGIDGAME=yes USETBL= MAN= phantasia.6 -CLEANFILES+=map setup setup.lo host_phantglobs.lo -realall: setup phantasia +FILESDIR=/var/games/phantasia +FILESOWN=games +FILESGRP=games +FILESMODE=0660 +ALLFILES=gold lastdead mess monsters void motd characs scoreboard +FILES=gold lastdead mess monsters void motd +# don't overwrite existing characters or scorefile +.for file in characs scoreboard +.if !exists(${DESTDIR}/${FILESDIR}/${file}) +FILES+=${file} +.endif +.endfor + +CLEANFILES+=map setup setup.lo host_phantglobs.lo ${ALLFILES} + +${PROG}: ${FILES} + +${FILES}: setup + ${.OBJDIR}/setup -m ${.CURDIR}/monsters.asc setup: host_phantglobs.lo setup.lo monsters.asc ${LIBM} ${HOST_LINK.c} host_phantglobs.lo setup.lo -o ${.TARGET} -lm @@ -25,12 +42,6 @@ host_phantglobs.lo: ${.CURDIR}/phantglobs.c setup.lo: ${.CURDIR}/setup.c ${HOST_COMPILE.c} -o setup.lo ${.CURDIR}/setup.c -afterinstall: - DESTDIR=${DESTDIR} ./setup -m ${.CURDIR}/monsters.asc -.if !defined(UNPRIVILEGED) - chown games:games ${DESTDIR}/var/games/phantasia/* -.endif - # Make Phantasia map. Change the map commands reflect your installation. # PLOTDEVICE is used for plotting the map. Change as appropriate. -- cgit v1.2.3-56-ge451