Bug #537
closedmake CFLAGS=-g breaks examples build
100%
Description
cd doc/examples/easy-ust
compudj@thinkos:~/git/lttng-ust/doc/examples/easy-ust$ (git:master $)> make
gcc -I. -c -o tp.o tp.c
gcc -o sample sample.o tp.o -ldl -llttng-ust
compudj@thinkos:~/git/lttng-ust/doc/examples/easy-ust$ (git:master $)> make clean
rm -f .html
rm -f *.o sample
compudj@thinkos:~/git/lttng-ust/doc/examples/easy-ust$ (git:master $)> make CFLAGS=-g
gcc -g -c -o sample.o sample.c
gcc -g -c -o tp.o tp.c
In file included from sample_component_provider.h:143:0,
from tp.c:33:
/usr/local/include/lttng/tracepoint-event.h:60:28: fatal error: ./sample_component_provider.h: No such file or directory
compilation terminated.
make: ** [tp.o] Error 1
for some reason, the CFLAGS += have no effect when a CFLAGS is specified on the command line.
Updated by Jérémie Galarneau over 11 years ago
'make CFLAGS=-g'
This will override the CFLAGS variable defined in the Makefile.
http://www.gnu.org/software/make/manual/html_node/Overriding.html
Updated by Mathieu Desnoyers over 11 years ago
So the Makefile is wrong.
CFLAGS += -I../../../include/
is therefore getting wiped out, and should not.
Basically,
make CFLAGS=-g
from the project root should never fail.
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Updated by Jérémie Galarneau over 11 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset 2e3906003540b455b473ce06fdde4ba38208e4b0.