summaryrefslogtreecommitdiffstats
path: root/games/hack/Makefile
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-05-15 16:54:05 +0000
committernate <nate@FreeBSD.org>1996-05-15 16:54:05 +0000
commit1b38972b73c86fc36298f9cde6ae0ea45ad5c930 (patch)
tree6c66b37513a898ada96b6cccf58a99977a624b09 /games/hack/Makefile
parentdea581dd2c9511121d8572e668d503154a3b802c (diff)
downloadFreeBSD-src-1b38972b73c86fc36298f9cde6ae0ea45ad5c930.zip
FreeBSD-src-1b38972b73c86fc36298f9cde6ae0ea45ad5c930.tar.gz
The Makefile assumed that builder had '.' in it's path, which is a
security hole for root. Fix this oversight and clean up the build of 'hack.onames.h' which should be built everytime. Tested with/without obj directories and .depend files. Noticed by: "Christoph P. Kukulies" <kuku@gilberto.physik.rwth-aachen.de>
Diffstat (limited to 'games/hack/Makefile')
-rw-r--r--games/hack/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/games/hack/Makefile b/games/hack/Makefile
index 037c24b..6824bd5 100644
--- a/games/hack/Makefile
+++ b/games/hack/Makefile
@@ -15,11 +15,15 @@ SRCS= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
MAN6= hack.6
DPADD= ${LIBTERMCAP} ${LIBCOMPAT}
LDADD= -ltermcap -lcompat
-CFLAGS+= -fwritable-strings
+CFLAGS+= -fwritable-strings -I${.CURDIR} -I.
HIDEGAME=hidegame
+DPSRCS+= hack.onames.h
+CLEANFILES+= hack.onames.h makedefs
+
+.depend: hack.onames.h
hack.onames.h: makedefs def.objects.h
- makedefs ${.CURDIR}/def.objects.h > hack.onames.h
+ ./makedefs ${.CURDIR}/def.objects.h > hack.onames.h
makedefs: makedefs.c
${CC} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${.PREFIX}.c
OpenPOWER on IntegriCloud