From dbac8f5a075a8e39068d5e21ab63de224f818eca Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 18 Apr 2014 18:34:40 +0200 Subject: restore deps on bins from bundled projects used during build Change-Id: Ibd97268e4aaa61ec896135bf780173a18536101d --- RepositoryExternal.mk | 10 +++++----- solenv/gbuild/ExternalExecutable.mk | 14 +++++++++----- solenv/gbuild/TargetLocations.mk | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 878d4b7b8e3e..f11407e54486 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3467,7 +3467,7 @@ gb_ExternalExecutable__register_xmllint := else # ! SYSTEM_LIBXML_FOR_BUILD define gb_ExternalExecutable__register_xmllint -$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build)) +$(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),xml2) $(call gb_ExternalExecutable_add_dependencies,xmllint,$(call gb_Package_get_target,xml2)) endef @@ -3481,7 +3481,7 @@ gb_ExternalExecutable__register_xsltproc := else # ! SYSTEM_LIBXSLT_FOR_BUILD define gb_ExternalExecutable__register_xsltproc -$(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build)) +$(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt) $(call gb_ExternalExecutable_add_dependencies,xsltproc,$(call gb_Package_get_target,xslt)) endef @@ -3543,7 +3543,7 @@ endef else # ! SYSTEM_GENBRK define gb_ExternalExecutable__register_genbrk -$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build)) +$(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu) $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND))) $(call gb_ExternalExecutable_add_dependencies,genbrk,\ $(call gb_Package_get_target_for_build,icu) \ @@ -3563,7 +3563,7 @@ endef else # ! SYSTEM_GENCCODE define gb_ExternalExecutable__register_genccode -$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build)) +$(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu) $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND))) $(call gb_ExternalExecutable_add_dependencies,genccode,\ $(call gb_Package_get_target_for_build,icu) \ @@ -3583,7 +3583,7 @@ endef else # ! SYSTEM_GENCMN define gb_ExternalExecutable__register_gencmn -$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build)) +$(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu) $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND))) $(call gb_ExternalExecutable_add_dependencies,gencmn,\ $(call gb_Package_get_target_for_build,icu) \ diff --git a/solenv/gbuild/ExternalExecutable.mk b/solenv/gbuild/ExternalExecutable.mk index 014e01100563..c1b3503a281b 100644 --- a/solenv/gbuild/ExternalExecutable.mk +++ b/solenv/gbuild/ExternalExecutable.mk @@ -111,10 +111,11 @@ endef # FIXME need to subst in some more $$ in gb_Helper_set_ld_path here - ugly # but other uses (gb_CppunitTest_CPPTESTPRECOMMAND) require less $$ - ugly -# FIXME hack to avoid dependency into workdir - those must be added explicitly define gb_ExternalExecutable__set_internal +$(if $(3),,$(if $(filter $(WORKDIR_FOR_BUILD)/UnpackedTarball,$(2)),\ + $(call gb_Output_error,depending directly on executable $(2) from UnpackedTarball is not allowed. Use the UnpackedTarball target as dependency.))) gb_ExternalExecutable_$(1)_EXECUTABLE := $(2) -gb_ExternalExecutable_$(1)_DEPENDENCIES := $(if $(findstring $(WORKDIR_FOR_BUILD),$(2)),,$(2)) +gb_ExternalExecutable_$(1)_DEPENDENCIES := $(if $(3),$(3),$(2)) gb_ExternalExecutable_$(1)_PRECOMMAND := $(subst $$,$$$$,$(gb_Helper_set_ld_path)) $(BUILDTOOLTRACE) endef @@ -123,11 +124,14 @@ endef # # Optionally set a specific executable target to use (if the target # $(gb_Executable_BINDIR_FOR_BUILD)/$(1)$(gb_Executable_EXT_for_build) is -# not suitable). +# not suitable). Also optionally, set the ExternalProject that builds +# the executable. This is needed to create proper dependency for +# executables that are not bundled # with libreoffice, so they are used +# directly from workdir/UnpackedTarball/*. # -# gb_ExternalExecutable_set_internal executable call? +# gb_ExternalExecutable_set_internal executable call? external? define gb_ExternalExecutable_set_internal -$(call gb_ExternalExecutable__set_internal,$(1),$(if $(strip $(2)),$(2),$(gb_Executable_BINDIR_FOR_BUILD)/$(1)$(gb_Executable_EXT_for_build))) +$(call gb_ExternalExecutable__set_internal,$(1),$(if $(strip $(2)),$(2),$(gb_Executable_BINDIR_FOR_BUILD)/$(1)$(gb_Executable_EXT_for_build)),$(call gb_ExternalProject_get_target_for_build,$(strip $(3)))) endef diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index d7855b3c0a44..4958d4d6584d 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -69,6 +69,7 @@ gb_ExternalProject_get_statedir = $(WORKDIR)/ExternalProject/$(1) gb_ExternalProject_get_preparation_target = $(WORKDIR)/ExternalProject/$(1).prepare gb_ExternalProject_get_state_target = $(WORKDIR)/ExternalProject/$(1)/$(2) gb_ExternalProject_get_target = $(WORKDIR)/ExternalProject/$(1).done +gb_ExternalProject_get_target_for_build = $(WORKDIR_FOR_BUILD)/ExternalProject/$(1).done gb_Gallery_get_target = $(WORKDIR)/Gallery/$(1).done gb_Gallery_get_workdir = $(WORKDIR)/Gallery/$(1) gb_GeneratedPackage_get_target = $(WORKDIR)/GeneratedPackage/$(1).filelist -- cgit