diff options
-rw-r--r-- | RepositoryExternal.mk | 26 | ||||
-rw-r--r-- | pyuno/Library_pyuno_wrapper.mk | 19 |
2 files changed, 21 insertions, 24 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index e6232b610b53..09378fd97356 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1941,9 +1941,10 @@ endif # ENABLE_GCONF # PYTHON +# extra python_headers external because pyuno wrapper must not link python ifeq ($(SYSTEM_PYTHON),YES) -define gb_LinkTarget__use_python +define gb_LinkTarget__use_python_headers $(call gb_LinkTarget_add_defs,$(1),\ $(filter-out -I%,$(PYTHON_CFLAGS)) \ ) @@ -1953,6 +1954,11 @@ $(call gb_LinkTarget_set_include,$(1),\ $$(INCLUDE) \ ) +endef + +define gb_LinkTarget__use_python +$(call gb_LinkTarget__use_python_headers,$(1)) + $(call gb_LinkTarget_add_libs,$(1),\ $(PYTHON_LIBS) \ ) @@ -1961,7 +1967,18 @@ endef else # !SYSTEM_PYTHON +define gb_LinkTarget__use_python_headers +$(call gb_LinkTarget_set_include,$(1),\ + -I$(call gb_UnpackedTarball_get_dir,python3) \ + -I$(call gb_UnpackedTarball_get_dir,python3)/PC \ + -I$(call gb_UnpackedTarball_get_dir,python3)/Include \ + $$(INCLUDE) \ +) + +endef + define gb_LinkTarget__use_python +$(call gb_LinkTarget__use_python_headers,$(1)) ifeq ($(OS),WNT) $(call gb_LinkTarget_add_libs,$(1),\ @@ -1978,13 +1995,6 @@ $(call gb_LinkTarget_use_libraries,$(1),\ ) endif -$(call gb_LinkTarget_set_include,$(1),\ - -I$(call gb_UnpackedTarball_get_dir,python3) \ - -I$(call gb_UnpackedTarball_get_dir,python3)/PC \ - -I$(call gb_UnpackedTarball_get_dir,python3)/Include \ - $$(INCLUDE) \ -) - endef $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\ diff --git a/pyuno/Library_pyuno_wrapper.mk b/pyuno/Library_pyuno_wrapper.mk index 5e06ad4306ef..b88bc2b41f19 100644 --- a/pyuno/Library_pyuno_wrapper.mk +++ b/pyuno/Library_pyuno_wrapper.mk @@ -37,23 +37,10 @@ $(eval $(call gb_Library_set_include,pyuno_wrapper,\ $$(INCLUDE) \ )) -# not using here external -# because we do not want to link here -# against python! -# we need only -Idirective -ifeq ($(SYSTEM_PYTHON),YES) -$(eval $(call gb_Library_set_include,pyuno_wrapper,\ - $(PYTHON_CFLAGS) \ - $$(INCLUDE) \ -)) -else -$(eval $(call gb_Library_set_include,pyuno_wrapper,\ - -I$(call gb_UnpackedTarball_get_dir,python3) \ - -I$(call gb_UnpackedTarball_get_dir,python3)/PC \ - -I$(call gb_UnpackedTarball_get_dir,python3)/Include \ - $$(INCLUDE) \ +# not using external "python" because we do not want to link against python +$(eval $(call gb_Library_use_externals,pyuno_wrapper,\ + python_headers \ )) -endif ifneq ($(GUI)$(COM),WNTMSC) ifeq ($(filter DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX,$(OS)),) |