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