Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Feb 1998 19:56:41 +0900
From:      Shigio Yamaguchi <shigio@wafu.netgate.net>
To:        freebsd-hackers@FreeBSD.ORG
Cc:        shigio@wafu.netgate.net
Subject:   bsd.prog.mk for new global(1)
Message-ID:  <199802081057.CAA07552@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Now, global(1) in -current can understand 'obj' directory of BSD build system,
you can put tag files in 'obj' directory.

For example,

	% cd /usr/src/sys
	% gtags /usr/obj/usr/src/sys	<- make tag files in 'obj' directory.
	% ls GTAGS
	ls: GTAGS: No such file or directory
	% global -x fork
	fork              86 kern/kern_fork.c fork(p, uap, retval)

So, following modification would be useful, I think.

[/usr/share/mk/bsd.prog.mk]

.if !target(tags)
tags: ${SRCS} _SUBDIR
.if defined(PROG)
        cd ${.CURDIR} && gtags ${GTAGSFLAGS} ${.OBJDIR}			...(1)
.if defined(HTML)
        cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR}	...(2)
.endif
.endif
.endif

(1) Gtags put tag files in ${.OBJDIR}.
(2) Htags locates tag files in ${.OBJDIR} and put hypertext in ${.OBJDIR}.

[/usr/share/mk/sys.mk]

# For tags rule.
GTAGSFLAGS=     -o
HTAGSFLAGS=

-o option suppress making GSYMS file (it's very large).

What do you think?
--
Shigio Yamaguchi (Freelance programmer)
	Mail: shigio@wafu.netgate.net, WWW: http://wafu.netgate.net/tama/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802081057.CAA07552>