[Libreoffice-commits] .: 4 commits - animations/Makefile automation/Makefile avmedia/Makefile basctl/Makefile basebmp/Makefile basegfx/Makefile basic/Makefile bean/Makefile binaryurp/Makefile build_env.in canvas/Makefile chart2/Makefile comphelper/Makefile configmgr/Makefile configure.in cppcanvas/Makefile cui/Makefile dbaccess/Makefile desktop/Makefile drawinglayer/Makefile dtrans/Makefile editeng/Makefile eventattacher/Makefile extensions/Makefile fileaccess/Makefile filter/Makefile forms/Makefile formula/Makefile framework/Makefile .gitignore GNUmakefile.mk hwpfilter/Makefile i18npool/Makefile i18nutil/Makefile idl/Makefile libcmis/Makefile linguistic/Makefile lotuswordpro/Makefile Makefile.in MathMLDTD/Makefile Mesa/Makefile o3tl/Makefile offapi/Makefile officecfg/Makefile oovbaapi/Makefile oox/Makefile package/Makefile padmin/Makefile psprint_config/Makefile qadevOOo/Makefile regexp/Makefile reportdesign/Makefile rsc/Makefile sal/Makefile sane/Makefile sax/Makefile scaddins/Makefile sccomp/Makefile sc/Makefile scripting/Makefile sd/Makefile sfx2/Makefile slideshow/Makefile solenv/bin solenv/gbuild sot/Makefile .src_root starmath/Makefile svl/Makefile svtools/Makefile svx/Makefile swext/Makefile sw/Makefile tail_build/Makefile testautomation/Makefile toolkit/Makefile tools/Makefile twain/Makefile ucbhelper/Makefile ucb/Makefile udkapi/Makefile unixODBC/Makefile unotools/Makefile unoxml/Makefile uui/Makefile vbahelper/Makefile vcl/Makefile wizards/Makefile writerfilter/Makefile writerperfect/Makefile xmerge/Makefile xml2cmp/Makefile xmloff/Makefile xmlreader/Makefile xmlscript/Makefile xmlsecurity/Makefile

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Wed Nov 16 04:19:33 PST 2011


 .gitignore                        |    1 +
 GNUmakefile.mk                    |    5 ++---
 Makefile.in                       |    8 ++++++--
 MathMLDTD/Makefile                |    8 ++++----
 Mesa/Makefile                     |    8 ++++----
 animations/Makefile               |    8 ++++----
 automation/Makefile               |    8 ++++----
 avmedia/Makefile                  |    8 ++++----
 basctl/Makefile                   |    8 ++++----
 basebmp/Makefile                  |    8 ++++----
 basegfx/Makefile                  |    8 ++++----
 basic/Makefile                    |    8 ++++----
 bean/Makefile                     |    8 ++++----
 binaryurp/Makefile                |    8 ++++----
 build_env.in                      |   11 +++++++++++
 canvas/Makefile                   |    8 ++++----
 chart2/Makefile                   |    8 ++++----
 comphelper/Makefile               |    8 ++++----
 configmgr/Makefile                |    8 ++++----
 configure.in                      |    7 ++++++-
 cppcanvas/Makefile                |    8 ++++----
 cui/Makefile                      |    8 ++++----
 dbaccess/Makefile                 |    8 ++++----
 desktop/Makefile                  |    8 ++++----
 drawinglayer/Makefile             |    8 ++++----
 dtrans/Makefile                   |    8 ++++----
 editeng/Makefile                  |    8 ++++----
 eventattacher/Makefile            |    8 ++++----
 extensions/Makefile               |    8 ++++----
 fileaccess/Makefile               |    8 ++++----
 filter/Makefile                   |    8 ++++----
 forms/Makefile                    |    8 ++++----
 formula/Makefile                  |    8 ++++----
 framework/Makefile                |    8 ++++----
 hwpfilter/Makefile                |    8 ++++----
 i18npool/Makefile                 |    8 ++++----
 i18nutil/Makefile                 |    8 ++++----
 idl/Makefile                      |    8 ++++----
 libcmis/Makefile                  |    8 ++++----
 linguistic/Makefile               |    8 ++++----
 lotuswordpro/Makefile             |    8 ++++----
 o3tl/Makefile                     |    8 ++++----
 offapi/Makefile                   |    8 ++++----
 officecfg/Makefile                |    8 ++++----
 oovbaapi/Makefile                 |    8 ++++----
 oox/Makefile                      |    8 ++++----
 package/Makefile                  |    8 ++++----
 padmin/Makefile                   |    8 ++++----
 psprint_config/Makefile           |    8 ++++----
 qadevOOo/Makefile                 |    8 ++++----
 regexp/Makefile                   |    8 ++++----
 reportdesign/Makefile             |    8 ++++----
 rsc/Makefile                      |    8 ++++----
 sal/Makefile                      |    8 ++++----
 sane/Makefile                     |    8 ++++----
 sax/Makefile                      |    8 ++++----
 sc/Makefile                       |    8 ++++----
 scaddins/Makefile                 |    8 ++++----
 sccomp/Makefile                   |    8 ++++----
 scripting/Makefile                |    8 ++++----
 sd/Makefile                       |    8 ++++----
 sfx2/Makefile                     |    8 ++++----
 slideshow/Makefile                |    8 ++++----
 solenv/bin/lo_find_src_root       |   23 +++++++++++++++++++++++
 solenv/bin/lo_proxy_start         |   31 +++++++++++++++++++++++++++++++
 solenv/gbuild/gbuild.mk           |    3 ++-
 solenv/gbuild/gbuild_simple.mk    |    2 ++
 solenv/gbuild/source_and_rerun.mk |    6 ++++++
 solenv/gbuild/templates/Makefile  |    8 ++++----
 sot/Makefile                      |    8 ++++----
 starmath/Makefile                 |    8 ++++----
 svl/Makefile                      |    8 ++++----
 svtools/Makefile                  |    8 ++++----
 svx/Makefile                      |    8 ++++----
 sw/Makefile                       |    8 ++++----
 swext/Makefile                    |    8 ++++----
 tail_build/Makefile               |   15 ++++-----------
 testautomation/Makefile           |    8 ++++----
 toolkit/Makefile                  |    8 ++++----
 tools/Makefile                    |    8 ++++----
 twain/Makefile                    |    8 ++++----
 ucb/Makefile                      |    8 ++++----
 ucbhelper/Makefile                |    8 ++++----
 udkapi/Makefile                   |    8 ++++----
 unixODBC/Makefile                 |    8 ++++----
 unotools/Makefile                 |    8 ++++----
 unoxml/Makefile                   |    8 ++++----
 uui/Makefile                      |    8 ++++----
 vbahelper/Makefile                |    8 ++++----
 vcl/Makefile                      |    8 ++++----
 wizards/Makefile                  |    8 ++++----
 writerfilter/Makefile             |    8 ++++----
 writerperfect/Makefile            |    8 ++++----
 xmerge/Makefile                   |    8 ++++----
 xml2cmp/Makefile                  |    8 ++++----
 xmloff/Makefile                   |    8 ++++----
 xmlreader/Makefile                |    8 ++++----
 xmlscript/Makefile                |    8 ++++----
 xmlsecurity/Makefile              |    8 ++++----
 99 files changed, 446 insertions(+), 370 deletions(-)

