make command outputs wrong relative path
Ian Lance Taylor
iant@google.com
Thu Oct 14 18:15:00 GMT 2010
lulu he <loloseed@gmail.com> writes:
> Here is my Makefile hierarchy:
> ./Makefile
> ./src/Makefile
> ./test/Makefile
>
> # cat ./Makefile
> DIRS=src test
> all: config.mk
> @echo Compiling for \'$(ARCH)\' target
> @set -e; for d in $(DIRS); do $(MAKE) -C $$d $@; done
>
> # make --version
> GNU Make 3.81
>
> # make
> make[1]: Entering directory `/root/projects/dpthread-my-bak/src'
> gcc -O2 -Wall -g -D_GNU_SOURCE -march=i686
> -I/root/projects/dpthread-my-bak/include -D_REENTRANT -g -D__USE_GNU
> -I/usr/local/include -I../include -I. -c dpthread.c
> dpthread.c: In function ‘DBG’:
> dpthread.c:49: warning: unused variable ‘out’
> dpthread.c: In function ‘det_lock’:
> dpthread.c:102: warning: unused variable ‘clock’
> dpthread.c:101: warning: unused variable ‘lret’
> dpthread.c: In function ‘det_join’:
> dpthread.c:130: warning: ‘ret’ is used uninitialized in this function
> make[1]:Leaving directory `/root/projects/dpthread-my-bak/src'
> ...............
>
> file dpthread.c is in path src/, on my other FC11, make command
> outputs : src/dpthread.c.
> But on this Ubuntu10.04 OS, make command outputs: dpthread.c. There is
> no relative path output.
> The relative path is needed for jumping through warning/error outputs
> to the real warning/error location.
> However , without right relative path, I cannot jump efficiently.
Are you talking about the compiler output here? The name the compiler
will use in error messages is simply the name that is passed to the
compiler. Your compilation command above says "dpthread.c", so that is
what the compiler uses in error messages. I have to assume that on your
other system your compilation command says "src/dpthread.c". That is
what you need to change.
If you are talking about the output of the make program, then you are
asking in the wrong place.
Ian
More information about the Gcc-help
mailing list