Date: Wed, 25 Feb 1998 19:31:49 +0900 From: Shigio Yamaguchi <shigio@wafu.netgate.net> To: hackers@FreeBSD.ORG Cc: shigio@wafu.netgate.net Subject: modification of bsd.prog.mk for global. Message-ID: <199802251032.CAA20355@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802251032.CAA20355>