New commits:
commit 0ea8c014ef44695d0fd94f8738654e123e154cc0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Nov 16 06:14:27 2011 -0600

    tweak gbuild standart Makefile to allow partial build in unsourced env
    
    This allow to run make in a module wihtout the need to source
    Env.Host.sh.

diff --git a/GNUmakefile.mk b/GNUmakefile.mk
index 1810a2e..e190825 100644
--- a/GNUmakefile.mk
+++ b/GNUmakefile.mk
@@ -27,11 +27,10 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
+include ./solenv/gbuild/source_and_rerun.mk
 endif
 
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(wildcard $(SRCDIR)/RepositoryModule_*.mk)))
 
diff --git a/MathMLDTD/Makefile b/MathMLDTD/Makefile
index 90947b2..78def25 100644
--- a/MathMLDTD/Makefile
+++ b/MathMLDTD/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/Mesa/Makefile b/Mesa/Makefile
index 5bedaf0..3080611 100644
--- a/Mesa/Makefile
+++ b/Mesa/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/animations/Makefile b/animations/Makefile
index 6c4d53b..5742d9f 100644
--- a/animations/Makefile
+++ b/animations/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/automation/Makefile b/automation/Makefile
index 8d71119..d3daec8 100644
--- a/automation/Makefile
+++ b/automation/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/avmedia/Makefile b/avmedia/Makefile
index a1b344d..1d161b5 100644
--- a/avmedia/Makefile
+++ b/avmedia/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/basctl/Makefile b/basctl/Makefile
index 3abf1ae..798b507 100644
--- a/basctl/Makefile
+++ b/basctl/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/basebmp/Makefile b/basebmp/Makefile
index b912f2f..778d12f 100644
--- a/basebmp/Makefile
+++ b/basebmp/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/basegfx/Makefile b/basegfx/Makefile
index b912f2f..778d12f 100644
--- a/basegfx/Makefile
+++ b/basegfx/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/basic/Makefile b/basic/Makefile
index 3abf1ae..798b507 100644
--- a/basic/Makefile
+++ b/basic/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/bean/Makefile b/bean/Makefile
index 5bedaf0..3080611 100644
--- a/bean/Makefile
+++ b/bean/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/binaryurp/Makefile b/binaryurp/Makefile
index 3abf1ae..798b507 100644
--- a/binaryurp/Makefile
+++ b/binaryurp/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/canvas/Makefile b/canvas/Makefile
index b912f2f..778d12f 100644
--- a/canvas/Makefile
+++ b/canvas/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/chart2/Makefile b/chart2/Makefile
index 8d71119..d3daec8 100644
--- a/chart2/Makefile
+++ b/chart2/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/comphelper/Makefile b/comphelper/Makefile
index 8d71119..d3daec8 100644
--- a/comphelper/Makefile
+++ b/comphelper/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/configmgr/Makefile b/configmgr/Makefile
index 8d71119..d3daec8 100644
--- a/configmgr/Makefile
+++ b/configmgr/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/cppcanvas/Makefile b/cppcanvas/Makefile
index b912f2f..778d12f 100644
--- a/cppcanvas/Makefile
+++ b/cppcanvas/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/cui/Makefile b/cui/Makefile
index 8d71119..d3daec8 100644
--- a/cui/Makefile
+++ b/cui/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/dbaccess/Makefile b/dbaccess/Makefile
index 8d71119..d3daec8 100644
--- a/dbaccess/Makefile
+++ b/dbaccess/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/desktop/Makefile b/desktop/Makefile
index 8d71119..d3daec8 100644
--- a/desktop/Makefile
+++ b/desktop/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/drawinglayer/Makefile b/drawinglayer/Makefile
index 8d71119..d3daec8 100644
--- a/drawinglayer/Makefile
+++ b/drawinglayer/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/dtrans/Makefile b/dtrans/Makefile
index 3abf1ae..798b507 100644
--- a/dtrans/Makefile
+++ b/dtrans/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/editeng/Makefile b/editeng/Makefile
index 8d71119..d3daec8 100644
--- a/editeng/Makefile
+++ b/editeng/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/eventattacher/Makefile b/eventattacher/Makefile
index 5bedaf0..3080611 100644
--- a/eventattacher/Makefile
+++ b/eventattacher/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/extensions/Makefile b/extensions/Makefile
index 8d71119..d3daec8 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/fileaccess/Makefile b/fileaccess/Makefile
index 8d71119..d3daec8 100644
--- a/fileaccess/Makefile
+++ b/fileaccess/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/filter/Makefile b/filter/Makefile
index 3ac357a..8db1cd0 100644
--- a/filter/Makefile
+++ b/filter/Makefile
@@ -18,13 +18,13 @@
 #***************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/forms/Makefile b/forms/Makefile
