add gb_StaticLibrary_use_static_libraries

... which is probably not needed for LO internal code, but
very useful for RepositoryExternals.

Change-Id: I5bd8edb97454f89ed33b041460019738e9552f18
Reviewed-on: https://gerrit.libreoffice.org/692
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
This commit is contained in:
Michael Stahl
2012-09-24 16:16:10 +02:00
committed by Fridrich Strba
parent 46325e3a2e
commit 8b6ea31961
2 changed files with 3 additions and 1 deletions

View File

@@ -745,13 +745,14 @@ $$(call gb_Output_error,\
gb_LinkTarget_add_linked_static_libs: use gb_LinkTarget_use_static_libraries instead.)
endef
# for a StaticLibrary, dependent libraries are not actually linked in
define gb_LinkTarget_use_static_libraries
ifneq (,$$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2)))
$$(eval $$(call gb_Output_info, currently known static libraries are: $(sort $(gb_StaticLibrary_KNOWNLIBS)),ALL))
$$(eval $$(call gb_Output_error,Cannot link against static library/libraries $$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2)). Static libraries must be registered in Repository.mk))
endif
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS += $(if $(filter-out StaticLibrary,$(TARGETTYPE)),$(2))
$(call gb_LinkTarget_get_target,$(1)) : $$(foreach lib,$(2),$$(call gb_StaticLibrary_get_target,$$(lib)))
$(call gb_LinkTarget_get_external_headers_target,$(1)) : \

View File

@@ -125,6 +125,7 @@ $(eval $(foreach method,\
use_package \
use_packages \
use_unpacked \
use_static_libraries \
add_sdi_headers \
set_warnings_not_errors \
set_generated_cxx_suffix \