diff options
-rw-r--r-- | Makefile.in | 68 | ||||
-rw-r--r-- | solenv/gbuild/Module.mk | 42 | ||||
-rw-r--r-- | solenv/gbuild/extensions/post_BuilplTargets.mk | 38 | ||||
-rw-r--r-- | solenv/gbuild/extensions/pre_AuxTargets.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/extensions/pre_BuildplTargets.mk | 60 |
5 files changed, 143 insertions, 67 deletions
diff --git a/Makefile.in b/Makefile.in index cecd76981a99..19e48146eb3c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,13 +8,6 @@ else CROSS_TOOLSET_RULE:= endif -ifeq ($(filter all check unitcheck,$(MAKECMDGOALS)),) -gb_MAKETARGET=build -else -# fail early -gb_MAKETARGET=all -endif - .PHONY : build dev-install all cross-build-toolset install distro-pack-install clean clean-host clean-build distclean findunusedcode bootstrap define forward_to_gbuild @@ -24,63 +17,11 @@ define forward_to_gbuild $(patsubst allcheck,check,$(1)) endef -define forward_to_buildpl -. ./Env.Host.sh && cd $(1) && gb_MAKETARGET=$(gb_MAKETARGET) build.pl -P@BUILD_NCPUS@ -- -P@BUILD_MAX_JOBS@ -endef - -ifeq (@CROSS_COMPILING@,YES) -define all_install -To install, issue: @GNUMAKE@ install -Developers might prefer this way: @GNUMAKE@ dev-install -o build -To run smoketest, issue: @GNUMAKE@ check -endef -else -allinstall=For crosscompiles, please consult README.cross how to install it. -endif - -UNAMESYSTEM=$(shell uname -s) - -ifeq ($(UNAMESYSTEM),Linux) -devinstall_run=make debugrun -else -ifeq ($(UNAMESYSTEM),Linux) -devinstall_run=open @abs_builddir@/install/LibreOffice.app -else -define devinstall_run -cd @abs_builddir@/install/program -. ./ooenv -./soffice.bin -endef -endif -endif - all: build unitcheck - $(info) - $(info LibreOffice build succesfully finished.) - $(info) - $(info $(all_install)) - $(info) - -build: Makefile bootstrap src.downloaded $(CROSS_TOOLSET_RULE) - @$(call forward_to_buildpl,instsetoo_native) - -smoketest: Makefile bootstrap src.downloaded $(CROSS_TOOLSET_RULE) - @$(call forward_to_buildpl,smoketestoo_native) && \ - rm -f "@abs_builddir@"/install && \ - ln -s "$$SOLARVER/$$INPATH"/installation/opt/ "@abs_builddir@"/install - -dev-install: smoketest - $(info) - $(info Developer installation finished, you can now execute:) - $(info) - $(info $(devinstall_run)) check : allcheck @true -cross-build-toolset: - $(call forward_to_buildpl,cross_toolset) - install: build @. ./Env.Host.sh && \ echo "Installing in @INSTALLDIR@..." && \ @@ -150,6 +91,15 @@ tags: docs: @$(call forward_to_gbuild,$@) +build: Makefile bootstrap src.downloaded $(CROSS_TOOLSET_RULE) + @$(call forward_to_gbuild,$@) + +dev-install: Makefile bootstrap src.downloaded $(CROSS_TOOLSET_RULE) + $(call forward_to_gbuild,$@) + +cross-build-toolset: + $(call forward_to_gbuild,$@) + findunusedcode: # experimental callcatcher target # http://www.skynet.ie/~caolan/Packages/callcatcher.html diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index a92b3938101a..02e76eacaa23 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -79,16 +79,46 @@ $(call gb_Module_get_target,%) : mkdir -p $(dir $@) && \ touch $@) -.PHONY : build all clean unitcheck subsequentcheck +.PHONY : build all clean unitcheck subsequentcheck dev-install .DEFAULT_GOAL := all +ifeq ($(strip $(gb_PARTIALBUILD)),) +check : subsequentcheck + +define gb_Module_BUILDHINT + +LibreOffice build succesfully finished. + +To install, issue: $(MAKE) install +Developers might prefer this way: $(MAKE) dev-install -o build +To run smoketest, issue: $(MAKE) check +For crosscompiles, please consult README.cross how to install it. + +endef + +define gb_Module_DEVINSTALLHINT + +Developer installation finished, you can now execute: + +make debugrun # on Linux +dopen $(SRCDIR)/install/LibreOffice.app # on OSX + +endef +else +gb_Module_BUILDHINT= +gb_Module_DEVINSTALLHINT= + +endif + all : build unitcheck + $(info $(gb_Module_BUILDHINT)) build : $(call gb_Output_announce,top level modules: $(foreach module,$(filter-out deliverlog,$^),$(notdir $(module))),$(true),ALL,6) $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),ALL,6) $(call gb_Output_announce_title,build done.) $(call gb_Output_announce_bell) + $(info $(gb_Module_BUILDHINT)) unitcheck : $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),CHK,6) @@ -115,12 +145,10 @@ check : unitcheck debugrun : build $(call gb_Module_DEBUGRUNCOMMAND) - - -ifeq ($(strip $(gb_PARTIALBUILD)),) -check : subsequentcheck -endif - +dev-install : + @rm -f $(SRCDIR)/install && \ + ln -s $(OUTDIR)/installation/opt/ $(SRCDIR)/install + $(info $(gb_Module_DEVINSTALLHINT)) define gb_Module_Module gb_Module_ALLMODULES += $(1) diff --git a/solenv/gbuild/extensions/post_BuilplTargets.mk b/solenv/gbuild/extensions/post_BuilplTargets.mk new file mode 100644 index 000000000000..b93774cbcc81 --- /dev/null +++ b/solenv/gbuild/extensions/post_BuilplTargets.mk @@ -0,0 +1,38 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +# +# 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. + +ifeq ($(strip $(gb_PARTIALBUILD)),) + +gb_Module_add_target= +gb_Module_add_check_target= +gb_Module_add_subsequentcheck_target= +gb_FULLDEPS= + +endif # gb_PARTIALBUILD + +# vim:set shiftwidth=4 softtabstop=4 noexpandtab: + diff --git a/solenv/gbuild/extensions/pre_AuxTargets.mk b/solenv/gbuild/extensions/pre_AuxTargets.mk index 3fa099454d32..78f3bef964a8 100644 --- a/solenv/gbuild/extensions/pre_AuxTargets.mk +++ b/solenv/gbuild/extensions/pre_AuxTargets.mk @@ -49,7 +49,7 @@ fetch: $(SRCDIR)/src.downloaded $(WORKDIR)/bootstrap: @cd $(SRCDIR) && ./bootstrap - @touch $@ + @mkdir -p $(dir $@) && touch $@ bootstrap: $(WORKDIR)/bootstrap diff --git a/solenv/gbuild/extensions/pre_BuildplTargets.mk b/solenv/gbuild/extensions/pre_BuildplTargets.mk new file mode 100644 index 000000000000..86abd2352b47 --- /dev/null +++ b/solenv/gbuild/extensions/pre_BuildplTargets.mk @@ -0,0 +1,60 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +# +# 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. + +ifeq ($(strip $(gb_PARTIALBUILD)),) + +ifeq ($(filter-out build,$(MAKECMDSEQUENCE)),) +gb_MAKETARGET=build +else +gb_MAKETARGET=all +endif + +define gb_BuildplTarget_command +cd $(SRCDIR)/$(1) && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl --all gb_MAKETARGET=$(gb_MAKETARGET) +endef + +.PHONY: smoketestoo_native instsetoo_native cross-build-toolset dev-install all build + +smoketestoo_native: + $(call gb_BuildplTarget_command,$@) + +instsetoo_native: + $(call gb_BuildplTarget_command,$@) + +cross-build-toolset: + $(call gb_BuildplTarget_command,$@) + +dev-install: smoketestoo_native + +all: instsetoo_native + +build: instsetoo_native + +endif # gb_PARTIALBUILD + +# vim:set shiftwidth=4 softtabstop=4 noexpandtab: + |