This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Replicate src dir in build dir


Simon Marchi <simon.marchi@polymtl.ca> writes:

> I was wondering if this line needed changing
>
> override COMPILE.pre = source='$<' object='$@' libtool=no \
> 	DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
>
> In particular, is DEPDIR treated as relative to the created object
> file or relative to the current working directory by depcomp.  I
> honestly don't even know when this actually used.

depcomp has already taken care of it,

# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.

I hack Makefile, to set "depmode=gcc",

# Dependency tracking information.
DEPMODE = depmode=gcc

and "make arch/amd64.o",

source='../../binutils-gdb/gdb/arch/amd64.c' object='arch/amd64.o' libtool=no DEPDIR=.deps depmode=gcc /bin/bash ../../binutils-gdb/gdb/../depcomp g++ -x c++ -std=gnu++11 -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-gdb/gdb/../include/opcode -I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/.. -I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber  -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1   -pthread -I/usr/include/guile/2.0 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wformat-nonliteral -Werror -c -o arch/amd64.o ../../binutils-gdb/gdb/arch/amd64.c

and the dependency file is generated in arch/.deps/amd64.Po, which looks
right to me.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]