@@ -97,6 +97,8 @@ PYTHON_CONFIG=python-config
97
97
PYTHON_INCLUDES =$(shell $(PYTHON_CONFIG ) --includes)
98
98
PYTHON_LIBS =$(shell $(PYTHON_CONFIG ) --libs)
99
99
100
+ GCC_PYTHON_PLUGIN_SO := python.so
101
+
100
102
CPPFLAGS+ = -I$(GCCPLUGINS_DIR ) /include -I$(GCCPLUGINS_DIR ) /include/c-family -I. $(PYTHON_INCLUDES )
101
103
# Allow user to pick optimization, choose whether warnings are fatal,
102
104
# and choose debugging information level.
@@ -110,9 +112,9 @@ endif
110
112
111
113
all : autogenerated-config.h testcpybuilder test-suite testcpychecker
112
114
113
- plugin : autogenerated-config.h python.so
115
+ plugin : autogenerated-config.h $( GCC_PYTHON_PLUGIN_SO )
114
116
115
- python.so : $(PLUGIN_OBJECT_FILES )
117
+ $( GCC_PYTHON_PLUGIN_SO ) : $(PLUGIN_OBJECT_FILES )
116
118
$(CC ) $(CPPFLAGS ) $(CFLAGS ) $(LDFLAGS ) -shared $^ -o $@ $(LIBS )
117
119
118
120
$(PLUGIN_OBJECT_GENERATED_FILES ) : CPPFLAGS+= $(if $(srcdir ) ,-I$(srcdir ) )
@@ -145,7 +147,7 @@ autogenerated-variable.c: autogenerated-gimple-types.txt $(srcdir)maketreetypes.
145
147
# Doing so seems to require that paths be absolute, rather than relative
146
148
# to this directory
147
149
TEST_CFLAGS = \
148
- -fplugin=$(CURDIR ) /python.so \
150
+ -fplugin=$(CURDIR ) /$( GCC_PYTHON_PLUGIN_SO ) \
149
151
-fplugin-arg-python-script=test.py
150
152
151
153
# A catch-all test for quick experimentation with the API:
0 commit comments