Kaydet (Commit) 6a75df78 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Eike Rathke

introduce staged build

üst d40530dd
......@@ -25,18 +25,9 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
ifeq ($(strip $(gb_PARTIALBUILD)),)
.PHONY: cross-build-toolset dev-install build findunusedcode
clean: clean-host clean-build
subsequentcheck: smoketestoo_native
@$(MAKE) -f $(realpath $(firstword $(MAKEFILE_LIST))) $@ gb_PARTIALBUILD=T
# instsetoo_native via build.pl already runs unittests
unitcheck: instsetoo_native
@true
all:
ifeq ($(gb_SourceEnvAndRecurse_STAGE),buildpl)
gb_MAKETARGET=all
# if we have only build as target use build instead of all
......@@ -52,13 +43,11 @@ cd $(SRCDIR)/$(1) && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl $(if $(findstri
$(eval gb_BuildplTarget_COMPLETEDTARGETS+=$(1))
endef
.PHONY: smoketestoo_native instsetoo_native cross-build-toolset dev-install all build findunusedcode
dev-install: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | build
$(call gb_BuildplTarget_command,smoketestoo_native,$(if $(filter instsetoo_native,$(gb_BuildplTarget_COMPLETEDTARGETS)),--from instsetoo_native,--all))
smoketestoo_native: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | instsetoo_native
$(call gb_BuildplTarget_command,$@,$(if $(filter instsetoo_native,$(gb_BuildplTarget_COMPLETEDTARGETS)),--from instsetoo_native,--all))
instsetoo_native: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset)
$(call gb_BuildplTarget_command,$@,--all)
build: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset)
$(call gb_BuildplTarget_command,instsetoo_native,--all)
cross_toolset: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded
source $(SRCDIR)/Env.Build.sh && $(call gb_BuildplTarget_command,$@,--all)
......@@ -85,12 +74,22 @@ findunusedcode:
#to be just removed, or put behind appropiate platform or debug level ifdefs
@grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
dev-install: smoketestoo_native
all: instsetoo_native
endif # gb_SourceEnvAndRecurse_STAGE=buildpl
ifeq ($(gb_SourceEnvAndRecurse_STAGE),gbuild)
clean: clean-host clean-build
build: instsetoo_native
dev-install: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | build
build: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset)
cross_toolset: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded
findunusedcode:
endif
all: build
endif # gb_PARTIALBUILD
# vim: set noet sw=4:
......@@ -41,7 +41,6 @@ endif
endif
ifneq ($(strip $(gb_SpeedUpTargets_WRAPPEDBUILD)),)
$(info wrapped build - skip reading gbuild definitions)
gb_Module_add_target=
gb_Module_add_check_target=
gb_Module_add_subsequentcheck_target=
......
......@@ -248,6 +248,35 @@ $(eval $(call gb_Deliver_init))
include $(SOLARENV)/inc/minor.mk
ifeq ($(gb_SourceEnvAndRecurse_STAGE),buildpl)
gb_ComponentTarget_ComponentTarget = $(call gb_ComponentTarget_get_target,$(1)): build
gb_ComponentsTarget_ComponentsTarget = $(call gb_ComponentsTarget_get_target,$(1)): build
gb_AllLangResTarget_AllLangResTarget = $(call gb_AllLangResTarget_get_target,$(1)): build
gb_WinResTarget_WinResTarget = $(call gb_WinResTarget_get_target,$(1)): build
gb_LinkTarget_LinkTarget = $(call gb_LinkTarget_get_target,$(1)): build
gb_Library_Library = $(call gb_Library_get_target,$(1)): build
gb_StaticLibrary_StaticLibrary = $(call gb_StaticLibrary_get_target,$(1)): build
gb_Executable_Executable = $(call gb_Executable_get_target,$(1)): build
gb_SdiTarget_SdiTarget = $(call gb_SdiTarget_get_target,$(1)): build
gb_Package_Package = $(call gb_Package_get_target,$(1)): build
gb_CustomTarget_CustomTarget = $(call gb_CustomTarget_get_target,$(1)): build
gb_ExternalLib_ExternalLib = $(call gb_ExternalLib_get_target,$(1)): build
gb_Pyuno_Pyuno = $(call gb_Pyuno_get_target,$(1)): build
gb_RdbTarget_RdbTarget = $(call gb_RdbTarget_get_target,$(1)): build
gb_CppunitTest_CppunitTest = $(call gb_CppunitTest_get_target,$(1)): build
gb_Jar_Jar = $(call gb_Jar_get_target,$(1)): build
gb_JavaClassSet_JavaClassSet = $(call gb_JavaClassSet_get_target,$(1)): build
gb_JunitTest_JunitTest = $(call gb_JunitTest_get_target,$(1)): dev-install
gb_UnoApiTarget_UnoApiTarget = $(call gb_UnoApiTarget_get_target,$(1)): build
gb_Zip_Zip = $(call gb_Zip_get_target,$(1)): build
gb_Configuration_Configuration = $(call gb_Configuration_get_target,$(1)): build
gb_Extension_Extension = $(call gb_Extension_get_target,$(1)): build
include $(GBUILDDIR)/Module.mk
endif
# We are using a set of scopes that we might as well call classes.
# It is important to include them in the right order as that is
......@@ -265,6 +294,7 @@ include $(SOLARENV)/inc/minor.mk
# shortest stem instead of first match. However, upon intoduction this version
# is not available everywhere by default.
ifeq ($(gb_SourceEnvAndRecurse_STAGE),gbuild)
include $(foreach class, \
ComponentTarget \
ComponentsTarget \
......@@ -290,6 +320,7 @@ include $(foreach class, \
Configuration \
Extension \
,$(GBUILDDIR)/$(class).mk)
endif
# optional extensions that should never be essential
ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),)
......
gb_MAKEFILEDIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
ifneq ($(strip $(gb_PARTIALBUILD)),)
SRCDIR:=$(realpath $(gb_MAKEFILEDIR)/..)
......@@ -9,7 +10,7 @@ gb_SourceEnvAndRecurse_reconfigure=true
else
SRCDIR:=$(realpath $(gb_MAKEFILEDIR))
gb_SourceEnvAndRecurse_reconfigure=$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(SRCDIR)/Env.Host.sh
gb_SourceEnvAndRecurse_reconfigure=$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(SRCDIR)/Env.Host.sh gb_SourceEnvAndRecurse_STAGE=reconfigure
endif
......@@ -18,7 +19,10 @@ source-env-and-recurse:
if test -f $(SRCDIR)/config.mk ; then . $(SRCDIR)/config.mk; fi && \
if test -f $(SRCDIR)/Env.Host.sh; then . $(SRCDIR)/Env.Host.sh; fi && \
if test -z "$${SOLARENV}"; then echo "no configuration found and could not create one" && exit 1; fi && \
$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(MAKECMDGOALS)
$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(MAKECMDGOALS) gb_SourceEnvAndRecurse_STAGE=buildpl && \
echo "---------GBUILD" && \
$(MAKE) -f $(firstword $(MAKEFILE_LIST)) $(MAKECMDGOALS) gb_SourceEnvAndRecurse_STAGE=gbuild
ifneq ($(strip $(MAKECMDGOALS)),)
ifneq ($(MAKECMDGOALS),$(SRCDIR)/Env.Host.sh)
......
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