index 8d71119..d3daec8 100644
--- a/forms/Makefile
+++ b/forms/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/formula/Makefile b/formula/Makefile
index 6c4d53b..5742d9f 100644
--- a/formula/Makefile
+++ b/formula/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/framework/Makefile b/framework/Makefile
index 8d71119..d3daec8 100644
--- a/framework/Makefile
+++ b/framework/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/hwpfilter/Makefile b/hwpfilter/Makefile
index 8d71119..d3daec8 100644
--- a/hwpfilter/Makefile
+++ b/hwpfilter/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/i18npool/Makefile b/i18npool/Makefile
index 3abf1ae..798b507 100644
--- a/i18npool/Makefile
+++ b/i18npool/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/i18nutil/Makefile b/i18nutil/Makefile
index 3abf1ae..798b507 100644
--- a/i18nutil/Makefile
+++ b/i18nutil/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/idl/Makefile b/idl/Makefile
index 8d71119..d3daec8 100644
--- a/idl/Makefile
+++ b/idl/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/libcmis/Makefile b/libcmis/Makefile
index f3cf94e..72632c7 100644
--- a/libcmis/Makefile
+++ b/libcmis/Makefile
@@ -26,13 +26,13 @@
 # instead of those above.
 
 ifeq ($(strip $(SRC_ROOT)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SRC_ROOT)/solenv/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/linguistic/Makefile b/linguistic/Makefile
index 8d71119..d3daec8 100644
--- a/linguistic/Makefile
+++ b/linguistic/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/Makefile b/lotuswordpro/Makefile
index 8d71119..d3daec8 100644
--- a/lotuswordpro/Makefile
+++ b/lotuswordpro/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/o3tl/Makefile b/o3tl/Makefile
index 3abf1ae..798b507 100644
--- a/o3tl/Makefile
+++ b/o3tl/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/offapi/Makefile b/offapi/Makefile
index 8d71119..d3daec8 100644
--- a/offapi/Makefile
+++ b/offapi/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/officecfg/Makefile b/officecfg/Makefile
index 3ac357a..8db1cd0 100644
--- a/officecfg/Makefile
+++ b/officecfg/Makefile
@@ -18,13 +18,13 @@
 #***************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/oovbaapi/Makefile b/oovbaapi/Makefile
index 6c4d53b..5742d9f 100644
--- a/oovbaapi/Makefile
+++ b/oovbaapi/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/oox/Makefile b/oox/Makefile
index b912f2f..778d12f 100644
--- a/oox/Makefile
+++ b/oox/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/package/Makefile b/package/Makefile
index a1b344d..1d161b5 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/padmin/Makefile b/padmin/Makefile
index 8d71119..d3daec8 100644
--- a/padmin/Makefile
+++ b/padmin/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/psprint_config/Makefile b/psprint_config/Makefile
index 3abf1ae..798b507 100644
--- a/psprint_config/Makefile
+++ b/psprint_config/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/qadevOOo/Makefile b/qadevOOo/Makefile
index 8d71119..d3daec8 100644
--- a/qadevOOo/Makefile
+++ b/qadevOOo/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/regexp/Makefile b/regexp/Makefile
index b912f2f..778d12f 100644
--- a/regexp/Makefile
+++ b/regexp/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/reportdesign/Makefile b/reportdesign/Makefile
index 6c4d53b..5742d9f 100644
--- a/reportdesign/Makefile
+++ b/reportdesign/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/rsc/Makefile b/rsc/Makefile
index 3abf1ae..798b507 100644
--- a/rsc/Makefile
+++ b/rsc/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sal/Makefile b/sal/Makefile
index 8d71119..d3daec8 100644
--- a/sal/Makefile
+++ b/sal/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sane/Makefile b/sane/Makefile
index 5bedaf0..3080611 100644
--- a/sane/Makefile
+++ b/sane/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sax/Makefile b/sax/Makefile
index b912f2f..778d12f 100644
--- a/sax/Makefile
+++ b/sax/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sc/Makefile b/sc/Makefile
index f2edbe4..da8cc4d 100644
--- a/sc/Makefile
+++ b/sc/Makefile
@@ -22,13 +22,13 @@
 # instead of those above.
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/scaddins/Makefile b/scaddins/Makefile
index 3abf1ae..798b507 100644
--- a/scaddins/Makefile
+++ b/scaddins/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sccomp/Makefile b/sccomp/Makefile
index 3abf1ae..798b507 100644
--- a/sccomp/Makefile
+++ b/sccomp/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/scripting/Makefile b/scripting/Makefile
index a1b344d..1d161b5 100644
--- a/scripting/Makefile
+++ b/scripting/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sd/Makefile b/sd/Makefile
index 8d71119..d3daec8 100644
--- a/sd/Makefile
+++ b/sd/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sfx2/Makefile b/sfx2/Makefile
index 8d71119..d3daec8 100644
--- a/sfx2/Makefile
+++ b/sfx2/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/slideshow/Makefile b/slideshow/Makefile
index 6c4d53b..5742d9f 100644
--- a/slideshow/Makefile
+++ b/slideshow/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 9c7d1f7..4634333 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -26,10 +26,11 @@
 #
 #*************************************************************************
 
+GBUILDDIR:=$(SRC_ROOT)/solenv/gbuild
+
 # vars needed from the env/calling makefile
 
 # DEBUG
-# GBUILDDIR
 # INPATH
 # JAVA_HOME
 # JDKINCS
diff --git a/solenv/gbuild/gbuild_simple.mk b/solenv/gbuild/gbuild_simple.mk
index 35a2197..aeac005 100644
--- a/solenv/gbuild/gbuild_simple.mk
+++ b/solenv/gbuild/gbuild_simple.mk
@@ -26,6 +26,8 @@
 #
 #*************************************************************************
 
+GBUILDDIR:=$(SRC_ROOT)/solenv/gbuild
+
 # this is a subset of gbuild functionality, for use in custom makefiles
 
 COMMA :=,
diff --git a/solenv/gbuild/source_and_rerun.mk b/solenv/gbuild/source_and_rerun.mk
new file mode 100644
index 0000000..937751f
--- /dev/null
+++ b/solenv/gbuild/source_and_rerun.mk
@@ -0,0 +1,6 @@
+
+all:
+	@if test -f ./config.mk; then . ./config.mk; else if test -f ../config.mk ; then . ../config.mk; fi; fi && \
+	if test -f ./Env.Host.sh; then . ./Env.Host.sh; else if test -f ../Env.Host.sh; then . ../Env.Host.sh; fi ; fi && \
+	if test -z "$${SOLARENV}"; then echo "No environment set!" 2>&1; exit 1; fi && \
+	$(MAKE) $(MAKECMDGOALS)
diff --git a/solenv/gbuild/templates/Makefile b/solenv/gbuild/templates/Makefile
index 90947b2..78def25 100644
--- a/solenv/gbuild/templates/Makefile
+++ b/solenv/gbuild/templates/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sot/Makefile b/sot/Makefile
index 8d71119..d3daec8 100644
--- a/sot/Makefile
+++ b/sot/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/starmath/Makefile b/starmath/Makefile
index f2edbe4..da8cc4d 100644
--- a/starmath/Makefile
+++ b/starmath/Makefile
@@ -22,13 +22,13 @@
 # instead of those above.
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/svl/Makefile b/svl/Makefile
index 8d71119..d3daec8 100644
--- a/svl/Makefile
+++ b/svl/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/svtools/Makefile b/svtools/Makefile
index 8d71119..d3daec8 100644
--- a/svtools/Makefile
+++ b/svtools/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/svx/Makefile b/svx/Makefile
index b912f2f..778d12f 100644
--- a/svx/Makefile
+++ b/svx/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/sw/Makefile b/sw/Makefile
index 8d71119..d3daec8 100644
--- a/sw/Makefile
+++ b/sw/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/swext/Makefile b/swext/Makefile
index 5bedaf0..3080611 100644
--- a/swext/Makefile
+++ b/swext/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/tail_build/Makefile b/tail_build/Makefile
index ffea455..92241b5 100644
--- a/tail_build/Makefile
+++ b/tail_build/Makefile
@@ -27,19 +27,12 @@
 
 # if no environment is set, try to find one, source it and re-exec
 ifeq ($(strip $(SOLARENV)),)
+include ./solenv/gbuild/source_and_rerun.mk
+else
 
-all:
-	if test -f ./Env.Host.sh; then . ./Env.Host.sh; fi && \
-	if test -z "$${SOLARENV}"; then echo "No environment set!"; exit 1; fi && \
-	$(MAKE)
-
-else # SOLARENV
-
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(SRC_ROOT)/Module_tail_build.mk))
 
