From 83ae023014d7ed4c9a0e539a355ced30d9fb758b Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 27 May 1996 09:31:46 +0000 Subject: Find caesar and strfile properly. Generate .dat files on build state --- games/fortune/Makefile | 10 +++------- games/fortune/datfiles/Makefile | 25 ++++++++++++++++++++----- 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'games/fortune') diff --git a/games/fortune/Makefile b/games/fortune/Makefile index 70778cf..d360284 100644 --- a/games/fortune/Makefile +++ b/games/fortune/Makefile @@ -1,15 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 -SUBDIR= fortune - -.ifmake (clean) || (cleandir) || (obj) -SUBDIR+=datfiles -.endif +SUBDIR= fortune .if !make(install) && !make(distribute) SUBDIR+=strfile -.else -SUBDIR+=datfiles .endif +SUBDIR+= datfiles + .include diff --git a/games/fortune/datfiles/Makefile b/games/fortune/datfiles/Makefile index 1c6de42..72786ee 100644 --- a/games/fortune/datfiles/Makefile +++ b/games/fortune/datfiles/Makefile @@ -15,22 +15,37 @@ TYPE= real # THE FOURTH LINE #TYPE= fake +.if exists(${.CURDIR}/../../caesar/obj/caesar) +CAESAR=${.CURDIR}/../../caesar/obj/caesar +.elif exists(${.CURDIR}/../../caesar/caesar) +CAESAR=${.CURDIR}/../../caesar/caesar +.else +CAESAR=/usr/games/caesar +.endif + +.if exists(${.CURDIR}/../strfile/obj/strfile) +STRFILE=${.CURDIR}/../strfile/obj/strfile +.else +STRFILE=${.CURDIR}/../strfile/strfile +.endif + CLEANFILES+=${BLDS} -install: ${SRCS} ${BLDS} +all: ${SRCS} ${BLDS} + +install: (cd ${.CURDIR} && ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ ${SRCS} ${DESTDIR}/usr/share/games/fortune) ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${BLDS} \ ${DESTDIR}/usr/share/games/fortune fortunes.dat fortunes2.dat fortunes2-o.dat limerick.dat startrek.dat zippy.dat: - ${.CURDIR}/../strfile/obj/strfile -rs \ - ${.CURDIR}/${.TARGET:R} ${.TARGET} + ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET} fortunes-o.dat: fortunes-o - ${.CURDIR}/../strfile/obj/strfile -rsx fortunes-o ${.TARGET} + ${STRFILE} -rsx fortunes-o ${.TARGET} fortunes-o: fortunes-o.${TYPE} - PATH=../../caesar:$$PATH ; caesar 13 < ${.ALLSRC} > ${.TARGET} + ${CAESAR} 13 < ${.ALLSRC} > ${.TARGET} .include -- cgit v1.1