gbuild: introduce gb_%_linktarget_target
Just some refactoring. Change-Id: I47adb93f8a413d289f6abb2a48ed3f049f582a46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127799 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
parent
aa29327fca
commit
c859b4aa48
@ -165,8 +165,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
|
||||
# etc., try to prevent linking these in parallel by adding artificial build
|
||||
# order dependencies here.
|
||||
define repositorymodule_serialize1
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))) \
|
||||
:| $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
|
||||
$(call gb_Library_get_linktarget_target,$(1)) :| $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
|
||||
endef
|
||||
|
||||
define repositorymodule_serialize
|
||||
|
@ -15,9 +15,9 @@ ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
|
||||
bridges_SELECTED_BRIDGE := gcc3_linux_arm
|
||||
bridge_noopt_objects := cpp2uno except uno2cpp
|
||||
# HACK
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
|
||||
$(call gb_Library_get_linktarget_target,gcc3_uno) : \
|
||||
$(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,gcc3_uno)) : \
|
||||
$(call gb_Library_get_linktarget_target,gcc3_uno)) : \
|
||||
EXTRAOBJECTLISTS += $(call gb_CustomTarget_get_workdir,bridges/source/cpp_uno/gcc3_linux_arm)/armhelper.objectlist
|
||||
endif
|
||||
|
||||
|
@ -81,12 +81,9 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,jpipe, \
|
||||
))
|
||||
endif
|
||||
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
|
||||
$(call gb_UnpackedTarball_get_target,dtoa)
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
|
||||
gb_CC := $(filter-out -fsanitize%,$(gb_CC))
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
|
||||
gb_CXX := $(filter-out -fsanitize%,$(gb_CXX))
|
||||
$(call gb_Library_get_linktarget_target,jpipe): $(call gb_UnpackedTarball_get_target,dtoa)
|
||||
$(call gb_Library_get_linktarget_target,jpipe): gb_CC := $(filter-out -fsanitize%,$(gb_CC))
|
||||
$(call gb_Library_get_linktarget_target,jpipe): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX))
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@ -32,8 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sal_osl,\
|
||||
))
|
||||
|
||||
# the test uses the library created by Module_DLL
|
||||
$(call gb_CppunitTest_get_target,sal_osl) : \
|
||||
$(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,Module_DLL))
|
||||
$(call gb_CppunitTest_get_target,sal_osl) : $(call gb_CppunitTest_get_linktarget_target,Module_DLL)
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_executable,sal_osl,osl_process_child))
|
||||
|
||||
|
@ -139,7 +139,7 @@ else
|
||||
PYTHONDONTWRITEBYTECODE=1) \
|
||||
$(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
|
||||
$(gb_CppunitTest_CPPTESTCOMMAND) \
|
||||
$(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$*)) \
|
||||
$(call gb_CppunitTest_get_linktarget_target,$*) \
|
||||
$(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \
|
||||
$(if $(gb_CppunitTest_localized),|| exit $$?; done) \
|
||||
) \
|
||||
|
@ -82,7 +82,7 @@ $(call gb_Helper_make_userfriendly_targets,$(1),Executable)
|
||||
endef
|
||||
|
||||
define gb_Executable_set_targettype_gui
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))) : TARGETGUI := $(2)
|
||||
$(call gb_Executable_get_linktarget_target,$(1)) : TARGETGUI := $(2)
|
||||
endef
|
||||
|
||||
# forward the call to the gb_LinkTarget implementation
|
||||
|
@ -189,7 +189,7 @@ endef
|
||||
# add a library from workdir; DO NOT use gb_Library_get_target
|
||||
define gb_Extension_add_library
|
||||
$(call gb_Extension_add_file,$(1),$(call gb_Library_get_runtime_filename,$(2)),\
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(2))))
|
||||
$(call gb_Library_get_linktarget_target,$(2)))
|
||||
|
||||
endef
|
||||
|
||||
|
@ -205,7 +205,7 @@ $$(eval $$(call gb_Output_info,currently known plugins are: $(sort $(gb_Library_
|
||||
$$(eval $$(call gb_Output_error,Unknown plugin(s) '$$(filter-out $(gb_Library_KNOWNPLUGINS),$(1)))'. Plugins must be registered in Repository.mk or RepositoryExternal.mk))
|
||||
endif
|
||||
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(2))) : PLUGINS += $(1)
|
||||
$(call gb_Library_get_linktarget_target,$(2)) : PLUGINS += $(1)
|
||||
$(eval $(call gb_LinkTarget__add_plugin,$(call gb_Library_get_linktarget,$(2)),$(1)))
|
||||
$(eval $(call gb_LinkTarget__set_plugin_for,$(call gb_Library_get_linktarget,$(1)),$(2),$(3),Library_$(1)))
|
||||
endef
|
||||
|
@ -1123,7 +1123,7 @@ endef
|
||||
define gb_LinkTarget_add_libs
|
||||
$(call gb_LinkTarget_get_target,$(1)) : T_LIBS += $(2)
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,merged)) : T_LIBS += $(2))
|
||||
$(call gb_Library_get_linktarget_target,merged) : T_LIBS += $(2))
|
||||
|
||||
endef
|
||||
|
||||
@ -1322,7 +1322,7 @@ endef
|
||||
define gb_LinkTarget_use_static_libraries
|
||||
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $$(if $$(filter-out StaticLibrary,$$(TARGETTYPE)),$(2))
|
||||
$(if $(call gb_LinkTarget__is_merged,$(1)),\
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,merged)) : \
|
||||
$(call gb_Library_get_linktarget_target,merged) : \
|
||||
LINKED_STATIC_LIBS += $$(if $$(filter-out StaticLibrary,$$(TARGETTYPE)),$(2)))
|
||||
|
||||
# depend on the static libraries, but only if the target actually links to it
|
||||
|
@ -52,7 +52,7 @@ endef
|
||||
|
||||
# this is a crude hack to "build" header files with include-what-you-use
|
||||
define gb_StaticLibrary__add_iwyu_header
|
||||
$(call gb_LinkTarget_get_target,$(call gb_StaticLibrary_get_linktarget,$(1))) : $(call gb_GenCxxObject_get_target,$(basename $(2)))
|
||||
$(call gb_StaticLibrary_get_linktarget_target,$(1)) : $(call gb_GenCxxObject_get_target,$(basename $(2)))
|
||||
$(call gb_GenCxxObject_get_target,$(basename $(2))) : $(SRCDIR)/$(2)
|
||||
$(call gb_GenCxxObject_get_target,$(basename $(2))) : WARNINGS_NOT_ERRORS := $(true)
|
||||
$(call gb_GenCxxObject_get_target,$(basename $(2))) : GEN_CXX_SOURCE := $(SRCDIR)/$(2)
|
||||
|
@ -404,6 +404,7 @@ endif # CROSS_COMPILING
|
||||
define gb_Executable_get_linktarget
|
||||
$(call gb_Executable__get_workdir_linktargetname,$(1))<>$(call gb_Executable_get_target,$(1))
|
||||
endef
|
||||
gb_Executable_get_linktarget_target = $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1)))
|
||||
|
||||
define gb_Library__get_workdir_linktargetname
|
||||
Library/$(call gb_Library_get_filename,$(1))
|
||||
@ -422,6 +423,7 @@ endif # CROSS_COMPILING
|
||||
define gb_Library_get_linktarget
|
||||
$(call gb_Library__get_workdir_linktargetname,$(1))<>$(call gb_Library_get_target,$(1))
|
||||
endef
|
||||
gb_Library_get_linktarget_target = $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1)))
|
||||
|
||||
define gb_StaticLibrary__get_workdir_linktargetname
|
||||
StaticLibrary/$(call gb_StaticLibrary_get_filename,$(1))
|
||||
@ -433,6 +435,7 @@ endef
|
||||
define gb_StaticLibrary_get_linktarget
|
||||
$(call gb_StaticLibrary__get_workdir_linktargetname,$(1))<>$(call gb_StaticLibrary_get_target,$(1))
|
||||
endef
|
||||
gb_StaticLibrary_get_linktarget_target = $(call gb_LinkTarget_get_target,$(call gb_StaticLibrary_get_linktarget,$(1)))
|
||||
|
||||
define gb_CppunitTest__get_workdir_linktargetname
|
||||
CppunitTest/$(call gb_CppunitTest_get_filename,$(1))
|
||||
@ -444,6 +447,7 @@ endef
|
||||
define gb_CppunitTest_get_linktarget
|
||||
$(call gb_CppunitTest__get_workdir_linktargetname,$(1))<>$(call gb_CppunitTest__get_linktarget_target,$(1))
|
||||
endef
|
||||
gb_CppunitTest_get_linktarget_target = $(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$(1)))
|
||||
|
||||
define gb_CompilerTest__get_workdir_linktargetname
|
||||
CompilerTest/$(1)
|
||||
|
@ -11,7 +11,7 @@
|
||||
$(foreach fuzzer,$(gb_Fuzzers_KNOWN), \
|
||||
$(eval gb_Fuzzers_KNOWN = $(filter-out $(fuzzer),$(gb_Fuzzers_KNOWN))) \
|
||||
$(if $(firstword $(gb_Fuzzers_KNOWN)), \
|
||||
$(eval $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(firstword $(gb_Fuzzers_KNOWN)))) : \
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(fuzzer))))))
|
||||
$(eval $(call gb_Executable_get_linktarget_target,$(firstword $(gb_Fuzzers_KNOWN)))) : \
|
||||
$(call gb_Executable_linktarget_target,$(fuzzer))))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
@ -390,7 +390,7 @@ gb_Library_FILENAMES :=\
|
||||
# An assembly is a special kind of library for CLI
|
||||
define gb_Library_Assembly
|
||||
$(call gb_Library_Library,$(1))
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))) : NATIVERES :=
|
||||
$(call gb_Library_get_linktarget_target,$(1)) : NATIVERES :=
|
||||
|
||||
endef
|
||||
|
||||
|
@ -234,8 +234,7 @@ gb_Library_get_sdk_link_lib = $(gb_Library_get_versionlink_target)
|
||||
define gb_Library_Bundle
|
||||
$(call gb_Library_Library,$(1))
|
||||
$(call gb_LinkTarget_set_targettype,$(call gb_Library_get_linktarget,$(1)),Bundle)
|
||||
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))) : \
|
||||
RPATH :=
|
||||
$(call gb_Library_get_linktarget_target,$(1)) : RPATH :=
|
||||
endef
|
||||
|
||||
# Executable class
|
||||
|
Loading…
x
Reference in New Issue
Block a user