-endif # SOLARENV
-
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/testautomation/Makefile b/testautomation/Makefile
index 5bedaf0..3080611 100644
--- a/testautomation/Makefile
+++ b/testautomation/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/toolkit/Makefile b/toolkit/Makefile
index 8d71119..d3daec8 100644
--- a/toolkit/Makefile
+++ b/toolkit/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/tools/Makefile b/tools/Makefile
index 8d71119..d3daec8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/twain/Makefile b/twain/Makefile
index 5bedaf0..3080611 100644
--- a/twain/Makefile
+++ b/twain/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/ucb/Makefile b/ucb/Makefile
index 8d71119..d3daec8 100644
--- a/ucb/Makefile
+++ b/ucb/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/ucbhelper/Makefile b/ucbhelper/Makefile
index b912f2f..778d12f 100644
--- a/ucbhelper/Makefile
+++ b/ucbhelper/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/udkapi/Makefile b/udkapi/Makefile
index 8d71119..d3daec8 100644
--- a/udkapi/Makefile
+++ b/udkapi/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/unixODBC/Makefile b/unixODBC/Makefile
index 5bedaf0..3080611 100644
--- a/unixODBC/Makefile
+++ b/unixODBC/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/unotools/Makefile b/unotools/Makefile
index 8d71119..d3daec8 100644
--- a/unotools/Makefile
+++ b/unotools/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/unoxml/Makefile b/unoxml/Makefile
index 6c4d53b..5742d9f 100644
--- a/unoxml/Makefile
+++ b/unoxml/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/uui/Makefile b/uui/Makefile
index 6c4d53b..5742d9f 100644
--- a/uui/Makefile
+++ b/uui/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/vbahelper/Makefile b/vbahelper/Makefile
index 8d71119..d3daec8 100644
--- a/vbahelper/Makefile
+++ b/vbahelper/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Makefile b/vcl/Makefile
index 8d71119..d3daec8 100644
--- a/vcl/Makefile
+++ b/vcl/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/wizards/Makefile b/wizards/Makefile
index 8d71119..d3daec8 100644
--- a/wizards/Makefile
+++ b/wizards/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Makefile b/writerfilter/Makefile
index 8d71119..d3daec8 100644
--- a/writerfilter/Makefile
+++ b/writerfilter/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/Makefile b/writerperfect/Makefile
index 3abf1ae..798b507 100644
--- a/writerperfect/Makefile
+++ b/writerperfect/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xmerge/Makefile b/xmerge/Makefile
index 5bedaf0..3080611 100644
--- a/xmerge/Makefile
+++ b/xmerge/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xml2cmp/Makefile b/xml2cmp/Makefile
index 90947b2..78def25 100644
--- a/xml2cmp/Makefile
+++ b/xml2cmp/Makefile
@@ -26,13 +26,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xmloff/Makefile b/xmloff/Makefile
index 8d71119..d3daec8 100644
--- a/xmloff/Makefile
+++ b/xmloff/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xmlreader/Makefile b/xmlreader/Makefile
index b912f2f..778d12f 100644
--- a/xmlreader/Makefile
+++ b/xmlreader/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xmlscript/Makefile b/xmlscript/Makefile
index b912f2f..778d12f 100644
--- a/xmlscript/Makefile
+++ b/xmlscript/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
diff --git a/xmlsecurity/Makefile b/xmlsecurity/Makefile
index a1b344d..1d161b5 100644
--- a/xmlsecurity/Makefile
+++ b/xmlsecurity/Makefile
@@ -27,13 +27,13 @@
 #*************************************************************************
 
 ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+include ../solenv/gbuild/source_and_rerun.mk
