diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-02-06 19:07:47 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-02-06 19:08:03 -0600 |
commit | 2bf1a98da8a5bf0e8a0f28c0f2d8846dc17970d4 (patch) | |
tree | 50bba63941bd125920cc1668d1b60477da895052 | |
parent | ed3a7c0774220894b4b48b4f9cc29a73e472cd06 (diff) |
have make check working again. clean-up the whole STAGE stuff
-rw-r--r-- | Makefile | 82 | ||||
-rw-r--r-- | solenv/gbuild/CustomTarget.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/extensions/post_BuildplTargets.mk | 187 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/partial_build.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/source_and_rerun.mk | 34 | ||||
-rw-r--r-- | tail_build/Makefile | 7 |
7 files changed, 44 insertions, 280 deletions
@@ -1,6 +1,6 @@ # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -.PHONY : all autogen bootstrap fetch build clean clean-build clean-host +.PHONY : all autogen bootstrap build check clean clean-build clean-host dev-install dev-install-link distclean distro-pack-install docs fetch findunusedcode id install subsequenttest tags ifeq ($(MAKECMDGOALS),) MAKECMDGOALS:=all @@ -17,7 +17,7 @@ endif include $(SRCDIR)/config_$(gb_Side).mk -ifneq ($(verbose),) +ifeq ($(verbose),) GMAKE_OPTIONS:=-rs else GMAKE_OPTIONS:=-r @@ -29,6 +29,7 @@ Mesa\ UnoControls\ accessibility\ animations\ +apple_remote\ avmedia\ basctl\ basebmp\ @@ -124,7 +125,6 @@ xmlsecurity\ dmake_modules:=\ afms\ apache-commons\ -apple_remote\ autodoc\ beanshell\ berkeleydb\ @@ -218,6 +218,7 @@ sdext\ setup_native\ shell\ smoketest\ +smoketestoo_native\ solenv\ soltools\ stax\ @@ -238,13 +239,16 @@ xsltml\ zlib\ define gbuild_module_rules -.PHONY: $(1) $(1).clean +.PHONY: $(1) $(1).clean $(1).deliver $(1): bootstrap fetch - cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) + cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) gb_PARTIALBUILD=T $(1).clean: - cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean + cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean gb_PARTIALBUILD=T + +$(1).deliver: + @true endef @@ -263,7 +267,7 @@ $(1).all: bootstrap fetch cd $(1) && unset MAKEFLAGS && \ $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) -$(1).deliver: bootstrap fetch +$(1).deliver: cd $(1) && $(SOLARENV)/bin/deliver.pl $(1).clean: @@ -276,16 +280,6 @@ $(foreach m,$(1),$(call dmake_module_rules,$(m))) endef # -# Build -# -build: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross-toolset) - cd instsetoo_native && unset MAKEFLAGS && \ - $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) - -cross-toolset: - cd cross_toolset && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) - -# # Partial Build # $(eval $(call gbuild_modules_rules,$(gbuild_modules))) @@ -350,6 +344,18 @@ config_host.mk : config_host.mk.in bin/repo-list.in ooo.lst.in configure.in auto ./autogen.sh # +# Fetch +# +fetch: src.downloaded + +src.downloaded : autogen ooo.lst download +ifeq ($(DO_FETCH_TARBALLS),YES) + @./download $(SRCDIR)/ooo.lst && touch $@ +else + @echo "Automatic fetching of external tarballs is disabled." +endif + +# # Bootstap # $(WORKDIR)/bootstrap: @@ -359,16 +365,15 @@ $(WORKDIR)/bootstrap: bootstrap: $(WORKDIR)/bootstrap # -# Fetch +# Build # -fetch: src.downloaded +build: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross-toolset) + cd instsetoo_native && unset MAKEFLAGS && \ + $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) + +cross-toolset: bootstrap fetch + cd cross_toolset && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -src.downloaded : autogen ooo.lst download -ifeq ($(DO_FETCH_TARBALLS),YES) - @./download $(SRCDIR)/ooo.lst && touch $@ -else - @echo "Automatic fetching of external tarballs is disabled." -endif # # Install @@ -381,14 +386,13 @@ install: echo "Installation finished, you can now execute:" && \ echo "$(INSTALLDIR)/program/soffice" -#dev-install: $(WORKDIR)/bootstrap \ -# $(ROOT_SRC)/src.downloaded \ -# $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) \ -# | $(filter build,$(MAKECMDGOALS)) \ -# $(if $(filter check,$(MAKECMDGOALS)),build) -# @rm -f $(SRCDIR)/install && ln -s $(OUTDIR)/installation/opt/ $(SRCDIR)/install -# cd smoketestoo_native && \ -# $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) +dev-install-link: + @rm -f $(SRCDIR)/install && ln -s $(OUTDIR)/installation/opt/ $(SRCDIR)/install + +dev-install: dev-install-link + cd smoketestoo_native && \ + unset MAKEFLAGS && \ + $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) distro-pack-install: install $(SRCDIR)/bin/distro-install-clean-up @@ -415,11 +419,13 @@ findunusedcode: @$(GNUMAKE) -f $(SOLARENV)/bin/callcatcher.Makefile @grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy -ifneq ( $(filter-out check debugrun dev-install subsequentcheck unitcheck,$(MAKECMDGOALS)),$(MAKECMDGOALS)) -gb_SourceEnvAndRecurse_STAGE=buildpl -include $(SOLARENV)/gbuild/gbuild.mk -$(eval $(call gb_Module_make_global_targets,$(wildcard $(SRCDIR)/RepositoryModule_*.mk))) -endif +check: subsequentcheck + +subsequentcheck: smoketestoo_native + $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f post.Makefile subsequentcheck + +debugrun: + $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f post.Makefile subsequentcheck endif # not clean or distclean diff --git a/solenv/gbuild/CustomTarget.mk b/solenv/gbuild/CustomTarget.mk index 84c6f11cb206..2e60e7bc0e25 100644 --- a/solenv/gbuild/CustomTarget.mk +++ b/solenv/gbuild/CustomTarget.mk @@ -31,7 +31,6 @@ define gb_CustomTarget__command +$(call gb_Helper_abbreviate_dirs,\ mkdir -p $(call gb_CustomTarget_get_workdir,$(2)) && \ O='$(OUTDIR)' R='$(REPODIR)' S='$(SRCDIR)' W='$(WORKDIR)' gb_AWK='$(gb_AWK)' \ - gb_SourceEnvAndRecurse_STAGE=gbuild \ gb_XSLTPROC='$(gb_XSLTPROC)' GBUILDDIR='$(GBUILDDIR)' SRCDIR='$(SRCDIR)' \ $(MAKE) -C $(call gb_CustomTarget_get_workdir,$(2)) -f $< && \ touch $(1)) diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk b/solenv/gbuild/extensions/post_BuildplTargets.mk deleted file mode 100644 index 1aba6f21b89a..000000000000 --- a/solenv/gbuild/extensions/post_BuildplTargets.mk +++ /dev/null @@ -1,187 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# [ Copyright (C) 2011 Bjoern Michaelsen <bjoern.michaelsen@canonical.com> (initial developer) ] -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -.PHONY: cross-build-toolset dev-install build findunusedcode - -ifeq ($(gb_SourceEnvAndRecurse_STAGE),buildpl) - -.DEFAULT_GOAL=all -#include $(GBUILDDIR)/Module.mk - -.PHONY: build all - -all: build - @true - -# fake targets -- whatever is requested from gbuild requires a full build before (dev-install for JunitTests) -$(call gb_Package_get_target,%): build - @true - -$(call gb_Executable_get_target,%): build - @true - -$(call gb_Extension_get_target,%): build - @true - -$(call gb_ComponentsTarget_get_target,%): build - @true - -$(call gb_Jar_get_target,%): build - @true - -$(call gb_RdbTarget_get_target,%): build - @true - -$(call gb_Pyuno_get_target,%): build - @true - -$(call gb_WinResTarget_get_target,%): build - @true - -$(call gb_CppunitTest_get_target,%): build - @true - -$(call gb_Configuration_get_target,%): build - @true - -#$(call gb_StaticLibrary_get_target,%): build -# @true - -$(call gb_AllLangResTarget_get_target,%): build - @true - -$(call gb_ExternalLib_get_target,%): build - @true - -#$(call gb_Library_get_target,%): build -# @true - -$(call gb_Package_get_target,%): build - @true - -$(call gb_UnoApiTarget_get_target,%): build - @true - -$(call gb_Zip_get_target,%): build - @true - -$(call gb_JunitTest_get_target,%): dev-install - @true - -gb_MAKETARGET=all -# if we have only build as target use build instead of all -ifneq ($(strip $(MAKECMDGOALS)),) -ifeq ($(filter-out build,$(MAKECMDGOALS)),) -gb_MAKETARGET=build -endif -endif - -define gb_BuildplTarget_command -cd $(SRCDIR)/$(1) && unset MAKEFLAGS && export gb_SourceEnvAndRecurse_STAGE=gbuild && $(SOLARENV)/bin/build.pl $(if $(findstring s,$(MAKEFLAGS)),,VERBOSE=T) -P$(BUILD_NCPUS) $(2) -- -P$(GMAKE_PARALLELISM) gb_MAKETARGET=$(gb_MAKETARGET) -endef - -# the build order dependencies are rather ugly... -dev-install: \ - bootstrap \ - $(SRCDIR)/src.downloaded \ - $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) \ - | $(filter build,$(MAKECMDGOALS)) \ - $(if $(filter check,$(MAKECMDGOALS)),build) - $(call gb_BuildplTarget_command,smoketestoo_native,) - -#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)/config_build.mk && $(call gb_BuildplTarget_command,$@,--all) - -# experimental callcatcher target -# http://www.skynet.ie/~caolan/Packages/callcatcher.html -#findunusedcode: -# @which callcatcher > /dev/null 2>&1 || \ -# (echo "callcatcher not installed" && false) -# @sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/config_host.mk > $(SRCDIR)/config_host_callcatcher.mk -# @mkdir -p $(SRCDIR)/solenv/callcatcher/bin && \ -# ln -sf $(SRCDIR)/solenv/$(INPATH)/bin/dmake \ -# $(SRCDIR)/solenv/callcatcher/bin/dmake && \ -# source $(SRCDIR)/config_host_callcatcher.mk && \ -# source $(SRCDIR)/solenv/bin/callcatchEnv.Set.sh && \ -# $(call gb_BuildplTarget_command,instsetoo_native,--all) -# @source $(SRCDIR)/config_host_callcatcher.mk && \ -# callanalyse \ -# $$WORKDIR/LinkTarget/*/* \ -# */$$OUTPATH/bin/* \ -# */$$OUTPATH/lib/* > unusedcode.all -#because non-c++ symbols could be dlsymed lets make a list of class level -#unused methods which don't require much effort to determine if they need -#to be just removed, or put behind appropiate platform or debug level ifdefs -# -#filter out cppu:: because there's a concern they might be required for the -#extensions abi -# -#filter out boost:: and Icc*:: because there are external libraries we -#build but don't include into our install sets -# -#filter out Atom*:: from libcmis, because its too painful to customize -#it to only build the methods we directly call -# @grep ::.*\( unusedcode.all \ -# | grep -v ^cppu:: \ -# | grep -v ^boost:: \ -# | grep -v ^CIcc \ -# | grep -v ^Atom \ -# > unusedcode.easy - -subsequentcheck: dev-install - -clean: - @true - -check: subsequentcheck - @true - -unitcheck: build - @true - -debugrun: - @true - -endif # gb_SourceEnvAndRecurse_STAGE=buildpl - -ifeq ($(gb_SourceEnvAndRecurse_STAGE),gbuild) - -dev-install: $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | $(filter build,$(MAKECMDGOALS)) - -build: $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) - -cross_toolset: $(SRCDIR)/src.downloaded - -findunusedcode: - -endif - - -# vim: set noet sw=4: diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 8b4c16250493..16587041bae1 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -151,9 +151,7 @@ $(eval $(call gb_Helper_collect_libtargets)) gb_Library_DLLPOSTFIX := lo # Include platform/cpu/compiler specific config/definitions -ifneq ($(filter gbuild buidpl,$(gb_SourceEnvAndRecurse_STAGE)),) include $(GBUILDDIR)/platform/$(OS)_$(CPUNAME)_$(COM).mk -endif ifeq ($(CROSS_COMPILING),YES) # We can safely Assume all cross-compilation is from Unix systems. @@ -268,7 +266,6 @@ 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 \ @@ -294,7 +291,6 @@ include $(foreach class, \ Configuration \ Extension \ ,$(GBUILDDIR)/$(class).mk) -endif # optional extensions that should never be essential ifneq ($(wildcard $(GBUILDDIR)/extensions/post_*.mk),) diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk index e95a0a6ddea4..ddfbc4716f3b 100644 --- a/solenv/gbuild/partial_build.mk +++ b/solenv/gbuild/partial_build.mk @@ -1,6 +1,4 @@ -.PHONY : bootstrap - gb_PARTIALBUILD := T ifeq ($(SOLARENV),) @@ -10,13 +8,6 @@ endif include $(module_directory)/../config_$(gb_Side).mk endif -$(WORKDIR)/bootstrap: - @cd $(SRC_ROOT) && ./bootstrap - @mkdir -p $(dir $@) && touch $@ - -bootstrap: $(WORKDIR)/bootstrap - -gb_SourceEnvAndRecurse_STAGE=gbuild include $(SOLARENV)/gbuild/gbuild.mk $(eval $(call gb_Module_make_global_targets,$(shell ls $(module_directory)/Module*.mk))) diff --git a/solenv/gbuild/source_and_rerun.mk b/solenv/gbuild/source_and_rerun.mk deleted file mode 100644 index dc6d9ca40818..000000000000 --- a/solenv/gbuild/source_and_rerun.mk +++ /dev/null @@ -1,34 +0,0 @@ - -gb_MAKEFILEDIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) - -define gb_SourceEnvAndRecurse_recurse -$(MAKE) -f $(firstword $(MAKEFILE_LIST)) -j $${GMAKE_PARALLELISM} $(1) gb_SourceEnvAndRecurse_STAGE=$(2) -endef - -ifneq ($(strip $(gb_PARTIALBUILD)),) - -SRCDIR:=$(realpath $(gb_MAKEFILEDIR)/..) -gb_SourceEnvAndRecurse_reconfigure=true -gb_SourceEnvAndRecurse_buildpl=true - -else - -SRCDIR:=$(realpath $(gb_MAKEFILEDIR)) -gb_SourceEnvAndRecurse_reconfigure=$(call gb_SourceEnvAndRecurse_recurse,$(SRCDIR)/config_host.mk,reconfigure) -gb_SourceEnvAndRecurse_buildpl=$(call gb_SourceEnvAndRecurse_recurse,$(MAKECMDGOALS),buildpl) - -endif - -source-env-and-recurse: - @$(gb_SourceEnvAndRecurse_reconfigure) && \ - if test -f $(SRCDIR)/config_host.mk ; then . $(SRCDIR)/config_host.mk; fi && \ - if test -z "$${SOLARENV}"; then echo "no configuration found and could not create one" && exit 1; fi && \ - $(gb_SourceEnvAndRecurse_buildpl) && \ - $(call gb_SourceEnvAndRecurse_recurse,$(MAKECMDGOALS),gbuild) \ - - -ifneq ($(strip $(MAKECMDGOALS)),) -ifneq ($(MAKECMDGOALS),$(SRCDIR)/config_host.mk) -$(eval $(MAKECMDGOALS) : source-env-and-recurse) -endif -endif diff --git a/tail_build/Makefile b/tail_build/Makefile index d89204e9e100..02ab2a4ed86c 100644 --- a/tail_build/Makefile +++ b/tail_build/Makefile @@ -31,13 +31,6 @@ ifeq ($(strip $(SOLARENV)),) include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../config_host.mk endif -$(WORKDIR)/bootstrap: - @cd $(SRC_ROOT) && ./bootstrap - @mkdir -p $(dir $@) && touch $@ - -bootstrap: $(WORKDIR)/bootstrap - -gb_SourceEnvAndRecurse_STAGE=gbuild include $(SOLARENV)/gbuild/gbuild.mk $(eval $(call gb_Module_make_global_targets,$(SRCDIR)/Module_tail_build.mk)) |