summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/Makefile72
1 files changed, 39 insertions, 33 deletions
diff --git a/sys/arch/mvme88k/Makefile b/sys/arch/mvme88k/Makefile
index bd54b47ad11..faefde126a4 100644
--- a/sys/arch/mvme88k/Makefile
+++ b/sys/arch/mvme88k/Makefile
@@ -1,36 +1,42 @@
-# $OpenBSD: Makefile,v 1.6 2005/05/06 11:16:48 pedro Exp $
-
-# from: @(#)Makefile 8.1 (Berkeley) 6/11/93
-#
-# Makefile for mvme88k links, tags file
-
-S=${.CURDIR}/../..
-.include "$S/kern/Make.tags.inc"
-
-NOPROG= noprog
-NOMAN= noman
-NOOBJ= noobj
-
-TMVME88K=${.CURDIR}/tags
-SUBDIR= stand
-DIRS= conf dev include mvme88k
-
-links::
- -for i in ${DIRS}; do \
- echo $$i ; \
- cd ${.CURDIR} ; \
- (cd $$i && { rm -f tags; ln -s ${TMVME88K} tags; }) done
-
-SMVME88K=$S/arch/mvme88k/dev/*.[ch] $S/arch/mvme88k/include/*.[ch] \
- $S/arch/mvme88k/mvme88k/*.[ch]
-AMVME88K=$S/arch/mvme88k/mvme88k/*.[sS]
-
-tags:
- -ctags -wdtf ${TMVME88K} ${COMM} ${SMVME88K}
- egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AMVME88K} | \
- sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
- >> ${TMVME88K}
- sort -o ${TMVME88K} ${TMVME88K}
+# $OpenBSD: Makefile,v 1.7 2010/05/31 22:21:44 deraadt Exp $
+
+S= ${.CURDIR}/../..
+KFILE= GENERIC
+.if exists(conf/GENERIC.MP)
+KFILE= GENERIC.MP
+.endif
+TDIRS= ${_arch} include pci isa eisa
+TAGS= ${.CURDIR}/tags
+
+NOPROG=
+NOMAN=
+SUBDIR= stand
+
+# config the fattest kernel we can find into a temporary dir
+# to create a Makefile. Then use make to pull some variables
+# out and push them into the sub-shell to expand the paths,
+# and finally run ctags.
+tags::
+ TDIR=`mktemp -d /tmp/_tagXXXXXXXXXX` || exit 1; \
+ eval "S=${S}" && \
+ config -s ${S} -b $${TDIR} ${.CURDIR}/conf/${KFILE} && \
+ eval "_arch=\"`make -V _arch -f $${TDIR}/Makefile`\"" && \
+ eval "_mach=\"`make -V _mach -f $${TDIR}/Makefile`\"" && \
+ eval "_machdir=\$S/arch/$${_mach}" && \
+ eval "_archdir=\$S/arch/$${_arch}" && \
+ eval "SFILES=\"`make -V SFILES -f $${TDIR}/Makefile`\"" && \
+ eval "CFILES=\"`make -V CFILES -f $${TDIR}/Makefile`\"" && \
+ eval "AFILES=\"`make -V AFILES -f $${TDIR}/Makefile`\"" && \
+ ctags -wdt -f ${TAGS} $${CFILES} && \
+ egrep "^[_A-Z]*ENTRY[_A-Z]*\(.*\)" $${SFILES} $${AFILES} | \
+ sed "s;\\([^:]*\\):\\([^(]*\\)(\\([^, )]*\\)\\(.*\\);\\3 \\1 /^\\2(\\3\\4$$/;" \
+ >> ${TAGS} && \
+ sort -o ${TAGS} ${TAGS} && \
+ rm -rf $${TDIR}
+
+links:
+ -for i in conf ${TDIRS}; do \
+ (cd $$i && rm -f tags; ln -s tags tags); done
obj: _SUBDIRUSE