summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/Makefile9
-rw-r--r--share/mk/bsd.dep.mk24
-rw-r--r--share/mk/bsd.kmod.mk12
-rw-r--r--share/mk/bsd.lib.mk12
-rw-r--r--share/mk/bsd.prog.mk12
-rw-r--r--share/mk/bsd.subdir.mk28
-rw-r--r--share/mk/sys.mk6
-rw-r--r--sys/conf/kmod.mk12
8 files changed, 81 insertions, 34 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index 4fdc2f2..22b1f5a 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -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>
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 90abc88..91d4ee2 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.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
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk
index d209cc1..b1d9773 100644
--- a/share/mk/bsd.kmod.mk
+++ b/share/mk/bsd.kmod.mk
@@ -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
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index c688efd..2d30ee7 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -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)
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index e855cd7..82d9d7d 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -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
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 09a7b2a..b815451 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -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:
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 7da5e92..f67177f 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -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
#
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index d209cc1..b1d9773 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -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
OpenPOWER on IntegriCloud