From 8f6735a7b8851d9f9e1e24b84f4db412ff678e37 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 24 Mar 1997 22:15:37 +0000 Subject: [PATCH] - Makefile cleanups --- atc/Makefile | 17 ++++------------- boggle/Makefile | 31 ++++++++++++++++++------------- boggle/boggle/Makefile | 8 +++----- caesar/Makefile | 7 ++----- cribbage/Makefile | 9 ++++----- fish/Makefile | 8 +++----- fortune/datfiles/Makefile | 11 ++++------- hack/Makefile | 12 ++++++++---- larn/Makefile | 9 ++++----- monop/Makefile | 8 +++----- quiz/Makefile | 8 +++----- robots/Makefile | 9 +++++---- wargames/Makefile | 7 ++----- wump/Makefile | 8 +++----- 14 files changed, 66 insertions(+), 86 deletions(-) diff --git a/atc/Makefile b/atc/Makefile index 363c811e..367a7e64 100644 --- a/atc/Makefile +++ b/atc/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -13,17 +13,8 @@ GAMES= ATC_scores Game_List Killer crossover default easy game_2 \ 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 diff --git a/boggle/Makefile b/boggle/Makefile index 12718421..7e42b913 100644 --- a/boggle/Makefile +++ b/boggle/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -7,17 +7,22 @@ MKDICT!=cd $(.CURDIR)/mkdict; \ 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 +${MKDICT} ${MKINDEX}: ${SUBDIR} + + +dictionary: ${MKDICT} ${WORDS} + rm -f ${.TARGET} + ${MKDICT} < ${WORDS} > ${.TARGET} + +dictindex: ${MKINDEX} dictionary + rm -f ${.TARGET} + ${MKINDEX} < dictionary > ${.TARGET} + +.include diff --git a/boggle/boggle/Makefile b/boggle/boggle/Makefile index 0ef7b1df..39995307 100644 --- a/boggle/boggle/Makefile +++ b/boggle/boggle/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -7,10 +7,8 @@ DPADD= ${LIBCURSES} ${LIBTERM} 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 diff --git a/caesar/Makefile b/caesar/Makefile index b2100b11..c7b5421a 100644 --- a/caesar/Makefile +++ b/caesar/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -6,9 +6,6 @@ MAN= caesar.6 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 diff --git a/cribbage/Makefile b/cribbage/Makefile index 948101b0..77518c01 100644 --- a/cribbage/Makefile +++ b/cribbage/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -7,9 +7,8 @@ LDADD= -lcurses -ltermlib 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 diff --git a/fish/Makefile b/fish/Makefile index ad478edb..f9533a0a 100644 --- a/fish/Makefile +++ b/fish/Makefile @@ -1,12 +1,10 @@ -# $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 diff --git a/fortune/datfiles/Makefile b/fortune/datfiles/Makefile index d46a0bb4..0c0a3fdc 100644 --- a/fortune/datfiles/Makefile +++ b/fortune/datfiles/Makefile @@ -1,4 +1,4 @@ -# $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 # for INSTALL_OFFENSIVE_FORTUNES @@ -25,13 +25,10 @@ STRFILE!=cd $(.CURDIR)/../strfile; \ 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. diff --git a/hack/Makefile b/hack/Makefile index d123d3b7..a233704b 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -20,6 +20,8 @@ DPADD+= ${LIBTERM} ${LIBCOMPAT} LDADD+= -ltermcap -lcompat HIDEGAME=hidegame CLEANFILES+=hack.onames.h makedefs +FILES=hh data +FILESDIR=/var/games/hackdir ${PROG}: hack.onames.h @@ -29,13 +31,15 @@ hack.onames.h: makedefs def.objects.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 diff --git a/larn/Makefile b/larn/Makefile index 3ad81a06..897fa71a 100644 --- a/larn/Makefile +++ b/larn/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -61,9 +61,8 @@ SRCS= main.c object.c create.c tok.c display.c global.c data.c io.c \ 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 diff --git a/monop/Makefile b/monop/Makefile index 7edf5feb..2ebbdf3c 100644 --- a/monop/Makefile +++ b/monop/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -9,6 +9,8 @@ DPADD+= ${LIBCOMPAT} LDADD+= -lcompat HIDEGAME=hidegame CLEANFILES+=initdeck cards.pck +FILES=cards.pck +FILESDIR=/usr/share/games monop: cards.pck @@ -18,8 +20,4 @@ cards.pck: initdeck 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 diff --git a/quiz/Makefile b/quiz/Makefile index 05d0baf3..807ac4fe 100644 --- a/quiz/Makefile +++ b/quiz/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -9,9 +9,7 @@ CATS= africa america areas arith asia babies bard chinese collectives \ 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 diff --git a/robots/Makefile b/robots/Makefile index ec12c5d7..50d4d6ae 100644 --- a/robots/Makefile +++ b/robots/Makefile @@ -1,4 +1,4 @@ -# $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 @@ -10,8 +10,9 @@ DPADD= ${LIBCURSES} ${LIBTERM} 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 diff --git a/wargames/Makefile b/wargames/Makefile index 583367ed..feccb667 100644 --- a/wargames/Makefile +++ b/wargames/Makefile @@ -1,11 +1,8 @@ -# $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 diff --git a/wump/Makefile b/wump/Makefile index 45dce1da..0109c0ee 100644 --- a/wump/Makefile +++ b/wump/Makefile @@ -1,12 +1,10 @@ -# $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 -- 2.47.1