+else
 
 gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
+include $(SOLARENV)/gbuild/gbuild.mk
 
 $(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
 
+endif
 # vim: set noet sw=4 ts=4:
commit 9d76072055074cdd4bbd29ce6ba33c9499509fff
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Nov 16 06:12:36 2011 -0600

    avoid running autogen.sh when trying to clean or distclean

diff --git a/Makefile.in b/Makefile.in
index 716aad7..9f58d33 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -121,8 +121,12 @@ endif
 
 fetch: src.downloaded
 
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
 Makefile: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
 	./autogen.sh
+endif
+endif
 
 id:
 	@. ./Env.Host.sh && \
commit cb70868bdae30e01323afeb7cc6021a6b10003f0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Nov 16 06:12:09 2011 -0600

    add utility script and build_env to avoid sourcing Env.Host.sh
    
    The goal is to able to do partial build without having
    to source Env.Host.sh into one's environment
    
    There is 2 way to use this:
    
    1/
    copy the scripts lo_find_src_root and lo_proxy_start
    somewhere in your PATH, and
    then you can add
    alias build='lo_proxy_start build'
    alias deliver='lo_proxy_start deliver'
    in your .bashrc
    
    at that point you can use build and deliver anywhere in the source tree
    without the need to source anything.
    This allow you to switch from one source tree to another.
    the proper SRC_ROOT will be determined automatically based
    on the current working directory
    
    2/
    source build_env
    
    build_env only source the bare minimum to allow build and make to work
    for the associated source tree.
    If you want to work in a diffrent tree, you need to resource

diff --git a/.gitignore b/.gitignore
index 1886dd2..3fc92e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,7 @@
 /aclocal.m4
 /autom4te.cache
 /autogen.lastrun
+/build_env
 /ChangeLog
 /config.guess
 /config.log
diff --git a/Makefile.in b/Makefile.in
index 24a73b7..716aad7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -86,9 +86,9 @@ ifeq (@BUILD_DMAKE@,YES)
 	-test -f dmake/Makefile && $(MAKE) -C dmake distclean
 endif
 	rm -rf Env.Host.sh Makefile aclocal.m4 autogen.lastrun autom4te.cache \
-	bin/repo-list config.log config.status configure \
+	bin/repo-list build_env config.log config.status configure \
 	desktop/scripts/soffice.sh ooo.lst post_download post_download.log \
-	set_soenv set_soenv.last set_soenv.stamp src.downloaded warn 
+	set_soenv set_soenv.last set_soenv.stamp src.downloaded warn
 
 clean: clean-host clean-build
 
diff --git a/build_env.in b/build_env.in
new file mode 100755
index 0000000..bf1ace6
--- /dev/null
+++ b/build_env.in
@@ -0,0 +1,11 @@
+
+if hash lo_proxy_start 2>&- ; then
+    base_alias="lo_proxy_start"
+else
+    base_alias="@SRC_ROOT@/solenv/bin/lo_proxy_start"
+fi
+
+alias build="$base_alias build"
+alias deliver="$base_alias deliver"
+
+unset base_alias
diff --git a/configure.in b/configure.in
index 19beb9a..17df053 100644
--- a/configure.in
+++ b/configure.in
@@ -40,9 +40,14 @@ AC_SUBST(CROSS_COMPILING)
 
 if test "$build_os" = "cygwin"; then
     EXEEXT_FOR_BUILD=.exe
+    SRC_ROOT=`pwd`
+    SRC_ROOT=`cygpath -d "$SRC_ROOT"`
+    SRC_ROOT=`cygpath -u "$SRC_ROOT"`
 else
     EXEEXT_FOR_BUILD=
+    SRC_ROOT=`pwd`
 fi
+AC_SUBST(SRC_ROOT)
 AC_SUBST(EXEEXT_FOR_BUILD)
 
 cat /dev/null > warn
@@ -9548,7 +9553,7 @@ else
     echo > set_soenv.last
 fi
 
-AC_CONFIG_FILES([ooo.lst set_soenv Makefile bin/repo-list desktop/scripts/soffice.sh])
+AC_CONFIG_FILES([ooo.lst set_soenv Makefile bin/repo-list desktop/scripts/soffice.sh build_env])
 AC_OUTPUT
 
 # make sure this is executable
diff --git a/solenv/bin/lo_find_src_root b/solenv/bin/lo_find_src_root
new file mode 100755
index 0000000..a91c847
--- /dev/null
+++ b/solenv/bin/lo_find_src_root
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# (c) 2011  Norbert Thiebaud. License : GPLv3
+#
+# try to locate the SRC_ROOT based on the working directory
+# we search for first Repository.mk
+# in the current directoyr or its parent, all teh way to /
+# Ths is a heuristic. it works 'most of the times
+# but it could give false positive if you try hard enough
+#
+
+current=$(pwd)
+
+while [  "${current}" != "/" ] ; do
+    if [ -f ${current}/.src_root ] ; then
+        echo "${current}"
+        exit 0;
+    fi
+    current=$(dirname "${current}")
+done
+
+echo "Error cannot determine SRC_ROOT" 1>&2
+exit 1;
diff --git a/solenv/bin/lo_proxy_start b/solenv/bin/lo_proxy_start
new file mode 100755
index 0000000..67dcabf
--- /dev/null
+++ b/solenv/bin/lo_proxy_start
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+bin_dir=$(dirname $0)
+action=$(basename $0)
+
+if [ "$action" = "lo_proxy_start" ] ; then
+    action=$1
+    shift
+fi
+
+if [ -z "$SRC_ROOT" ] ; then
+   SRC_ROOT=$($bin_dir/lo_find_src_root) || exit 1
+fi
+if [ -z "$SOLARINC" ] ; then
+    if [ -e "$SRC_ROOT/config.mk" ] ; then
+        . "$SRC_ROOT/config.mk"
+    fi
+    if [ -e "$SRC_ROOT/Env.Host.sh" ] ; then
+        . "$SRC_ROOT/Env.Host.sh"
+    fi
+fi
+
+if [ -e $SRC_ROOT/solenv/bin/$action.pl ] ; then
+   $SRC_ROOT/solenv/bin/$action.pl "$@"
+elif [ -e $SRC_ROOT/solenv/bin/$action.sh ] ; then
+   $SRC_ROOT/solenv/bin/$action.sh "$@"
+else
+   echo "$action.[pl|sh] not found" 2>&1
+   exit 1
+fi
+
commit 1d5aaeacfce983bf7a4a7c1f056fd21ac730b8e8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Nov 16 06:01:10 2011 -0600

    add a semaphore-file to allow for location of the root of the core repo

diff --git a/.src_root b/.src_root
new file mode 100644
index 0000000..e69de29


More information about the Libreoffice-commits mailing list