Skip to content

Commit f0cec20

Browse files
vriesdavidmalcolm
authored andcommitted
Makefile: Use installed gcc-with-cpychecker
The gcc-with-cpychecker script finds python.so relative to itself: ... abspath = os.path.abspath(os.path.dirname(sys.argv[0])) PLUGIN = os.path.join(abspath, 'python.so') ... Consequently, when using $(srcdir)./gcc-with-cpychecker in a seperate build dir, it cannot find python.so. Create an installed gcc-with-cpychecker by copying it from the source dir to the build dir, and use it to run the demo.
1 parent dc5b200 commit f0cec20

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ifneq ($(srcdir),)
1919
VPATH = $(srcdir)
2020
endif
2121
xmldir = $(srcdir)./gcc-c-api/
22+
pwd = $(shell pwd -P)
2223

2324
.PHONY: all clean debug dump_gimple plugin show-ssa tarball \
2425
test-suite testcpychecker testcpybuilder testdejagnu \
@@ -291,9 +292,12 @@ dump_gimple:
291292
debug: plugin
292293
$(INVOCATION_ENV_VARS) $(CC) -v $(TEST_CFLAGS) $(CURDIR)/test.c
293294

295+
$(pwd)/gcc-with-cpychecker: gcc-with-cpychecker
296+
cp $< $@
297+
294298
# A simple demo, to make it easy to demonstrate the cpychecker:
295-
demo: demo.c plugin
296-
$(INVOCATION_ENV_VARS) $(srcdir)./gcc-with-cpychecker -c $(PYTHON_INCLUDES) $<
299+
demo: demo.c plugin $(pwd)/gcc-with-cpychecker
300+
$(INVOCATION_ENV_VARS) ./gcc-with-cpychecker -c $(PYTHON_INCLUDES) $<
297301

298302
# Run 'demo', and verify the output.
299303
testdemo: DEMO_REF=$(shell \

0 commit comments

Comments
 (0)