From owner-freebsd-hackers Wed Feb 25 02:33:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA20373 for freebsd-hackers-outgoing; Wed, 25 Feb 1998 02:33:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wafu.netgate.net (wafu.netgate.net [204.145.147.80]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id CAA20355 for ; Wed, 25 Feb 1998 02:32:58 -0800 (PST) (envelope-from shigio@wafu.netgate.net) Message-Id: <199802251032.CAA20355@hub.freebsd.org> Received: (qmail 22741 invoked from network); 25 Feb 1998 02:34:03 -0000 Received: from ins8.tama-ap3.dti.ne.jp (HELO chiota.signet.or.jp) (203.181.67.8) by wafu.netgate.net with SMTP; 25 Feb 1998 02:34:03 -0000 Received: from chiota.signet.or.jp (localhost.signet.or.jp [127.0.0.1]) by chiota.signet.or.jp (8.8.5/) with ESMTP id TAA01365; Wed, 25 Feb 1998 19:31:49 +0900 (JST) To: hackers@FreeBSD.ORG Cc: shigio@wafu.netgate.net Subject: modification of bsd.prog.mk for global. Date: Wed, 25 Feb 1998 19:31:49 +0900 From: Shigio Yamaguchi Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, 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 <- global locates GTAGS file in 'obj'. fork 86 kern/kern_fork.c fork(p, uap, retval) So, if you want to keep 'src' directory read-only, 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}. By the way, current gtags makes GSYMS file by default. If you think it is too large, you can use -o option like this. (-o option suppress making GSYMS file.) [/usr/share/mk/sys.mk] --------------------------------------------------------------------- # For tags rule. GTAGSFLAGS= -o HTAGSFLAGS= --------------------------------------------------------------------- -- 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 freebsd-hackers" in the body of the message