Skip to content

Commit 53c1043

Browse files
vriesdavidmalcolm
authored andcommitted
Makefiles: Add missing srcdir uses
Add various srcdir prefixes and srcdir relative includes.
1 parent 42f959a commit 53c1043

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ $(PLUGIN_OBJECT_GENERATED_FILES): CPPFLAGS+= $(if $(srcdir),-I$(srcdir))
165165
# This is the standard .c->.o recipe, but it needs to be stated
166166
# explicitly to support the case that $(srcdir) is not blank.
167167
$(PLUGIN_OBJECT_FILES): %.o: %.c autogenerated-config.h gcc-python.h $(LIBGCC_C_API_SO) autogenerated-EXTRA_CFLAGS.txt
168-
$(COMPILE.c) $(shell cat autogenerated-EXTRA_CFLAGS.txt) $(OUTPUT_OPTION) $<
168+
$(COMPILE.c) $(shell cat autogenerated-EXTRA_CFLAGS.txt) $(OUTPUT_OPTION) -I$(srcdir)./ -I$(srcdir)./gcc-c-api -I./gcc-c-api $<
169169

170170
print-gcc-version: print-gcc-version.c autogenerated-EXTRA_CFLAGS.txt
171171
$(CC) \
@@ -279,15 +279,15 @@ test: plugin
279279

280280
# Selftest for the cpychecker.py code:
281281
testcpychecker: plugin
282-
$(INVOCATION_ENV_VARS) $(PYTHON) testcpychecker.py -v
282+
$(INVOCATION_ENV_VARS) $(PYTHON) $(srcdir)./testcpychecker.py -v
283283

284284
# Selftest for the cpybuilder code:
285285
testcpybuilder:
286-
$(PYTHON) testcpybuilder.py -v
286+
$(PYTHON) $(srcdir)./testcpybuilder.py -v
287287

288288
# Selftest for the dejagnu.py code:
289289
testdejagnu:
290-
$(PYTHON) dejagnu.py -v
290+
$(PYTHON) $(srcdir)./dejagnu.py -v
291291

292292
dump_gimple:
293293
$(CC) -fdump-tree-gimple $(CURDIR)/test.c
@@ -316,14 +316,14 @@ testdemo: plugin print-gcc-version
316316
| sed 's/:[0-9][0-9]*: warning:/:: warning:/;s/ \[enabled by default\]//' \
317317
| sed "s%$(srcdir)demo.c:%demo.c:%g" \
318318
> demo.filtered
319-
diff $(DEMO_REF) demo.filtered
319+
diff $(srcdir)./$(DEMO_REF) demo.filtered
320320
rm demo.out demo.err demo.filtered
321321

322322
json-examples: plugin
323323
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-cpychecker -I/usr/include/python2.7 -c libcpychecker_html/test/example1/bug.c
324324

325325
test-suite: plugin print-gcc-version testdejagnu testdemo
326-
$(INVOCATION_ENV_VARS) $(PYTHON) run-test-suite.py
326+
$(INVOCATION_ENV_VARS) $(PYTHON) $(srcdir)./run-test-suite.py
327327

328328
show-ssa: plugin
329329
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-python examples/show-ssa.py test.c

gcc-c-api/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ $(LIBGCC_C_API_SO): $(OBJECT_FILES)
9595
# This is the standard .c->.o recipe, but it needs to be stated
9696
# explicitly to support the case that $(srcdir) is not blank.
9797
$(OBJECT_FILES): %.o: %.c $(GENERATED_HEADERS) ../autogenerated-EXTRA_CFLAGS.txt
98-
$(COMPILE.c) $(shell cat ../autogenerated-EXTRA_CFLAGS.txt) $(OUTPUT_OPTION) $<
98+
$(COMPILE.c) $(shell cat ../autogenerated-EXTRA_CFLAGS.txt) $(OUTPUT_OPTION) -I$(srcdir)./ $<
9999

100100
autogenerated-casts.c: $(SOURCE_XML) xmltypes.py generate-casts-c.py
101101
$(PYTHON) $(srcdir)./generate-casts-c.py $@ $(xmldir)

0 commit comments

Comments
 (0)