Skip to content

Commit a4ca611

Browse files
vriesdavidmalcolm
authored andcommitted
Makefile: Use PYTHONPATH to find python sources
Use PYTHONPATH to let python find python sources in the source dir.
1 parent baa05be commit a4ca611

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ plugin: autogenerated-config.h $(PLUGIN_DSO)
138138
# When running the plugin from a working copy, use LD_LIBARY_PATH=gcc-c-api
139139
# so that the plugin can find its libgcc-c-api.so there
140140
#
141-
INVOCATION_ENV_VARS := CC_FOR_CPYCHECKER=$(CC) LD_LIBRARY_PATH=gcc-c-api:$(LD_LIBRARY_PATH) CC=$(CC)
141+
INVOCATION_ENV_VARS := PYTHONPATH=$(srcdir)./ CC_FOR_CPYCHECKER=$(CC) LD_LIBRARY_PATH=gcc-c-api:$(LD_LIBRARY_PATH) CC=$(CC)
142142

143143
# When installing, both the plugin and libgcc-c-api.so will be installed to
144144
# $(GCCPLUGINS_DIR), so we give the plugin an RPATH of $(GCCPLUGINS_DIR)
@@ -199,7 +199,7 @@ $(PLUGIN_GENERATED_SOURCE_FILES): autogenerated-%.c: generate-%-c.py $(GENERATOR
199199
$(PYTHON) $< > $@
200200

201201
autogenerated-casts.c: autogenerated-gimple-types.txt autogenerated-tree-types.txt autogenerated-rtl-types.txt generate-casts-c.py
202-
$(PYTHON) $(srcdir)generate-casts-c.py autogenerated-casts.c autogenerated-casts.h $(xmldir)
202+
PYTHONPATH=$(srcdir)./gcc-c-api $(PYTHON) $(srcdir)generate-casts-c.py autogenerated-casts.c autogenerated-casts.h $(xmldir)
203203

204204
autogenerated-gimple.c: autogenerated-gimple-types.txt autogenerated-tree-types.txt autogenerated-rtl-types.txt maketreetypes.py
205205
autogenerated-tree.c: autogenerated-tree-types.txt maketreetypes.py

0 commit comments

Comments
 (0)