summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-06-14 12:48:20 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2013-06-15 21:32:36 +0200
commit944f3a6c6e48f1b5532fa16ab38918b9b3f9412e (patch)
tree83901ce06673b80d2174196d9189367eea75c0bd /solenv
parent7369a8cad62ba6151ba8c16c41d0005fdf87f0ec (diff)
gbuild: allow to use RepositoryFixes also for executables
Helps to kill package in cpputools. And autoinstall uno executable. Change-Id: Ib1d546371ec8d2b06381d88eff98dbc5b70da400
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/AutoInstall.mk2
-rw-r--r--solenv/gbuild/Executable.mk7
-rw-r--r--solenv/gbuild/ExternalExecutable.mk4
-rw-r--r--solenv/gbuild/TargetLocations.mk17
4 files changed, 20 insertions, 10 deletions
diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk
index 518d06e71e02..61871990a7a2 100644
--- a/solenv/gbuild/AutoInstall.mk
+++ b/solenv/gbuild/AutoInstall.mk
@@ -24,7 +24,7 @@ $(call gb_AutoInstall_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoI
$(foreach lib,$(gb_Library_MODULE_$*),\
echo "$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib)))" >> $@;)
$(foreach exe,$(gb_Executable_MODULE_$*),\
- echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(exe),$(exe)$(gb_Executable_EXT))" >> $@;)
+ echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(exe),$(call gb_Executable_get_filename,$(exe)))" >> $@;)
$(call gb_AutoInstall_get_clean_target,%) :
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 2caa7d2bae0f..06541dd10c3c 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -33,7 +33,7 @@ $(dir $(call gb_Executable_get_runtime_target,%)).dir :
$(dir $(call gb_Executable_get_runtime_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
-$(call gb_Executable_get_runtime_target,%) : $(call gb_Executable_get_target_for_build,%)
+$(call gb_Executable_get_runtime_target,%) :
touch $@
.PHONY : $(call gb_Executable_get_clean_target,%)
@@ -54,7 +54,7 @@ ifeq (,$$(findstring $(1),$$(gb_Executable_KNOWN)))
$$(eval $$(call gb_Output_info,Currently known executables: $(sort $(gb_Executable_KNOWN)),ALL))
$$(eval $$(call gb_Output_error,Executable $(1) must be registered in Repository.mk))
endif
-$(call gb_Executable__Executable_impl,$(1),Executable/$(1)$(gb_Executable_EXT))
+$(call gb_Executable__Executable_impl,$(1),$(call gb_Executable_get_linktargetname,$(1)))
endef
@@ -65,6 +65,7 @@ $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
| $(dir $(call gb_Executable_get_target,$(1))).dir
$(call gb_Executable_get_runtime_target,$(1)) :| $(dir $(call gb_Executable_get_runtime_target,$(1))).dir
+$(call gb_Executable_get_runtime_target,$(1)) : $(call gb_Executable_get_target_for_build,$(1))
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_Executable_Executable_platform,$(1),$(2))
@@ -94,7 +95,7 @@ $(call gb_Executable_get_clean_target,$(1)) : $(call gb_Package_get_clean_target
endef
define gb_Executable_set_targettype_gui
-$(call gb_LinkTarget_get_target,Executable/$(1)$(gb_Executable_EXT)) : TARGETGUI := $(2)
+$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(1))) : TARGETGUI := $(2)
endef
# The auxtarget is delivered via the rule in Package.mk.
diff --git a/solenv/gbuild/ExternalExecutable.mk b/solenv/gbuild/ExternalExecutable.mk
index c87ea26c5a6f..f934b62c9685 100644
--- a/solenv/gbuild/ExternalExecutable.mk
+++ b/solenv/gbuild/ExternalExecutable.mk
@@ -121,11 +121,11 @@ endef
# Set the executable as internal
#
# Optionally set a specific executable target to use (if the target
-# returned by gb_Executable_get_target_for_build is not suitable).
+# $(OUTDIR_FOR_BUILD)/bin/$(1)$(gb_Executable_EXT_for_build) is not suitable).
#
# gb_ExternalExecutable_set_internal executable call?
define gb_ExternalExecutable_set_internal
-$(call gb_ExternalExecutable__set_internal,$(1),$(if $(strip $(2)),$(2),$(call gb_Executable_get_target_for_build,$(1))))
+$(call gb_ExternalExecutable__set_internal,$(1),$(if $(strip $(2)),$(2),$(OUTDIR_FOR_BUILD)/bin/$(1)$(gb_Executable_EXT_for_build)))
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index e87efe3bf770..72ec59e07685 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -22,8 +22,6 @@
gb_CliLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliLibrary_EXT)
gb_CliNativeLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliNativeLibrary_EXT)
gb_CliUnoApi_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliUnoApi_EXT)
-gb_Executable_get_target = $(OUTDIR)/bin/$(1)$(gb_Executable_EXT)
-gb_Executable_get_target_for_build = $(OUTDIR_FOR_BUILD)/bin/$(1)$(gb_Executable_EXT_for_build)
gb_Pagein_get_outdir_target = $(OUTDIR)/bin/pagein-$(1)
gb_PackagePart_get_destinations = \
$(INSTDIR) \
@@ -51,6 +49,13 @@ gb_XcuDataTarget_get_outdir_target = $(gb_Configuration_registry)/data/$(1)
gb_XcuLangpackTarget_get_outdir_target = $(gb_Configuration_registry)/spool/$(1)
gb_XcuModuleTarget_get_outdir_target = $(gb_Configuration_registry)/spool/$(1)
+define gb_Executable_get_target
+$(patsubst $(1):%,$(OUTDIR)/bin/%,$(filter $(1):%,$(gb_Executable_FILENAMES)))
+endef
+
+define gb_Executable_get_target_for_build
+$(patsubst $(1):%,$(OUTDIR_FOR_BUILD)/bin/%,$(filter $(1):%,$(gb_Executable_FILENAMES_FOR_BUILD)))
+endef
define gb_Library_get_target
$(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
@@ -247,6 +252,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
CustomPackage \
DescriptionTranslateTarget \
Dictionary \
+ Executable \
ExternalPackage \
Extension \
Gallery \
@@ -316,7 +322,6 @@ $(eval $(call gb_Helper_make_outdir_clean_targets,\
CliLibrary \
CliNativeLibrary \
CliUnoApi \
- Executable \
InstallScript \
Library \
StaticLibrary \
@@ -353,6 +358,10 @@ define gb_Library_get_filename
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
endef
+define gb_Executable_get_filename
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_FILENAMES)))
+endef
+
# Get dependencies needed for running the executable
#
# This is not strictly necessary, but it makes the use more similar to
@@ -372,7 +381,7 @@ define gb_Executable_get_command
$(gb_Helper_set_ld_path) $(2) $(call gb_Executable_get_target_for_build,$(1))
endef
-gb_Executable_get_linktargetname = Executable/$(1)$(gb_Executable_EXT)
+gb_Executable_get_linktargetname = Executable/$(call gb_Executable_get_filename,$(1))
gb_Library_get_linktargetname = Library/$(call gb_Library_get_filename,$(1))
gb_StaticLibrary_get_linktargetname = StaticLibrary/$(call gb_StaticLibrary_get_filename,$(1))