]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - boggle/Makefile
eliminate/document non-literal format strings
[bsdgames-darwin.git] / boggle / Makefile
index ed47dcb3a3125b3f8d643bd02e8f1f6ae3221daa..59d2f358ce87e7a1b36e66218c4f5fa540e0f7b1 100644 (file)
@@ -1,15 +1,39 @@
+#      $NetBSD: Makefile,v 1.22 2003/10/21 10:01:19 lukem Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/11/93
 
 #      @(#)Makefile    8.1 (Berkeley) 6/11/93
 
+.include <bsd.own.mk>
+
 SUBDIR=        boggle mkdict mkindex
 
 SUBDIR=        boggle mkdict mkindex
 
-beforeinstall:
-       mkdict/obj/mkdict < /usr/share/dict/words > \
-           ${DESTDIR}/usr/share/games/boggle/dictionary
-       mkindex/obj/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
-       
+MKDICTDIR!= cd $(.CURDIR)/mkdict; ${PRINTOBJDIR}
+MKDICT=${MKDICTDIR}/mkdict
+MKINDEXDIR!= cd $(.CURDIR)/mkindex; ${PRINTOBJDIR}
+MKINDEX=${MKINDEXDIR}/mkindex
+WORDS=${NETBSDSRCDIR}/share/dict/web2
+DICTFILES=dictionary dictindex
+.if ${MKSHARE} != "no"
+FILES=${DICTFILES}
+FILESDIR=/usr/share/games/boggle
+.endif
+CLEANFILES+=${DICTFILES}
+
+realall: ${FILES}
+
+${MKDICT}:
+       @cd ${.CURDIR}/mkdict && ${MAKE}
+
+${MKINDEX}:
+       @cd ${.CURDIR}/mkindex && ${MAKE}
+
+dictionary: ${WORDS} ${MKDICT}
+       ${_MKTARGET_CREATE}
+       rm -f ${.TARGET}
+       ${MKDICT} < ${WORDS} > ${.TARGET}
+
+dictindex: dictionary ${MKINDEX}
+       ${_MKTARGET_CREATE}
+       rm -f ${.TARGET}
+       ${MKINDEX} < dictionary > ${.TARGET}
+
+.include <bsd.prog.mk>
 .include <bsd.subdir.mk>
 .include <bsd.subdir.mk>