Support GLOBAL style tags.
This commit is contained in:
parent
1c662397c4
commit
6eb5e456f1
@ -52,13 +52,4 @@ libkern.${MACHINE}:: ${KMSRCS}
|
||||
cp -p ${.ALLSRC} /sys/libkern/${MACHINE}
|
||||
.endif
|
||||
|
||||
#beforeinstall: tags
|
||||
# ${INSTALL} ${COPY} -o bin -g bin -m 444 tags /var/db/libc.tags
|
||||
|
||||
tags: ${SRCS}
|
||||
ctags ${.ALLSRC:M*.c}
|
||||
egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \
|
||||
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
|
||||
>> tags; sort -o tags tags
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: bsd.dep.mk,v 1.10 1997/02/22 13:56:08 peter Exp $
|
||||
# $Id: bsd.dep.mk,v 1.11 1997/04/09 16:10:23 bde Exp $
|
||||
#
|
||||
# The include file <bsd.dep.mk> handles Makefile dependencies.
|
||||
#
|
||||
@ -24,8 +24,8 @@
|
||||
# them in the file ${DEPENDFILE}.
|
||||
#
|
||||
# tags:
|
||||
# Create a tags file for the source files.
|
||||
#
|
||||
# Create a (GLOBAL) gtags file for the source files.
|
||||
# If HTML is defined, htags is also run after gtags.
|
||||
|
||||
|
||||
MKDEPCMD?= mkdep
|
||||
@ -71,20 +71,26 @@ afterdepend:
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(NOTAGS)
|
||||
tags:
|
||||
.endif
|
||||
|
||||
.if !target(tags)
|
||||
.if defined(SRCS)
|
||||
tags: ${SRCS} _SUBDIR
|
||||
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
|
||||
sed "s;\${.CURDIR}/;;" > tags
|
||||
.else
|
||||
tags: _SUBDIR
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(SRCS)
|
||||
.if !target(cleandepend)
|
||||
cleandepend: _SUBDIR
|
||||
rm -f ${DEPENDFILE} tags
|
||||
rm -f ${DEPENDFILE}
|
||||
rm -f ${.CURDIR}/GRTAGS ${.CURDIR}/GTAGS
|
||||
.if defined(HTML)
|
||||
rm -rf ${.CURDIR}/HTML
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
|
||||
# $Id$
|
||||
# $Id: bsd.kmod.mk,v 1.30 1997/02/22 13:56:10 peter Exp $
|
||||
#
|
||||
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
|
||||
# <bsd.kmod.mk> includes the file named "../Makefile.inc" if it exists,
|
||||
@ -185,11 +185,17 @@ distribute: _SUBDIR
|
||||
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
||||
.endif
|
||||
|
||||
.if defined(NOTAGS)
|
||||
tags:
|
||||
.endif
|
||||
|
||||
.if !target(tags)
|
||||
tags: ${SRCS} _SUBDIR
|
||||
.if defined(PROG)
|
||||
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
|
||||
sed "s;\${.CURDIR}/;;" > tags
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
|
||||
# $Id: bsd.lib.mk,v 1.51 1997/04/09 16:10:24 bde Exp $
|
||||
# $Id: bsd.lib.mk,v 1.52 1997/04/09 20:31:15 jdp Exp $
|
||||
#
|
||||
|
||||
.if exists(${.CURDIR}/../Makefile.inc)
|
||||
@ -256,10 +256,16 @@ distribute: _SUBDIR
|
||||
lint:
|
||||
.endif
|
||||
|
||||
.if defined(NOTAGS)
|
||||
tags:
|
||||
.endif
|
||||
|
||||
.if !target(tags)
|
||||
tags: ${SRCS} _SUBDIR
|
||||
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:M*.c} | \
|
||||
sed "s;\${.CURDIR}/;;" > tags
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(NOMAN)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
|
||||
# $Id: bsd.prog.mk,v 1.45 1997/03/08 19:47:08 bde Exp $
|
||||
# $Id: bsd.prog.mk,v 1.46 1997/04/09 16:10:27 bde Exp $
|
||||
|
||||
.if exists(${.CURDIR}/../Makefile.inc)
|
||||
.include "${.CURDIR}/../Makefile.inc"
|
||||
@ -148,11 +148,17 @@ lint: ${SRCS} _SUBDIR
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(NOTAGS)
|
||||
tags:
|
||||
.endif
|
||||
|
||||
.if !target(tags)
|
||||
tags: ${SRCS} _SUBDIR
|
||||
.if defined(PROG)
|
||||
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
|
||||
sed "s;\${.CURDIR}/;;" > tags
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
|
||||
# $Id: bsd.subdir.mk,v 1.15 1997/03/30 23:39:39 scrappy Exp $
|
||||
# $Id: bsd.subdir.mk,v 1.16 1997/03/31 05:30:16 scrappy Exp $
|
||||
#
|
||||
# The include file <bsd.subdir.mk> contains the default targets
|
||||
# for building subdirectories. It has the same seven targets
|
||||
@ -57,13 +57,35 @@ ${SUBDIR}::
|
||||
${MAKE} all
|
||||
|
||||
|
||||
.for __target in all checkdpadd clean cleandepend cleandir depend lint \
|
||||
maninstall obj objlink tags
|
||||
.for __target in all checkdpadd clean cleandir depend lint \
|
||||
maninstall obj objlink
|
||||
.if !target(__target)
|
||||
${__target}: _SUBDIRUSE
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.if !target(tags)
|
||||
.if defined(TAGS)
|
||||
tags:
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.else
|
||||
tags: _SUBDIRUSE
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(cleandepend)
|
||||
cleandepend: _SUBDIRUSE
|
||||
.if defined(TAGS)
|
||||
@rm -f ${.CURDIR}/GTAGS ${.CURDIR}/GRTAGS
|
||||
.if defined(HTML)
|
||||
@rm -rf ${.CURDIR}/HTML
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !target(install)
|
||||
.if !target(beforeinstall)
|
||||
beforeinstall:
|
||||
|
@ -1,5 +1,5 @@
|
||||
# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
|
||||
# $Id$
|
||||
# $Id: sys.mk,v 1.22 1997/02/22 13:56:15 peter Exp $
|
||||
|
||||
unix ?= We run FreeBSD, not UNIX.
|
||||
|
||||
@ -94,6 +94,10 @@ YFLAGS ?=
|
||||
YFLAGS ?= -d
|
||||
.endif
|
||||
|
||||
# For tags rule.
|
||||
GTAGSFLAGS= -se
|
||||
HTAGSFLAGS=
|
||||
|
||||
.if defined(%POSIX)
|
||||
# Posix 1003.2 mandated rules
|
||||
#
|
||||
|
@ -1,5 +1,5 @@
|
||||
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
|
||||
# $Id$
|
||||
# $Id: bsd.kmod.mk,v 1.30 1997/02/22 13:56:10 peter Exp $
|
||||
#
|
||||
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
|
||||
# <bsd.kmod.mk> includes the file named "../Makefile.inc" if it exists,
|
||||
@ -185,11 +185,17 @@ distribute: _SUBDIR
|
||||
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
|
||||
.endif
|
||||
|
||||
.if defined(NOTAGS)
|
||||
tags:
|
||||
.endif
|
||||
|
||||
.if !target(tags)
|
||||
tags: ${SRCS} _SUBDIR
|
||||
.if defined(PROG)
|
||||
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
|
||||
sed "s;\${.CURDIR}/;;" > tags
|
||||
@cd ${.CURDIR} && gtags ${GTAGSFLAGS}
|
||||
.if defined(HTML)
|
||||
@cd ${.CURDIR} && htags ${HTAGSFLAGS}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user