Kaydet (Commit) 944f3a6c authored tarafından Matúš Kukan's avatar Matúš Kukan

gbuild: allow to use RepositoryFixes also for executables

Helps to kill package in cpputools.
And autoinstall uno executable.

Change-Id: Ib1d546371ec8d2b06381d88eff98dbc5b70da400
üst 7369a8ca
...@@ -121,13 +121,11 @@ $(eval $(call gb_Helper_register_executables,OOO, \ ...@@ -121,13 +121,11 @@ $(eval $(call gb_Helper_register_executables,OOO, \
)) ))
$(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\ $(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\
$(if $(and $(SOLAR_JAVA),$(filter-out MACOSX WNT,$(OS)),$(filter DESKTOP,$(BUILD_TYPE))),javaldx) \
$(if $(filter-out IOS,$(OS)), \ $(if $(filter-out IOS,$(OS)), \
regmerge \ regmerge \
regview \ regview \
) \ ) \
$(if $(and $(SOLAR_JAVA),$(filter-out MACOSX WNT,$(OS)),$(filter DESKTOP,$(BUILD_TYPE))),javaldx) \
))
$(eval $(call gb_Helper_register_executables,UREBIN,\
$(if $(filter DESKTOP,$(BUILD_TYPE)),uno) \ $(if $(filter DESKTOP,$(BUILD_TYPE)),uno) \
)) ))
......
...@@ -17,6 +17,15 @@ ...@@ -17,6 +17,15 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 . # the License at http://www.apache.org/licenses/LICENSE-2.0 .
# #
# fixes for executables
gb_Executable_FILENAMES := $(foreach group,$(gb_Executable_VALIDGROUPS),\
$(foreach exe,$(gb_Executable_$(group)),$(exe):$(exe)$(gb_Executable_EXT)))
gb_Executable_FILENAMES := $(patsubst uno:uno,uno:uno.bin,$(gb_Executable_FILENAMES))
gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
# fixes for all the libraries that are named with too much creativity and do # fixes for all the libraries that are named with too much creativity and do
# not follow any of the established nameschemes # not follow any of the established nameschemes
......
...@@ -19,12 +19,6 @@ $(eval $(call gb_Module_add_targets,cpputools,\ ...@@ -19,12 +19,6 @@ $(eval $(call gb_Module_add_targets,cpputools,\
Executable_uno \ Executable_uno \
)) ))
ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,cpputools,\
Package_bin \
))
endif
endif endif
# vim:set noet sw=4 ts=4: # vim:set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# because the installation system is so incredibly inflexible...
$(eval $(call gb_Package_Package,cpputools_bin,$(gb_Executable_BINDIR)))
$(eval $(call gb_Package_add_file,cpputools_bin,bin/uno.bin,uno))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
...@@ -65,16 +65,6 @@ End ...@@ -65,16 +65,6 @@ End
// Public Executables: // Public Executables:
#if defined WNT
File gid_File_Exe_Uno
BIN_FILE_BODY;
Dir = gid_Dir_Ure_Bin;
Name = EXENAME(uno);
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
// CompID = "C66A9E2B-B16D-46A9-B9EC-772D9D3837F5";
End
#endif
#ifndef WNT #ifndef WNT
Shortcut gid_Shortcut_Exe_Uno Shortcut gid_Shortcut_Exe_Uno
FileID = gid_File_Exe_StartupSh; FileID = gid_File_Exe_StartupSh;
...@@ -96,16 +86,6 @@ File gid_File_Exe_StartupSh ...@@ -96,16 +86,6 @@ File gid_File_Exe_StartupSh
End End
#endif #endif
#if !defined WNT
File gid_File_Exe_UnoBin
BIN_FILE_BODY;
Dir = gid_Dir_Ure_Bin;
Name = "uno.bin";
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
// CompID = "4AE33B3E-B33E-4BA4-AADC-8D7ED303FDE9";
End
#endif
// Public Dynamic Libraries: // Public Dynamic Libraries:
File gid_File_Dl_Cppu File gid_File_Dl_Cppu
...@@ -621,9 +601,7 @@ Module gid_Module_Root_Ure_Hidden ...@@ -621,9 +601,7 @@ Module gid_Module_Root_Ure_Hidden
gid_File_ThirdpartylicensereadmeHtml_Ure, gid_File_ThirdpartylicensereadmeHtml_Ure,
gid_File_Readme_Ure, gid_File_Readme_Ure,
gid_File_License_Ure, gid_File_License_Ure,
gid_File_Exe_Uno,
gid_File_Exe_StartupSh, gid_File_Exe_StartupSh,
gid_File_Exe_UnoBin,
gid_File_Dl_Cli_Uno, gid_File_Dl_Cli_Uno,
gid_File_Dl_Cli_Ure_Assembly, gid_File_Dl_Cli_Ure_Assembly,
gid_File_Dl_Policy_Cli_Ure_Assembly, gid_File_Dl_Policy_Cli_Ure_Assembly,
......
...@@ -24,7 +24,7 @@ $(call gb_AutoInstall_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoI ...@@ -24,7 +24,7 @@ $(call gb_AutoInstall_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoI
$(foreach lib,$(gb_Library_MODULE_$*),\ $(foreach lib,$(gb_Library_MODULE_$*),\
echo "$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib)))" >> $@;) echo "$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib)))" >> $@;)
$(foreach exe,$(gb_Executable_MODULE_$*),\ $(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,%) : $(call gb_AutoInstall_get_clean_target,%) :
......
...@@ -33,7 +33,7 @@ $(dir $(call gb_Executable_get_runtime_target,%)).dir : ...@@ -33,7 +33,7 @@ $(dir $(call gb_Executable_get_runtime_target,%)).dir :
$(dir $(call gb_Executable_get_runtime_target,%))%/.dir : $(dir $(call gb_Executable_get_runtime_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(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 $@ touch $@
.PHONY : $(call gb_Executable_get_clean_target,%) .PHONY : $(call gb_Executable_get_clean_target,%)
...@@ -54,7 +54,7 @@ ifeq (,$$(findstring $(1),$$(gb_Executable_KNOWN))) ...@@ -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_info,Currently known executables: $(sort $(gb_Executable_KNOWN)),ALL))
$$(eval $$(call gb_Output_error,Executable $(1) must be registered in Repository.mk)) $$(eval $$(call gb_Output_error,Executable $(1) must be registered in Repository.mk))
endif 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 endef
...@@ -65,6 +65,7 @@ $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS)) ...@@ -65,6 +65,7 @@ $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \ $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2)) \
| $(dir $(call gb_Executable_get_target,$(1))).dir | $(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)) :| $(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)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_Executable_Executable_platform,$(1),$(2)) $(call gb_Executable_Executable_platform,$(1),$(2))
...@@ -94,7 +95,7 @@ $(call gb_Executable_get_clean_target,$(1)) : $(call gb_Package_get_clean_target ...@@ -94,7 +95,7 @@ $(call gb_Executable_get_clean_target,$(1)) : $(call gb_Package_get_clean_target
endef endef
define gb_Executable_set_targettype_gui 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 endef
# The auxtarget is delivered via the rule in Package.mk. # The auxtarget is delivered via the rule in Package.mk.
......
...@@ -121,11 +121,11 @@ endef ...@@ -121,11 +121,11 @@ endef
# Set the executable as internal # Set the executable as internal
# #
# Optionally set a specific executable target to use (if the target # 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? # gb_ExternalExecutable_set_internal executable call?
define gb_ExternalExecutable_set_internal 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 endef
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
gb_CliLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliLibrary_EXT) gb_CliLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliLibrary_EXT)
gb_CliNativeLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliNativeLibrary_EXT) gb_CliNativeLibrary_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliNativeLibrary_EXT)
gb_CliUnoApi_get_target = $(gb_Helper_OUTDIRLIBDIR)/$(1)$(gb_CliUnoApi_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_Pagein_get_outdir_target = $(OUTDIR)/bin/pagein-$(1)
gb_PackagePart_get_destinations = \ gb_PackagePart_get_destinations = \
$(INSTDIR) \ $(INSTDIR) \
...@@ -51,6 +49,13 @@ gb_XcuDataTarget_get_outdir_target = $(gb_Configuration_registry)/data/$(1) ...@@ -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_XcuLangpackTarget_get_outdir_target = $(gb_Configuration_registry)/spool/$(1)
gb_XcuModuleTarget_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 define gb_Library_get_target
$(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(1):%,$(gb_Library_FILENAMES))) $(patsubst $(1):%,$(gb_Library_OUTDIRLOCATION)/%,$(filter $(1):%,$(gb_Library_FILENAMES)))
...@@ -247,6 +252,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ ...@@ -247,6 +252,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
CustomPackage \ CustomPackage \
DescriptionTranslateTarget \ DescriptionTranslateTarget \
Dictionary \ Dictionary \
Executable \
ExternalPackage \ ExternalPackage \
Extension \ Extension \
Gallery \ Gallery \
...@@ -316,7 +322,6 @@ $(eval $(call gb_Helper_make_outdir_clean_targets,\ ...@@ -316,7 +322,6 @@ $(eval $(call gb_Helper_make_outdir_clean_targets,\
CliLibrary \ CliLibrary \
CliNativeLibrary \ CliNativeLibrary \
CliUnoApi \ CliUnoApi \
Executable \
InstallScript \ InstallScript \
Library \ Library \
StaticLibrary \ StaticLibrary \
...@@ -353,6 +358,10 @@ define gb_Library_get_filename ...@@ -353,6 +358,10 @@ define gb_Library_get_filename
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES))) $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
endef endef
define gb_Executable_get_filename
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_FILENAMES)))
endef
# Get dependencies needed for running the executable # Get dependencies needed for running the executable
# #
# This is not strictly necessary, but it makes the use more similar to # This is not strictly necessary, but it makes the use more similar to
...@@ -372,7 +381,7 @@ define gb_Executable_get_command ...@@ -372,7 +381,7 @@ define gb_Executable_get_command
$(gb_Helper_set_ld_path) $(2) $(call gb_Executable_get_target_for_build,$(1)) $(gb_Helper_set_ld_path) $(2) $(call gb_Executable_get_target_for_build,$(1))
endef 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_Library_get_linktargetname = Library/$(call gb_Library_get_filename,$(1))
gb_StaticLibrary_get_linktargetname = StaticLibrary/$(call gb_StaticLibrary_get_filename,$(1)) gb_StaticLibrary_get_linktargetname = StaticLibrary/$(call gb_StaticLibrary_get_filename,$(1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment