Makefile revision 1.8
11.8Sdyoung#	$NetBSD: Makefile,v 1.8 2009/08/18 17:21:51 dyoung Exp $
21.7Sdyoung
31.7Sdyoung.include <bsd.own.mk>
41.1Scl
51.1Scl# Makefile for xen tags file
61.1Scl
71.1Scl.include "../../kern/Make.tags.inc"
81.1Scl
91.1Scl.ifmake tags
101.1Scl.include "${SYSDIR}/arch/xen/conf/Makefile.arch.inc"
111.1Scl.endif
121.1Scl
131.1SclTXEN=	${SYSDIR}/arch/xen/tags
141.1Scl
151.8SdyoungSXEN!=	${TOOL_AWK} '/^\#/ { next } ($$2 ~ /^arch.*\.[c]$$/) {print "${SYSDIR}/" $$2}' \
161.1Scl		${SYSDIR}/arch/xen/conf/files.xen
171.8SdyoungSXEN+=	${SYSDIR}/arch/xen/include/*.h
181.8SdyoungSXEN+=	${SYSDIR}/arch/xen/include/*/*.h
191.8SdyoungSXEN+=	${SYSDIR}/arch/xen/include/*/*/*.h
201.8SdyoungAXEN!=	${TOOL_AWK} '/^\#/ { next } ($$2 ~ /^arch.*\.[sS]$$/) {print "${SYSDIR}/" $$2}' \
211.1Scl		${SYSDIR}/arch/xen/conf/files.xen
221.1SclAXEN+=	${SYSDIR}/arch/xen/${XEN_BUILD}/*.[sS]
231.1Scl
241.1Scl# Directories in which to place tags links
251.1SclDXEN=	xen ${XEN_MACHINE_ARCHS} include
261.1Scl
271.1Scltags:
281.6Sdyoung	-rm -f ${TXEN}
291.6Sdyoung	-echo ${SXEN} | xargs ctags -wadtf ${TXEN}
301.6Sdyoung	${FINDCOMM} | xargs ctags -wadtf ${TXEN}
311.1Scl	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AXEN} | \
321.7Sdyoung	    ${TOOL_SED} -e \
331.8Sdyoung	"s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3	\1	/^\2(\3\4$$/;" \
341.1Scl		>> ${TXEN}
351.1Scl	sort -o ${TXEN} ${TXEN}
361.1Scl
371.1Scllinks:
381.1Scl	-for i in ${DXEN}; do \
391.1Scl	    (cd $$i && rm -f tags; ln -s ../tags tags); done
401.1Scl
411.1Scl
421.2SbouyerSUBDIR=	compile include
431.1Scl
441.1Scl.include <bsd.subdir.mk>
45