This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: [suggestion] new target GTAGS.
- To: tromey at redhat dot com
- Subject: Re: [suggestion] new target GTAGS.
- From: Shigio Yamaguchi <shigio at tamacom dot com>
- Date: Fri, 22 Dec 2000 15:31:50 +0900
- cc: Shigio Yamaguchi <shigio at tamacom dot com>, automake at gnu dot org
- List-Id: Discussion list for automake <automake.gnu.org><mailto:automake-request@gnu.org?subject=unsubscribe>
- References: <87itoddlrf.fsf@creche.redhat.com>
> Here is what I'm adding:
>
> ## Support `Global' tags.
> GTAGS:
> here=`cd $(top_builddir) && pwd` && cd $(top_srcdir) && gtags -i $$
here
All right. Thank you.
> >> By the way, where does automake put tag files to?
>
> It puts them in the build directory.
> This might be the same as the source directory, if the user chose to
> configure in the source tree.
In BSD system, '/usr/obj' + <current directory> is used for build directory.
(from now on, I say it 'obj' directory.)
% cd /home/owner/prog
% make obj <= make 'obj' directory
/usr/obj/home/owner/prog created for /home/owner/prog
% make
cc -O -pipe -Wall -I/home/owner/prog -c /home/owner/prog/main.c
...
% ls *.o
ls: No match. <= source directory is read only.
% cd /usr/obj/home/owner/prog
% ls *.o
main.o ... <= *.o files are wrtten in 'obj' directory.
...
To support BSD build system, global locate tag files not only in source
directory but also in 'obj' directory.
% cd /home/owner/prog
% make obj <= make 'obj' directory
% gtags /usr/obj/home/owner/prog <= write tag files in 'obj'
% ls G* directory.
ls: No match.
% global -x main
main 83 main.c main(argc, argv)
% cd /usr/obj/home/owner/prog
% ls G*
GPATH GRTAGS GSYMS GTAGS
If there is a convention in automake, I can support it.
--
Shigio Yamaguchi - Tama Communications Corporation
Mail: shigio@tamacom.com, (Spare mail: shigio@par.odn.ne.jp)