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

more subtle dependencies for cross-compilation

Now we build only what we really need for 'build' platform - there is
new build-tools make target.
The list of tools is in solenv/gbuild/extensions/pre_BuildTools.mk.
Also similar is done to some extent for 'host' platform using
gb_Module_add_targets_for_build which is ignored for 'host'.

Change-Id: I6acd1762b16aca366aac1a0688500f27869cfca2
üst 3909015f
......@@ -222,7 +222,7 @@ build-nocheck: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cro
$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build
cross-toolset: bootstrap fetch
$(GNUMAKE) gb_Side=build -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build
$(GNUMAKE) gb_Side=build -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
#
# Install
......
......@@ -2721,6 +2721,7 @@ endef
# FIXME: the library target should be for build too
define gb_Executable__register_saxparser
$(call gb_Executable_add_runtime_dependencies,saxparser,\
$(call gb_ComponentTarget_get_outdir_target,sax/source/expatwrap/expwrap) \
$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
$(call gb_Package_get_target_for_build,cppuhelper_unorc) \
$(call gb_Rdb_get_outdir_target_for_build,ure/services) \
......
......@@ -26,7 +26,8 @@
$(eval $(call gb_Module_Module,codemaker))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
# if not cross-compiling or we need this for ODK
ifneq (,$(if $(CROSS_COMPILING),,T)$(filter ODK,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,codemaker,\
Package_inc \
......
......@@ -20,15 +20,13 @@
$(eval $(call gb_Module_Module,comphelper))
$(eval $(call gb_Module_add_targets,comphelper,\
Package_inc \
Library_comphelper \
Package_inc \
))
ifneq ($(OOO_JUNIT_JAR),)
$(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\
JunitTest_comphelper_complex \
))
endif
$(eval $(call gb_Module_add_check_targets,comphelper,\
CppunitTest_comphelper_test \
......
......@@ -30,23 +30,29 @@ $(eval $(call gb_CustomTarget_CustomTarget,i18npool/localedata))
i18npool_LDDIR := $(call gb_CustomTarget_get_workdir,i18npool/localedata)
i18npool_LD_NAMES := $(basename $(notdir $(wildcard $(SRCDIR)/i18npool/source/localedata/data/*.xml)))
$(call gb_CustomTarget_get_target,i18npool/localedata) : \
$(patsubst %.xml,$(i18npool_LDDIR)/localedata_%.cxx, \
$(notdir $(wildcard $(SRCDIR)/i18npool/source/localedata/data/*.xml)))
$(foreach name,$(i18npool_LD_NAMES),$(i18npool_LDDIR)/localedata_$(name).cxx)
$(i18npool_LDDIR)/localedata_%.cxx : \
$(SRCDIR)/i18npool/source/localedata/data/%.xml \
define i18npool_LD_RULE
$(i18npool_LDDIR)/localedata_$(1).cxx : \
$(SRCDIR)/i18npool/source/localedata/data/$(1).xml \
$(i18npool_LDDIR)/saxparser.rdb \
$(call gb_Executable_get_runtime_dependencies,saxparser)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SAX,1)
$(call gb_Helper_abbreviate_dirs, \
$(call gb_Helper_execute,saxparser) $* $< $@.tmp \
$$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),$(true),SAX,1)
$$(call gb_Helper_abbreviate_dirs, \
$(call gb_Helper_execute,saxparser) $(1) $$< $$@.tmp \
$(call gb_Helper_make_url,$(i18npool_LDDIR)/saxparser.rdb) \
-env:LO_LIB_DIR=$(call gb_Helper_make_url,$(gb_Helper_OUTDIR_FOR_BUILDLIBDIR) \
-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(i18npool_LDDIR)/saxparser.rdb)) \
$(if $(findstring s,$(MAKEFLAGS)),> /dev/null 2>&1) && \
sed 's/\(^.*get[^;]*$$\)/SAL_DLLPUBLIC_EXPORT \1/' $@.tmp > $@ && \
rm $@.tmp)
sed 's/\(^.*get[^;]*$$$$\)/SAL_DLLPUBLIC_EXPORT \1/' $$@.tmp > $$@ && \
rm $$@.tmp)
endef
$(foreach name,$(i18npool_LD_NAMES),$(eval $(call i18npool_LD_RULE,$(name))))
$(i18npool_LDDIR)/saxparser.rdb : $(i18npool_LDDIR)/saxparser.input \
$(SOLARENV)/bin/packcomponents.xslt \
......
......@@ -49,15 +49,13 @@ $(eval $(call gb_Module_add_targets,i18npool,\
Package_inc \
))
ifneq ($(CROSS_COMPILING),YES)
$(eval $(call gb_Module_add_targets,i18npool,\
$(eval $(call gb_Module_add_targets_for_build,i18npool,\
Executable_gencoll_rule \
Executable_genconv_dict \
Executable_gendict \
Executable_genindex_data \
Executable_saxparser \
))
endif
$(eval $(call gb_Module_add_check_targets,i18npool,\
CppunitTest_i18npool_test_breakiterator \
......
......@@ -10,7 +10,7 @@
$(eval $(call gb_Module_Module,icu))
ifeq ($(SYSTEM_ICU),NO)
$(eval $(call gb_Module_add_targets,icu,\
$(eval $(call gb_Module_add_targets_for_build,icu,\
UnpackedTarball_icu \
ExternalPackage_icu \
ExternalProject_icu \
......
......@@ -19,8 +19,8 @@
$(eval $(call gb_Module_Module,idl))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,idl,Executable_svidl))
endif
$(eval $(call gb_Module_add_targets_for_build,idl,\
Executable_svidl \
))
# vim: set noet sw=4 ts=4:
......@@ -9,9 +9,17 @@
$(eval $(call gb_Module_Module,idlc))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,idlc,Executable_idlc))
$(eval $(call gb_Module_add_check_targets,idlc,CustomTarget_parser_test))
# if not cross-compiling or we need this for ODK
ifneq (,$(if $(CROSS_COMPILING),,T)$(filter ODK,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,idlc,\
Executable_idlc \
))
$(eval $(call gb_Module_add_check_targets,idlc,\
CustomTarget_parser_test \
))
endif
# vim:set noet sw=4 ts=4:
......@@ -26,7 +26,7 @@
$(eval $(call gb_Module_Module,l10ntools))
$(eval $(call gb_Module_add_targets,l10ntools,\
$(eval $(call gb_Module_add_targets_for_build,l10ntools,\
Executable_helpex \
Executable_idxdict \
Executable_ulfex \
......@@ -39,6 +39,9 @@ $(eval $(call gb_Module_add_targets,l10ntools,\
Executable_treex \
Executable_stringex \
StaticLibrary_transex \
))
$(eval $(call gb_Module_add_targets,l10ntools,\
Package_ulfconv \
))
......
......@@ -27,17 +27,18 @@
$(eval $(call gb_Module_Module,registry))
$(eval $(call gb_Module_add_targets,registry,\
Library_reg \
ZipPackage_registry_odk_headers \
Library_reg \
ZipPackage_registry_odk_headers \
))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
# if not cross-compiling or we need this for ODK
ifneq (,$(if $(CROSS_COMPILING),,T)$(filter ODK,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,registry,\
StaticLibrary_registry_helper \
Executable_regmerge \
Executable_regview \
Executable_regcompare \
Executable_regcompare \
Executable_regmerge \
Executable_regview \
StaticLibrary_registry_helper \
))
endif
......
......@@ -32,8 +32,8 @@ $(eval $(call gb_Module_add_targets,rsc,\
Package_inc \
))
$(if $(filter DESKTOP,$(BUILD_TYPE)),$(eval $(call gb_Module_add_targets,rsc,\
$(eval $(call gb_Module_add_targets_for_build,rsc,\
Executable_rsc \
)))
))
# vim: set noet sw=4 ts=4:
......@@ -27,11 +27,9 @@
$(eval $(call gb_Module_Module,solenv))
ifeq ($(CROSS_COMPILING),$(false))
$(eval $(call gb_Module_add_targets,solenv,\
$(eval $(call gb_Module_add_targets_for_build,solenv,\
Executable_concat-deps \
))
endif
ifneq ($(OS),WNT)
ifneq ($(OS),IOS)
......
......@@ -37,7 +37,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,%)
$(call gb_Executable_get_runtime_target,%) : $(call gb_Executable_get_target_for_build,%)
touch $@
.PHONY : $(call gb_Executable_get_clean_target,%)
......
......@@ -94,6 +94,11 @@ $(call gb_Module_get_target,%) :
all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck))
build-tools : $(gb_BUILD_TOOLS)
$(call gb_Output_announce,loaded tools: $(gb_BUILD_TOOLS),$(true),ALL,6)
$(call gb_Output_announce_title,build-tools done.)
$(call gb_Output_announce_bell)
build :
$(call gb_Output_announce,top level modules: $(foreach module,$(filter-out deliverlog $(WORKDIR)/bootstrap,$^),$(notdir $(module))),$(true),ALL,6)
$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),ALL,6)
......@@ -241,6 +246,8 @@ $(foreach target,$(2),$(call gb_Module_add_target,$(1),$(target)))
endef
gb_Module_add_targets_for_build = $(call gb_Module_add_targets,$(1),$(2))
define gb_Module_add_check_targets
$(foreach target,$(2),$(call gb_Module_add_check_target,$(1),$(target)))
......
......@@ -111,7 +111,7 @@ gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
gb_Executable_get_runtime_target = $(WORKDIR)/Executable/$(1).run
gb_Executable_get_runtime_target = $(WORKDIR_FOR_BUILD)/Executable/$(1).run
gb_ExtensionTarget_get_target = $(WORKDIR)/ExtensionTarget/$(1).oxt
gb_ExtensionTarget_get_rootdir = $(WORKDIR)/ExtensionTarget/$(1)/root
gb_ExtensionTarget_get_workdir = $(WORKDIR)/ExtensionTarget/$(1)
......@@ -376,14 +376,9 @@ endef
# ExternalExecutable.
#
# gb_Executable_get_runtime_dependencies executable
ifeq ($(CROSS_COMPILING),YES)
define gb_Executable_get_runtime_dependencies
endef
else
define gb_Executable_get_runtime_dependencies
$(call gb_Executable_get_runtime_target,$(1))
endef
endif
# Get complete command-line for running the executable
#
......
......@@ -25,6 +25,16 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
ifeq ($(CROSS_COMPILING),YES)
gb_Module_add_targets_for_build :=
endif
ifeq ($(gb_Side),build)
gb_Module_add_check_target :=
gb_Module_add_slowcheck_target :=
gb_Module_add_subsequentcheck_target :=
endif
ifneq ($(strip $(MAKECMDGOALS)),)
# speed up depending on the target
gb_SpeedUpTargets_LEVEL_3 := debugrun help translations
......
# -*- 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/.
#
# Tools we need to build for cross-compiling
gb_BUILD_TOOLS = \
$(foreach executable, \
autodoc \
bestreversemap \
cfgex \
cpp \
cppumaker \
gencoll_rule \
genconv_dict \
gendict \
genindex_data \
helpex \
idlc \
idxdict \
javamaker \
makedepend \
propex \
regcompare \
regmerge \
regview \
rsc \
saxparser \
stringex \
svidl \
transex3 \
treex \
uiex \
ulfex \
xrmex \
,$(call gb_Executable_get_runtime_dependencies,$(executable))) \
$(foreach executable, \
xsltproc \
,$(call gb_ExternalExecutable_get_dependencies,$(executable))) \
Package_xmlhelp_xsl \
# vim: set noet sw=4 ts=4:
......@@ -9,12 +9,10 @@
$(eval $(call gb_Module_Module,soltools))
ifneq ($(CROSS_COMPILING),YES)
$(eval $(call gb_Module_add_targets,soltools,\
$(eval $(call gb_Module_add_targets_for_build,soltools,\
Executable_cpp \
Executable_makedepend \
))
endif # CROSS_COMPILING
ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_Module_add_targets,soltools,\
......
......@@ -22,10 +22,6 @@
$(eval $(call gb_Executable_Executable,bestreversemap))
$(eval $(call gb_Executable_set_include,bestreversemap,\
$$(INCLUDE) \
))
$(eval $(call gb_Executable_use_libraries,bestreversemap,\
sal \
$(gb_UWINAPI) \
......
......@@ -27,14 +27,12 @@ $(eval $(call gb_Module_add_targets,tools,\
StaticLibrary_ooopathutils \
))
$(eval $(call gb_Module_add_check_targets,tools,\
CppunitTest_tools_test \
$(eval $(call gb_Module_add_targets_for_build,tools,\
Executable_bestreversemap \
))
ifneq ($(CROSS_COMPILING),YES)
$(eval $(call gb_Module_add_targets,tools,\
Executable_bestreversemap \
$(eval $(call gb_Module_add_check_targets,tools,\
CppunitTest_tools_test \
))
endif
# vim: set noet sw=4 ts=4:
......@@ -26,7 +26,7 @@
$(eval $(call gb_Module_Module,unodevtools))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
ifneq (,$(filter ODK,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,unodevtools,\
Executable_skeletonmaker \
......
......@@ -14,10 +14,8 @@ $(eval $(call gb_Module_add_targets,unoidl, \
Package_inc \
))
ifneq ($(CROSS_COMPILING),YES)
$(eval $(call gb_Module_add_targets,unoidl, \
$(eval $(call gb_Module_add_targets_for_build,unoidl, \
Executable_reg2unoidl \
))
endif
# vim: set noet sw=4 ts=4:
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