[Libreoffice-commits] .: Branch 'feature/gnumake2' - 94 commits - GNUmakefile.mk Module_ooo.mk RepositoryFixes.mk Repository.mk solenv/bin solenv/gbuild soltools/mkdepend SourcePath.mk Targetnames.mk

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Mon Dec 20 10:02:25 PST 2010


 GNUmakefile.mk                      |    9 +
 Module_ooo.mk                       |    2 
 Repository.mk                       |  125 +++++++++++++++++++++++++
 RepositoryFixes.mk                  |  135 +++++++++++++++++++++++++++
 SourcePath.mk                       |   35 -------
 Targetnames.mk                      |  127 -------------------------
 solenv/bin/macosx-create-bundle     |    2 
 solenv/bin/packmodule               |   58 +++++++++++
 solenv/gbuild/AllLangResTarget.mk   |   44 +++++---
 solenv/gbuild/BuildDirs.mk          |   34 ++++++
 solenv/gbuild/ComponentTarget.mk    |   35 +++++--
 solenv/gbuild/Deliver.mk            |   82 ++++++++++++++++
 solenv/gbuild/Executable.mk         |   10 +-
 solenv/gbuild/Helper.mk             |   87 +++++++++++++++--
 solenv/gbuild/Library.mk            |   21 ++--
 solenv/gbuild/LinkTarget.mk         |   95 ++++++++++++++++---
 solenv/gbuild/Module.mk             |   45 ++++++---
 solenv/gbuild/Output.mk             |  147 +++++++++++++++++++++++++++++
 solenv/gbuild/Package.mk            |   19 ++-
 solenv/gbuild/PrecompiledHeaders.mk |    6 -
 solenv/gbuild/SdiTarget.mk          |    7 +
 solenv/gbuild/StaticLibrary.mk      |   14 +-
 solenv/gbuild/TargetLocations.mk    |  114 +++++++++++++---------
 solenv/gbuild/gbuild.mk             |  127 +++++++++++--------------
 solenv/gbuild/platform/linux.mk     |   81 ++++++++--------
 solenv/gbuild/platform/macosx.mk    |  108 +++++++++++++--------
 solenv/gbuild/platform/solaris.mk   |   90 ++++++++++--------
 solenv/gbuild/platform/windows.mk   |  179 +++++++++++++++---------------------
 solenv/gbuild/processdelivered.awk  |   35 +++++++
 soltools/mkdepend/include.c         |    5 +
 30 files changed, 1269 insertions(+), 609 deletions(-)

New commits:
commit 6e923dade22fc0ed535326b595fde2a8cfdbbf8f
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:57:28 2010 -0600

    fixing variable exports for windows compiler (thanks ause)

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 46b9ebc..2e4623f 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -228,6 +228,7 @@ define gb_CObject__command
 $(call gb_Output_announce,$(2),$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
+	unset INCLUDE && \
 	$(gb_CC) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
commit 847085d658a37b49bf15bdc88c8cfd1c2a4649e1
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:56:46 2010 -0600

    fixing variable exports for windows compiler (thanks ause)

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 5c959e6..46b9ebc 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -166,10 +166,10 @@ gb_LinkTarget_LDFLAGS := \
 	-NODEFAULTLIB \
 	-OPT:NOREF \
 	-SUBSYSTEM:CONSOLE \
-    -safeseh \
-    -nxcompat \
-    -dynamicbase \
-	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(ILIB)))) \
+	-safeseh \
+	-nxcompat \
+	-dynamicbase \
+	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
 
 ifneq ($(ENABLE_CRASHDUMP),)
 gb_LinkTarget_LDFLAGS += -DEBUG
@@ -224,10 +224,6 @@ else
 CObject__command_deponcompile =
 endif
 
-# some dark shell magic here
-# C is the command to execute
-# E is the linker output, that we are only interested in on error (good programs keep silent on success)
-# RC is the return code of the link command
 define gb_CObject__command
 $(call gb_Output_announce,$(2),$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs_native,\
@@ -266,14 +262,11 @@ else
 gb_CxxObject__command_deponcompile =
 endif
 
-# some dark shell magic here
-# C is the command to execute
-# E is the linker output, that we are only interested in on error (good programs keep silent on success)
-# RC is the return code of the link command
 define gb_CxxObject__command
 $(call gb_Output_announce,$(2),$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
+	unset INCLUDE && \
 	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
@@ -316,6 +309,7 @@ define gb_PrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
+	unset INCLUDE && \
 	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
@@ -358,6 +352,7 @@ define gb_NoexPrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
+	unset INCLUDE && \
 	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
@@ -381,10 +376,6 @@ gb_LinkTarget_INCLUDE :=\
 
 gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
 
-# some dark shell magic here
-# C is the command to execute
-# E is the linker output, that we are only interested in on error (good programs keep silent on success)
-# R is the return code of the link command
 define gb_LinkTarget__command
 $(call gb_Output_announce,$(2),$(true),LNK,4)
 $(call gb_Helper_abbreviate_dirs_native,\
commit 44997d07ab625829c02d2c2e8edfe9443b5a0395
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:53:46 2010 -0600

    also accept debug=t

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 70a87d9..97033ba 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -74,7 +74,7 @@ else
 gb_PRODUCT := $(false)
 endif
 
-ifneq ($(strip $(DEBUG)),)
+ifneq ($(strip $(DEBUG)$(debug)),)
 gb_DEBUGLEVEL := 2
 else
 ifeq ($(gb_PRODUCT),$(true))
commit 389297efe27474553c3207c98ce45fd691006236
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:50:44 2010 -0600

    fixing fix for error 134

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 7e68523..5c959e6 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -232,7 +232,7 @@ define gb_CObject__command
 $(call gb_Output_announce,$(2),$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
-	RC=0 && $(gb_CC) \
+	$(gb_CC) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
@@ -274,7 +274,7 @@ define gb_CxxObject__command
 $(call gb_Output_announce,$(2),$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
-	RC=0 && $(gb_CXX) \
+	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
@@ -316,7 +316,7 @@ define gb_PrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
-	RC=0 && $(gb_CXX) \
+	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
@@ -358,7 +358,7 @@ define gb_NoexPrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
-	RC=0 && C=$(gb_CXX) \
+	$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
@@ -392,7 +392,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	RESPONSEFILE=$$(mktemp --tmpdir=$(gb_Helper_MISC)) && \
 	echo "$(foreach object,$(7),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(6),$(call gb_CObject_get_target,$(object)))" > $${RESPONSEFILE} && \
-	RC=0 && $(gb_LINK) \
+	$(gb_LINK) \
 		$(3) \
 		@$${RESPONSEFILE} \
 		$(foreach lib,$(4),$(call gb_Library_get_filename,$(lib))) \
commit ebaf7d5a849c3fcb6f3d4f5080a26a3a8f040cd5
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:49:11 2010 -0600

    removing subshell calls for now to avoid error 134

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index f086c66..7e68523 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -232,13 +232,12 @@ define gb_CObject__command
 $(call gb_Output_announce,$(2),$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
-	RC=0 && C="$(gb_CC) \
+	RC=0 && $(gb_CC) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Fo$(1)" && \
-	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
+		-Fo$(1))
 $(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 endef
 
@@ -275,13 +274,12 @@ define gb_CxxObject__command
 $(call gb_Output_announce,$(2),$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) && \
-	RC=0 && C="$(gb_CXX) \
+	RC=0 && $(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Fo$(1)" && \
-	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
+		-Fo$(1))
 $(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 
 endef
@@ -318,13 +316,12 @@ define gb_PrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
-	RC=0 && C="$(gb_CXX) \
+	RC=0 && $(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj" && \
-	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
+		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj)
 rm $(1).obj
 $(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 
@@ -361,13 +358,12 @@ define gb_NoexPrecompiledHeader__command
 $(call gb_Output_announce,$(2),$(true),PCH,1)
 $(call gb_Helper_abbreviate_dirs_native,\
 	mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
-	RC=0 && C="$(gb_CXX) \
+	RC=0 && C=$(gb_CXX) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj" && \
-	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
+		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj)
 rm $(1).obj
 $(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 
@@ -396,14 +392,12 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	RESPONSEFILE=$$(mktemp --tmpdir=$(gb_Helper_MISC)) && \
 	echo "$(foreach object,$(7),$(call gb_CxxObject_get_target,$(object))) \
 		$(foreach object,$(6),$(call gb_CObject_get_target,$(object)))" > $${RESPONSEFILE} && \
-	RC=0 && C="$(gb_LINK) \
+	RC=0 && $(gb_LINK) \
 		$(3) \
 		@$${RESPONSEFILE} \
 		$(foreach lib,$(4),$(call gb_Library_get_filename,$(lib))) \
 		$(foreach lib,$(5),$(call gb_StaticLibrary_get_filename,$(lib))) \
-		$(subst -out: -implib:$(1),-out:$(1),-out:$(DLLTARGET) -implib:$(1))" && \
-	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && rm -f $(1)); \
-	rm $${RESPONSEFILE} && $$(exit $$RC))
+		$(subst -out: -implib:$(1),-out:$(1),-out:$(DLLTARGET) -implib:$(1)) && rm $${RESPONSEFILE})
 endef
 
 
commit b448f5f212d40ac70dc931c170a09bc1f7eaadf4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:48:30 2010 -0600

    filtering compiler and java headers on windows for dep generation

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 3064804..f086c66 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -209,7 +209,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
 		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
 		-I$(dir $(3)) \
-		$(6) \
+		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
 		$(3) \
 		-f - \
 	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
@@ -252,7 +252,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
 		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
 		-I$(dir $(3)) \
-		$(6) \
+		$(filter-out -I$(COMPATH)% %/pch -I$(JAVA_HOME),$(6)) \
 		$(3) \
 		-f - \
 	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
@@ -299,7 +299,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
-		$(6) \
+		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
 		$(3) \
 		-f - \
 	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
@@ -342,7 +342,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
 		$(4) $(5) \
 		-I$(dir $(3)) \
-		$(6) \
+		$(filter-out -I$(COMPATH)% -I$(JAVA_HOME),$(6)) \
 		$(3) \
 		-f - \
 	| $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
commit 987165c8375210b9f09fb95802db2fc7fdd41ca4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:47:29 2010 -0600

    fixing broken makedepend behaviour

diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index b692999..d163e37 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -72,6 +72,10 @@ struct inclist *inc_path(file, include, dot, incCollection)
      * If the path was surrounded by "" or is an absolute path,
      * then check the exact path provided.
      */
+// FIXME: creates duplicates in the dependency files if absolute paths are
+// given, which certainly is not the intended behavior. Also it slows down
+// makedepend performance considerably.
+/*
     if (!found && (dot || *include == '/')) {
         
         if ((exists_path(incCollection, include)) && stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) {
@@ -81,6 +85,7 @@ struct inclist *inc_path(file, include, dot, incCollection)
         else if (show_where_not)
             warning1("\tnot in %s\n", include);
     }
+*/
 
     /*
      * See if this include file is in the directory of the
commit 21e05a040b1a5cd464916dc179f94e3035632b99
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:39:21 2010 -0600

    reverted some accidental changes

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 7f2609a..1b9a5e0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -553,7 +553,6 @@ ifeq ($(gb_FULLDEPS),$(true))
 -include \
 	$(call gb_PrecompiledHeader_get_dep_target,$(3)) \
 	$(call gb_NoexPrecompiledHeader_get_dep_target,$(3))
-$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS = $$(DEFS)
 endif
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index 517d580..f3e870a 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -50,15 +50,9 @@ $(call gb_NoexPrecompiledHeader_get_dep_target,%) :
 		echo '$(call gb_NoexPrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@)
 
 $(call gb_PrecompiledHeader_get_target,%) :
-	$(info pch def: $(PCH_DEFS))
-	$(info pch cxx: $(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS))
-	$(info pch inc: $(INCLUDE_STL) $(INCLUDE))
 	$(call gb_PrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
 
 $(call gb_NoexPrecompiledHeader_get_target,%) :
-	$(info pch def: $(PCH_DEFS))
-	$(info pch cxx: $(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS))
-	$(info pch inc: $(INCLUDE_STL) $(INCLUDE))
 	$(call gb_NoexPrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
 
 .PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_NoExPrecompiledHeader_get_clean_target,%)
commit b2e9db1fd8eb0827b70c30029d06b3d8edf2d8cb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:38:26 2010 -0600

    fixing ::rtl::Reference/::uno::Reference collision, which broke PCH

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 1b9a5e0..7f2609a 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -553,6 +553,7 @@ ifeq ($(gb_FULLDEPS),$(true))
 -include \
 	$(call gb_PrecompiledHeader_get_dep_target,$(3)) \
 	$(call gb_NoexPrecompiledHeader_get_dep_target,$(3))
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS = $$(DEFS)
 endif
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index f3e870a..517d580 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -50,9 +50,15 @@ $(call gb_NoexPrecompiledHeader_get_dep_target,%) :
 		echo '$(call gb_NoexPrecompiledHeader_get_target,$*) : $$(gb_Helper_PHONY)' > $@)
 
 $(call gb_PrecompiledHeader_get_target,%) :
+	$(info pch def: $(PCH_DEFS))
+	$(info pch cxx: $(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS))
+	$(info pch inc: $(INCLUDE_STL) $(INCLUDE))
 	$(call gb_PrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
 
 $(call gb_NoexPrecompiledHeader_get_target,%) :
+	$(info pch def: $(PCH_DEFS))
+	$(info pch cxx: $(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS))
+	$(info pch inc: $(INCLUDE_STL) $(INCLUDE))
 	$(call gb_NoexPrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS),$(INCLUDE_STL) $(INCLUDE))
 
 .PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_NoExPrecompiledHeader_get_clean_target,%)
commit 9344611a3dab828a6e44d707351519165dd4546e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 11:36:52 2010 -0600

    #i105735# removed obsolete defines

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 286d860..70a87d9 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -127,13 +127,10 @@ include $(foreach repo,$(gb_REPOS),$(repo)/RepositoryFixes.mk)
 $(eval $(call gb_Helper_collect_knownlibs))
 
 gb_GLOBALDEFS := \
-	-D__DMAKE \
 	-D_REENTRANT \
-	-D_USE_NAMESPACE=1 \
 	-DCUI \
 	-DENABLE_LAYOUT_EXPERIMENTAL=0 \
 	-DENABLE_LAYOUT=0 \
-	-DNEW_SOLAR \
 	-DOSL_DEBUG_LEVEL=$(gb_DEBUGLEVEL) \
 	-DSOLAR_JAVA \
 	-DSTLPORT_VERSION=$(STLPORT_VER) \
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index f089a29..e0f2f67 100755
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -214,7 +214,7 @@ endef
 
 # Library class
 
-gb_Library_DEFS := -DSHAREDLIB -D_DLL_
+gb_Library_DEFS := -D_DLL_
 gb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack
 gb_Library_SYSPRE := lib
 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 51731d0..75b89b7 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -248,7 +248,7 @@ endef
 
 # Library class
 
-#gb_Library_DEFS := -DSHAREDLIB -D_DLL_
+gb_Library_DEFS :=
 gb_Library_TARGETTYPEFLAGS := -dynamiclib -single_module
 gb_Library_SYSPRE := lib
 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 68a7543..b83d0d8 100755
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -193,7 +193,6 @@ endef
 
 # Library class
 
-#gb_Library_DEFS := -DSHAREDLIB -D_DLL_
 gb_Library_DEFS :=
 gb_Library_TARGETTYPEFLAGS := -Bdynamic -z text -G
 gb_Library_SYSPRE := lib
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 6a14cdd..3064804 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -409,7 +409,7 @@ endef
 
 # Library class
 
-gb_Library_DEFS := -DSHAREDLIBS -D_DLL_ -D_DLL
+gb_Library_DEFS := -D_DLL_ -D_DLL
 gb_Library_TARGETTYPEFLAGS := -DLL
 gb_Library_get_rpath :=
 
commit 3e7e21db4701b9a5a79f64518db3acc63b2effff
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 10:15:42 2010 -0600

    fixing DEFS and CXXFLAGS (this is needed for PCH on windows)

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 631f785..1b9a5e0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -341,6 +341,7 @@ endif
 endef
 
 define gb_LinkTarget_set_defs
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : DEFS := $(2)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $(2)
@@ -361,6 +362,7 @@ endif
 endef
 
 define gb_LinkTarget_set_cxxflags
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : CXXFLAGS := $(2)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $(2)
commit 8529c20fc284da55d004aebd101ab1b84df79335
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 10:14:36 2010 -0600

    setting INCLUDE, INCLUDE_STL, DEFS on header target (for PCHs on Windows)

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 97c9aaf..631f785 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -306,7 +306,9 @@ $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL)
 $(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS)
 $(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS := 
@@ -378,6 +380,7 @@ endif
 endef
 
 define gb_LinkTarget_set_include
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $(2)
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE := $(2)
@@ -386,6 +389,7 @@ endif
 endef
 
 define gb_LinkTarget_set_include_stl
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $(2)
 ifeq ($(gb_FULLDEPS),$(true))
 $(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE_STL := $(2)
@@ -539,6 +543,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : $(call gb_NoexPrecompiledHeader_ge
 $(call gb_NoexPrecompiledHeader_get_target,$(3)) : $(2).cxx
 
 $(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := $(3)
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS = $$(DEFS)
commit 8cc4c40937ba2d0fd06328886421909a1535e8de
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 10:13:22 2010 -0600

    fixing filtering of PCH define for dep generation

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 6503332..6a14cdd 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -207,7 +207,7 @@ ifeq ($(gb_FULLDEPS),$(true))
 define gb_CObject__command_deponcompile
 $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
-		$(filter -DPRECOMPILED_HEADERS,$(4)) $(5) \
+		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		$(3) \
@@ -250,7 +250,7 @@ ifeq ($(gb_FULLDEPS),$(true))
 define gb_CxxObject__command_deponcompile
 $(call gb_Helper_abbreviate_dirs_native,\
 	$(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \
-		$(filter -DPRECOMPILED_HEADERS,$(4)) $(5) \
+		$(filter-out -DPRECOMPILED_HEADERS,$(4)) $(5) \
 		-I$(dir $(3)) \
 		$(6) \
 		$(3) \
commit 7a6d9b4f6e0c064bf466c3e93a8b7d70a06312af
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 10:11:15 2010 -0600

    added gb_HIRESTIME to allow getting rid of LOW_RESOLUTION_TIME warnings

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index f46c9b1..f7322bb 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -39,7 +39,7 @@ endef
 
 define gb_Deliver_add_deliverable
 gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODIR)/%,%,$(1))
-.LOW_RESOLUTION_TIME : $(1)
+$(if $(gb_HIRESTIME),,.LOW_RESOLUTION_TIME : $(1))
 
 endef
 
commit 6e2d82794bd230c0fbcfabaa39c725ab7630bede
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:59:18 2010 -0600

    solaris awk does not close stdin when not input file is given explicitly

diff --git a/solenv/gbuild/Output.mk b/solenv/gbuild/Output.mk
index dad6bf7..fddab16 100644
--- a/solenv/gbuild/Output.mk
+++ b/solenv/gbuild/Output.mk
@@ -53,8 +53,8 @@ define gb_Output_warn
 $(warning $(NEWLINE)[ WARN  $(2) ] !!!$(NEWLINE)[ WARN  $(2) ] !!! $(1)$(NEWLINE)[ WARN  $(2) ] !!!)
 endef
 
-gb_Output_ESCAPE := $(shell awk 'BEGIN { printf "%c", 27 }')
-gb_Output_BELL := $(shell awk 'BEGIN { printf "%c", 7 }')
+gb_Output_ESCAPE := $(shell echo|awk 'BEGIN { printf "%c", 27 }' -)
+gb_Output_BELL := $(shell echo|awk 'BEGIN { printf "%c", 7 }' -)
 
 # only enable colorized output if
 # - gb_COLOR is set
commit 75a8815d6b24ea26300afc10e0b00f181b75169e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:58:32 2010 -0600

    gnu copy should only preserve mode and timestamps

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 901acb3..f46c9b1 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -49,7 +49,7 @@ mkdir -p $(dir $(2)) && $(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) cp -f $
 endef
 else
 define gb_Deliver_deliver
-mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) -pf $(1) $(2)
+mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) --force --preserve=mode,timestamps $(1) $(2)
 endef
 endif
 
commit 07f0a44aaec503430ae4b27e27a0dbfe7c14e61e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:56:15 2010 -0600

    decrypted confused comment in LinkTarget.mk

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 1704b09..97c9aaf 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -86,12 +86,14 @@ else
 gb_CxxObject__command_dep =
 endif
 
-# CXXFLAGS and DEFS we want to use for this object. This should usually be the case.
-# Only enable PCH if the PCH_CXXFLAGS and the PCH_DEFS (from the linktarget) are the same as the
-# PCH_CXXFLAGS/PCH_DEFS should never be overridden on an object -- they should be the same as for the whole
-# The DEFS/CXXFLAGS would have too be manually overridden for one object file for them to differ.
-# linktarget. In general it should be cleaner to use a static library compiled with different flags and link
-# that in rather than mixing different flags in one linktarget.
+# Only enable PCH if the PCH_CXXFLAGS and the PCH_DEFS (from the linktarget)
+# are the same as the CXXFLAGS and DEFS we want to use for this object. This
+# should usually be the case.  The DEFS/CXXFLAGS would have too be manually
+# overridden for one object file for them to differ.  PCH_CXXFLAGS/PCH_DEFS
+# should never be overridden on an object -- they should be the same as for the
+# whole linktarget. In general it should be cleaner to use a static library
+# compiled with different flags and link that in rather than mixing different
+# flags in one linktarget.
 define gb_CxxObject__set_pchflags
 ifeq ($(gb_ENABLE_PCH),$(true))
 ifneq ($(strip $$(PCH_NAME)),)
commit ac1afa6025126f689177db741517d791e8202f90
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:50:23 2010 -0600

    add debug info; restore some of the old windows link/compile switches

diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index 393bf43..f3e870a 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -60,6 +60,7 @@ $(call gb_PrecompiledHeader_get_clean_target,%) :
 	$(call gb_Output_announce,$*,$(false),PCH,1)
 	-$(call gb_Helper_abbreviate_dirs,\
 		rm -f $(call gb_PrecompiledHeader_get_target,$*) \
+		    $(call gb_PrecompiledHeader_get_target,$*).pdb \
 			$(call gb_PrecompiledHeader_get_dep_target,$*))
 
 
@@ -67,6 +68,7 @@ $(call gb_NoexPrecompiledHeader_get_clean_target,%) :
 	$(call gb_Output_announce,$*,$(false),PCH,1)
 	-$(call gb_Helper_abbreviate_dirs,\
 		rm -f $(call gb_NoexPrecompiledHeader_get_target,$*) \
+		    $(call gb_NoexPrecompiledHeader_get_target,$*).pdb \
 			$(call gb_NoexPrecompiledHeader_get_dep_target,$*))
 endif
 
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index bf3a681..6503332 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -59,6 +59,7 @@ gb_CFLAGS := \
 	-Gd \
 	-GR \
 	-Gs \
+	-GS \
 	-Gy \
 	-nologo \
 	-Wall \
@@ -106,6 +107,7 @@ gb_CXXFLAGS := \
 	-Gd \
 	-GR \
 	-Gs \
+	-GS \
 	-Gy \
 	-nologo \
 	-Wall \
@@ -164,13 +166,20 @@ gb_LinkTarget_LDFLAGS := \
 	-NODEFAULTLIB \
 	-OPT:NOREF \
 	-SUBSYSTEM:CONSOLE \
+    -safeseh \
+    -nxcompat \
+    -dynamicbase \
 	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(ILIB)))) \
 
 ifneq ($(ENABLE_CRASHDUMP),)
 gb_LinkTarget_LDFLAGS += -DEBUG
+gb_CFLAGS+=-Zi
+gb_CXXFLAGS+=-Zi
 endif
 
 ifeq ($(gb_DEBUGLEVEL),2)
+gb_CXXFLAGS +=-Zi
+gb_CFLAGS +=-Zi
 gb_COMPILEROPTFLAGS :=
 gb_LinkTarget_LDFLAGS += -DEBUG
 else
@@ -280,7 +289,9 @@ endef
 
 # PrecompiledHeader class
 
-gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx -Fp$(call gb_PrecompiledHeader_get_target,$(1))
+gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
+									   -Fp$(call gb_PrecompiledHeader_get_target,$(1)) \
+									   -Fd$(call gb_PrecompiledHeader_get_target,$(1)).pdb
 
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_PrecompiledHeader__command_deponcompile
@@ -312,7 +323,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj" && \
+		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj" && \
 	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
 rm $(1).obj
 $(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
@@ -321,7 +332,9 @@ endef
 
 # NoexPrecompiledHeader class
 
-gb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1))
+gb_NoexPrecompiledHeader_get_enableflags = -Yu$(1).hxx \
+										   -Fp$(call gb_NoexPrecompiledHeader_get_target,$(1)) \
+										   -Fd$(call gb_NoexPrecompiledHeader_get_target,$(1)).pdb
 
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_NoexPrecompiledHeader__command_deponcompile
@@ -353,7 +366,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
-		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj" && \
+		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fd$(1).pdb -Fo$(1).obj" && \
 	E=$$($$C) || (RC=$$? && echo "$$C" && echo "$$E" 1>&2 && $$(exit $$RC)))
 rm $(1).obj
 $(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
@@ -363,16 +376,9 @@ endef
 
 # LinkTarget class
 
-
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
 
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CXXFLAGS +=
-gb_LinkTarget_CFLAGS +=
-
-endif
-
 gb_LinkTarget_INCLUDE :=\
 	$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
 	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
commit 6e756c6904f89373c5a267f75eaab9d5bd2b564d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:48:32 2010 -0600

    using awk instead of echo for better portability

diff --git a/solenv/gbuild/Output.mk b/solenv/gbuild/Output.mk
index fbb0463..dad6bf7 100644
--- a/solenv/gbuild/Output.mk
+++ b/solenv/gbuild/Output.mk
@@ -53,8 +53,8 @@ define gb_Output_warn
 $(warning $(NEWLINE)[ WARN  $(2) ] !!!$(NEWLINE)[ WARN  $(2) ] !!! $(1)$(NEWLINE)[ WARN  $(2) ] !!!)
 endef
 
-gb_Output_ESCAPE := $(shell echo -e '\033')
-gb_Output_BELL := $(shell echo -e '\07')
+gb_Output_ESCAPE := $(shell awk 'BEGIN { printf "%c", 27 }')
+gb_Output_BELL := $(shell awk 'BEGIN { printf "%c", 7 }')
 
 # only enable colorized output if
 # - gb_COLOR is set
commit 4a528363fa39075fe36efde81aca0f864e7522e3
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:47:09 2010 -0600

    fixing gnucopy hack

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 6b3c79e..901acb3 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -43,16 +43,15 @@ gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODI
 
 endef
 
-ifeq($(strip $(gb_Deliver_GNUCOPY),)
+ifeq ($(strip $(gb_Deliver_GNUCOPY)),)
 define gb_Deliver_deliver
-mkdir -p $(dir $(2)) && $(if $(gb_Deliver_CLEARONDELIVER),rm -f $(1) &&) cp -f $(1) $(2) && touch -r $(1) $(2)
-
+mkdir -p $(dir $(2)) && $(if $(gb_Deliver_CLEARONDELIVER),rm -f $(2) &&) cp -f $(1) $(2) && touch -r $(1) $(2)
 endef
 else
 define gb_Deliver_deliver
 mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) -pf $(1) $(2)
-
 endef
+endif
 
 
 # We are currently only creating a deliver.log, if only one module gets build.
commit 4cd49789eb50d7af633261ec21dadd082556b4bc
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:46:03 2010 -0600

    use gnu cp when available, fallback to posix tools outherwise

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 65d1a64..6b3c79e 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -25,19 +25,13 @@
 #
 #*************************************************************************
 
-# gb_Deliver_GNUCOPY is set by the platform
+gb_Deliver_GNUCOPY := $(GNUCOPY)
 
 # if ($true) then old files will get removed from the target location before
 # they are copied there. In multi-user environments, this is needed you need to
 # be the owner of the target file to be able to modify timestamps
 gb_Deliver_CLEARONDELIVER := $(true)
 
-gb_Deliver__deliverprefix = mkdir -p $(dir $(1)) &&
-
-ifeq ($(gb_Deliver_CLEARONDELIVER),$(true))
-gb_Deliver__deliverprefix += rm -rf $(1) &&
-endif
-
 define gb_Deliver_init
 gb_Deliver_DELIVERABLES :=
 
@@ -49,9 +43,17 @@ gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODI
 
 endef
 
+ifeq($(strip $(gb_Deliver_GNUCOPY),)
 define gb_Deliver_deliver
-$(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2) && touch -r $(1) $(2)
+mkdir -p $(dir $(2)) && $(if $(gb_Deliver_CLEARONDELIVER),rm -f $(1) &&) cp -f $(1) $(2) && touch -r $(1) $(2)
+
 endef
+else
+define gb_Deliver_deliver
+mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) -pf $(1) $(2)
+
+endef
+
 
 # We are currently only creating a deliver.log, if only one module gets build.
 # As it is possible to add gbuild modules into other (which is done for example for
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index b8a6e78..f089a29 100755
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -136,11 +136,6 @@ endif
 
 gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
 
-# Deliver class
-
-gb_Deliver_GNUCOPY := cp
-
-
 # CObject class
 
 define gb_CObject__command
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 28e31f1..51731d0 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -133,7 +133,6 @@ endif
 # Helper class
 
 gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-gb_Deliver_GNUCOPY := cp
 
 
 # CObject class
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 3cd793a..68a7543 100755
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -116,8 +116,6 @@ endif
 # Helper class
 
 gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-gb_Deliver_GNUCOPY := $(or $(GNUCOPY),gnucp)
-
 
 # CObject class
 
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 9fe3569..bf3a681 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -180,7 +180,6 @@ endif
 
 # Helper class
 
-gb_Deliver_GNUCOPY := cp
 gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR))
 gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR))
 gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR))
commit fc227dc4444db3e58437dd47294a5a8fbd5ea1e8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:45:19 2010 -0600

    low resolution time for deliver files

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index f8e21fa..65d1a64 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -43,15 +43,14 @@ gb_Deliver_DELIVERABLES :=
 
 endef
 
-# FIXME: this does not really work for real multi repository builds, but the
-# deliver.log format is broken in that case anyway
 define gb_Deliver_add_deliverable
 gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODIR)/%,%,$(1))
+.LOW_RESOLUTION_TIME : $(1)
 
 endef
 
 define gb_Deliver_deliver
-$(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2)
+$(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2) && touch -r $(1) $(2)
 endef
 
 # We are currently only creating a deliver.log, if only one module gets build.
@@ -70,6 +69,8 @@ deliverlog : COMMAND := true
 endif
 endef
 
+# FIXME: this does not really work for real multi repository builds, but the
+# deliver.log format is broken in that case anyway
 .PHONY : deliverlog
 deliverlog:
 	$(eval $(call gb_Deliver_setdeliverlogcommand))
commit 593bd9cee59ceb5c46f9f6e4acd0f8447ab12770
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:43:36 2010 -0600

    fix windows link switches

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 5ca4325..9fe3569 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -162,6 +162,7 @@ gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
 gb_LinkTarget_LDFLAGS := \
 	-MACHINE:IX86 \
 	-NODEFAULTLIB \
+	-OPT:NOREF \
 	-SUBSYSTEM:CONSOLE \
 	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(ILIB)))) \
 
commit b73c95df794cf5d1de3197b7dde1f2075e8a9da4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:39:32 2010 -0600

    fixing auxtargets for windows without crashdumper

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index bf80ca3..5ca4325 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -479,10 +479,16 @@ $(call gb_LinkTarget_set_auxtargets,$(2),\
 )
 
 $(call gb_Library_get_target,$(1)) \
-$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) \
+$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
+
+ifneq ($(ENABLE_CRASHDUMP),)
+$(call gb_Library_get_target,$(1)) \
+$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS +=  \
 		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
 		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
 
+endif
+
 $(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
 
 endef
commit 2f908d1cca675063764a2af1b24740189a736f5d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:35:39 2010 -0600

    fixed pch for full builds without an explicit setting of defs with _set_defs

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index a00c712..1704b09 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -300,6 +300,7 @@ $(call gb_LinkTarget_get_target,$(1)) : CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
 $(call gb_LinkTarget_get_target,$(1)) : OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
+$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
@@ -341,10 +342,7 @@ $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $(2)
 
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_target,$(1)) \
 $(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $(2)
-$(call gb_LinkTarget_get_target,$(1)) \
-$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $(2)
 endif
 
commit 135501a65ef067f5b95e11480a005e555ef8087b
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:34:59 2010 -0600

    deal with .pdb files

diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 0acd0a6..bf80ca3 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -165,6 +165,9 @@ gb_LinkTarget_LDFLAGS := \
 	-SUBSYSTEM:CONSOLE \
 	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(ILIB)))) \
 
+ifneq ($(ENABLE_CRASHDUMP),)
+gb_LinkTarget_LDFLAGS += -DEBUG
+endif
 
 ifeq ($(gb_DEBUGLEVEL),2)
 gb_COMPILEROPTFLAGS :=
@@ -471,10 +474,15 @@ $(call gb_LinkTarget_set_dlltarget,$(2),$(3))
 $(call gb_LinkTarget_set_auxtargets,$(2),\
 	$(patsubst %.lib,%.exp,$(call gb_LinkTarget_get_target,$(2))) \
 	$(3).manifest \
+	$(patsubst %.dll,%.pdb,$(3)) \
+	$(patsubst %.dll,%.ilk,$(3)) \
 )
 
 $(call gb_Library_get_target,$(1)) \
-$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
+$(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3)) \
+		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.pdb,$(3))) \
+		$(OUTDIR)/bin/$(notdir $(patsubst %.dll,%.ilk,$(3))) \
+
 $(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
 
 endef
commit 4924d9bf0796ce201c749c43fdf82e1475c296d8
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:33:22 2010 -0600

    using wildcard instead of shell call in global makefile

diff --git a/GNUmakefile.mk b/GNUmakefile.mk
index 95fe9e5..ccf548b 100644
--- a/GNUmakefile.mk
+++ b/GNUmakefile.mk
@@ -32,6 +32,6 @@ endif
 GBUILDDIR := $(SOLARENV)/gbuild
 include $(GBUILDDIR)/gbuild.mk
 
-$(foreach repo,$(gb_REPOS),$(eval $(call gb_Module_make_global_targets,$(shell ls $(repo)/Module_*.mk))))
+$(foreach repo,$(gb_REPOS),$(eval $(call gb_Module_make_global_targets,$(wildcard $(repo)/Module_*.mk))))
 
 # vim: set noet sw=4 ts=4:
commit d4091bdc1bc993c632035ebcce8d4a95b6718c41
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:31:06 2010 -0600

    removing hardcoded SRCDIR

diff --git a/solenv/gbuild/BuildDirs.mk b/solenv/gbuild/BuildDirs.mk
index 33a96a1..0579e58 100644
--- a/solenv/gbuild/BuildDirs.mk
+++ b/solenv/gbuild/BuildDirs.mk
@@ -14,12 +14,10 @@ endif
 ifeq ($(strip $(gb_REPOS)),)
 gb_REPOS := $(SOLARSRC)
 endif
-SRCDIR := $(firstword $(gb_REPOS))
 
 # HACK
 # unixify windoze paths
 ifeq ($(OS),WNT)
-override SRCDIR := $(shell cygpath -u $(SRCDIR))
 override WORKDIR := $(shell cygpath -u $(WORKDIR))
 override OUTDIR := $(shell cygpath -u $(OUTDIR))
 override gb_REPOS := $(shell cygpath -u $(gb_REPOS))
commit bfb5ed658e26b3032e80d67da20510657e22d5fb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:30:15 2010 -0600

    removed milestone from packed module

diff --git a/solenv/bin/packmodule b/solenv/bin/packmodule
index 7dfcc32..8ae2c52 100755
--- a/solenv/bin/packmodule
+++ b/solenv/bin/packmodule
@@ -36,13 +36,13 @@ def stripped_paths_to_pack(loglines):
     return (path.partition('/')[2] for path in paths_to_pack(loglines))
 
 def main(args):
-    """creates/overwrites a file at OUTDIR/zip/MILESTONE/MODULE.zip containing the contents of the gb_deliver.log."""
-    if len(args) != 4:
-        print('usage: packmodule OUTDIR MODULE MILESTONE')
+    """creates/overwrites a file at OUTDIR/zip/MODULE.zip containing the contents of the gb_deliver.log."""
+    if len(args) != 3:
+        print('usage: packmodule OUTDIR MODULE')
         sys.exit(2)
-    (executable, outdir, module, milestone) = args
+    (executable, outdir, module) = args
     os.chdir(outdir)
-    zipdir = 'zip.'+milestone
+    zipdir = 'zip'
     try:
         os.makedirs(zipdir)
     except OSError:
commit c17243a65b096b29017940ed7ac4883c7201657e
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:27:58 2010 -0600

    better use REPODIR

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index acacd18..f8e21fa 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -46,7 +46,7 @@ endef
 # FIXME: this does not really work for real multi repository builds, but the
 # deliver.log format is broken in that case anyway
 define gb_Deliver_add_deliverable
-gb_Deliver_DELIVERABLES += $$(patsubst $(REPO_DIR)/%,%,$(2)):$$(patsubst $(REPO_DIR)/%,%,$(1))
+gb_Deliver_DELIVERABLES += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODIR)/%,%,$(1))
 
 endef
 
commit dc92b8b91013b1f56a576bdadfed2b665f437182
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:26:43 2010 -0600

    rename deliver.log to gb_deliver.log to save it from being killed by deliver

diff --git a/solenv/bin/packmodule b/solenv/bin/packmodule
index 0a5769f..7dfcc32 100755
--- a/solenv/bin/packmodule
+++ b/solenv/bin/packmodule
@@ -28,26 +28,26 @@
 import os, os.path, sys, zipfile
 
 def paths_to_pack(loglines):
-    """Returns a generator iterating the outdir fields (with platform) of deliver.log lines."""
+    """Returns a generator iterating the outdir fields (with platform) of gb_deliver.log lines."""
     return (line.split()[2] for line in loglines)
 
 def stripped_paths_to_pack(loglines):
-    """returns a generator iterating the outdir fields (stripped of the platform) of deliver.log lines."""
+    """returns a generator iterating the outdir fields (stripped of the platform) of gb_deliver.log lines."""
     return (path.partition('/')[2] for path in paths_to_pack(loglines))
 
 def main(args):
-    """creates/overwrites a file at OUTDIR/zip/MILESTONE/MODULE.zip containing the contents of the deliver.log."""
+    """creates/overwrites a file at OUTDIR/zip/MILESTONE/MODULE.zip containing the contents of the gb_deliver.log."""
     if len(args) != 4:
         print('usage: packmodule OUTDIR MODULE MILESTONE')
         sys.exit(2)
     (executable, outdir, module, milestone) = args
     os.chdir(outdir)
-    zipdir = os.path.join('zip', milestone)
+    zipdir = 'zip.'+milestone
     try:
         os.makedirs(zipdir)
     except OSError:
         pass
-    deliverlog = open(os.path.join('inc', module, 'deliver.log'))
+    deliverlog = open(os.path.join('inc', module, 'gb_deliver.log'))
     packedmodule = zipfile.ZipFile(os.path.join(zipdir,module+'.zip'), 'w')
     [packedmodule.write(path) for path in stripped_paths_to_pack(deliverlog)]
     packedmodule.close()
diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 5fb000f..acacd18 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -46,7 +46,7 @@ endef
 # FIXME: this does not really work for real multi repository builds, but the
 # deliver.log format is broken in that case anyway
 define gb_Deliver_add_deliverable
-gb_Deliver_DELIVERABLES += $$(patsubst $(SOURCE_ROOT_DIR)/%,%,$(2)):$$(patsubst $(SOURCE_ROOT_DIR)/%,%,$(1))
+gb_Deliver_DELIVERABLES += $$(patsubst $(REPO_DIR)/%,%,$(2)):$$(patsubst $(REPO_DIR)/%,%,$(1))
 
 endef
 
@@ -63,7 +63,7 @@ define gb_Deliver_setdeliverlogcommand
 ifeq ($$(words $(gb_Module_ALLMODULES)),1)
 $$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),LOG,1))
 deliverlog : COMMAND := mkdir -p $$(OUTDIR)/inc/$$(strip $$(gb_Module_ALLMODULES)) &&
-deliverlog : COMMAND += echo "$$(sort $$(gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
+deliverlog : COMMAND += echo "$$(sort $$(gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/gb_deliver.log
 else
 $$(eval $$(call gb_Output_announce,more than one module - creating no deliver.log,$$(true),LOG,1))
 deliverlog : COMMAND := true
commit eaa2afc8d32d41c09e10f8447d5e91702166717c
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:23:18 2010 -0600

    getting rid of obsolete install and uninstall targets

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index bc9b69b..286d860 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -90,8 +90,8 @@ else
 gb_ENABLE_PCH := $(false)
 endif
 
-# for clean, uninstall and setuplocal goals we switch off dependencies
-ifneq ($(filter clean uninstall setuplocal removelocal,$(MAKECMDGOALS)),)
+# for clean, setuplocal and removelocal goals we switch off dependencies
+ifneq ($(filter clean setuplocal removelocal,$(MAKECMDGOALS)),)
 gb_FULLDEPS := $(false)
 else
 gb_FULLDEPS := $(true)
commit f8e1fe591582c05f676f840c779377d1440825ed
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:11:45 2010 -0600

    add dll file to deliver.log

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index b746228..5fb000f 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -63,7 +63,7 @@ define gb_Deliver_setdeliverlogcommand
 ifeq ($$(words $(gb_Module_ALLMODULES)),1)
 $$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),LOG,1))
 deliverlog : COMMAND := mkdir -p $$(OUTDIR)/inc/$$(strip $$(gb_Module_ALLMODULES)) &&
-deliverlog : COMMAND += echo "$$(strip $$(call gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
+deliverlog : COMMAND += echo "$$(sort $$(gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
 else
 $$(eval $$(call gb_Output_announce,more than one module - creating no deliver.log,$$(true),LOG,1))
 deliverlog : COMMAND := true
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 387daf2..0acd0a6 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -475,6 +475,7 @@ $(call gb_LinkTarget_set_auxtargets,$(2),\
 
 $(call gb_Library_get_target,$(1)) \
 $(call gb_Library_get_clean_target,$(1)) : AUXTARGETS := $(OUTDIR)/bin/$(notdir $(3))
+$(call gb_Deliver_add_deliverable,$(OUTDIR)/bin/$(notdir $(3)),$(3))
 
 endef
 
commit e7709fb3f6b57845932a6ec536fcb094bd763d83
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:11:09 2010 -0600

    fixed package for naming convention

diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index c58ed67..25c1dea 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -50,7 +50,7 @@ $(call gb_Package_get_target,%) :
 	mkdir -p $(dir $@) && touch $@
 
 define gb_Package_Package
-gb_TARGET_PACKAGE_$(1)_SOURCEDIR := $(2)
+gb_Package_SOURCEDIR_$(1) := $(2)
 $(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1))
 $$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
 
@@ -59,8 +59,8 @@ endef
 define gb_Package_add_file
 $(call gb_Package_get_target,$(1)) : $(OUTDIR)/$(2)
 $(call gb_Package_get_clean_target,$(1)) : FILES += $(OUTDIR)/$(2)
-$(call gb_PackagePart_PackagePart,$(2),$$(gb_TARGET_PACKAGE_$(1)_SOURCEDIR)/$(3))
-$(OUTDIR)/$(2) : $$(gb_TARGET_PACKAGE_$(1)_SOURCEDIR)/$(3)
+$(call gb_PackagePart_PackagePart,$(2),$$(gb_Package_SOURCEDIR_$(1))/$(3))
+$(OUTDIR)/$(2) : $$(gb_Package_SOURCEDIR_$(1))/$(3)
 endef
 
 # vim: set noet sw=4 ts=4:
commit c96978a9d2893ca82275fa40c2758ff746fd59fb
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:10:17 2010 -0600

    cleaned up module registration

diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
index 2864479..135cf5f 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -296,7 +296,7 @@ $(call gb_AllLangResTarget_get_target,%) :
 define gb_AllLangResTarget_AllLangResTarget
 $(foreach lang,$(gb_AllLangResTarget_LANGS),\
 	$(call gb_ResTarget_ResTarget,$(1)$(lang),$(1),$(lang)))
-$(call gb_Module_register_target,$(call gb_AllLangResTarget_get_target,$(1)),$(call gb_AllLangResTarget_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_AllLangResTarget_get_target,$(1)),$(call gb_AllLangResTarget_get_clean_target,$(1))))
 
 endef
 
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 4cf2d4e..594227c 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -54,7 +54,7 @@ $(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS)
 $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Executable_Executable_platform,$(1),$(2))
-$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)))
 
 endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 7668801..a592776 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -70,7 +70,7 @@ $(call gb_LinkTarget_set_defs,$(2),\
 )
 $(call gb_Library_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_Library_Library_platform,$(1),$(2),$(gb_Library_DLLDIR)/$(call gb_Library_get_dllname,$(1)))
-$(call gb_Module_register_target,$(call gb_Library_get_target,$(1)),$(call gb_Library_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Library_get_target,$(1)),$(call gb_Library_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_Library_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)))
 
 endef
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index e89de5e..376df0a 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -65,11 +65,22 @@ clean :
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
 gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
-$(call gb_Module_register_target,$(call gb_Module_get_target,$(1)),$(call gb_Module_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Module_get_target,$(1)),$(call gb_Module_get_clean_target,$(1))))
 
 endef
 
-# include the file and pop one target from each stack
+# This is called inside the included file and pushes one target on each stack.
+# This has to be called with full late evaluation ($$(eval $$(call ))) and
+# should never be inlined ($(call )) as the calls defining it might be sourced
+# before gb_Module.
+define gb_Module_register_target
+gb_Module_TARGETSTACK := $(1) $(gb_Module_TARGETSTACK)
+gb_Module_CLEANTARGETSTACK := $(2) $(gb_Module_CLEANTARGETSTACK)
+
+endef
+
+# Here we include the file (in it there will be a call to
+# gb_Module_register_target) and pop one target from each stack afterwards.
 define gb_Module_add_target
 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2).mk
 $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 5ff24e2..c58ed67 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -52,7 +52,7 @@ $(call gb_Package_get_target,%) :
 define gb_Package_Package
 gb_TARGET_PACKAGE_$(1)_SOURCEDIR := $(2)
 $(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1))
-$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
 
 endef
 
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index 285fe28..d680ed5 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -69,7 +69,7 @@ $(call gb_LinkTarget_set_defs,$(2)),\
 )
 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_StaticLibrary_get_target,$(2))
 $(call gb_StaticLibrary_StaticLibrary_platform,$(1),$(2))
-$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1)))
+$$(eval $$(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1))))
 $(call gb_Deliver_add_deliverable,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)))
 
 endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 25e8a12..9b1d5a2 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -25,7 +25,6 @@
 #
 #*************************************************************************
 
-
 # outdir target pattern
 
 gb_ComponentTarget_get_outdir_target = $(OUTDIR)/xml/component/$(1).component
@@ -137,14 +136,6 @@ $(patsubst $(1):%,%,$(filter $(1):%,$(gb_StaticLibrary_FILENAMES)))
 endef
 
 
-# defined here so it is available early
-
-define gb_Module_register_target
-gb_Module_TARGETSTACK := $(1) $(gb_Module_TARGETSTACK)
-gb_Module_CLEANTARGETSTACK := $(2) $(gb_Module_CLEANTARGETSTACK)
-
-endef
-
 # static members declared here because they are used globally
 
 gb_Library_OUTDIRLOCATION = $(OUTDIR)/lib
commit 9b7bdb58a056efb38be9060eb57bb0fc0feeefb9
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:08:37 2010 -0600

    comments in Output.mk

diff --git a/solenv/gbuild/Output.mk b/solenv/gbuild/Output.mk
index 8a77ee9..fbb0463 100644
--- a/solenv/gbuild/Output.mk
+++ b/solenv/gbuild/Output.mk
@@ -25,6 +25,7 @@
 #
 #*************************************************************************
 
+# user notifications and formatting
 
 define gb_Output__format_type
 [ $(word 2,$(1) build clean) $(2) ]
commit 7809c410085ded2029cf48a8eab128548099f0c6
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:08:00 2010 -0600

    comments in LinkTarget.mk

diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 5262fc4..ec399cb 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -25,6 +25,9 @@
 #
 #*************************************************************************
 
+# SdiTarget is evil, in that it does not support multiple repositories for now (hardcoded to SRCDIR)
+# Also there is no way to cleanly deliver the generated header to OUTDIR.
+# (This can be workarounded by using gb_Package, but really should not.)
 
 # SdiTarget class
 
commit ed15b7527e7473498132cef60a498b0832b7e423
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:07:31 2010 -0600

    comments in LinkTarget.mk

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 383f579..a00c712 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -34,6 +34,8 @@ gb_CObject_get_source = $(1)/$(2).c
 # defined by platform
 #  gb_CObject__command
 
+# this rule generates an "always rebuild" dep file, to have something to include.
+# the dep file will be overridden on the fly, when the object is compiled
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_CObject__command_dep
 mkdir -p $(dir $(1)) && \
@@ -71,6 +73,9 @@ gb_CxxObject_get_source = $(1)/$(2).cxx
 # defined by platform
 #  gb_CxxObject__command
 
+# This rule generates an "always rebuild" dep file, to have something to
+# include. The dep file will be overridden on the fly, when the object is
+# compiled.
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_CxxObject__command_dep
 mkdir -p $(dir $(1)) && \
@@ -81,6 +86,12 @@ else
 gb_CxxObject__command_dep =
 endif
 
+# CXXFLAGS and DEFS we want to use for this object. This should usually be the case.
+# Only enable PCH if the PCH_CXXFLAGS and the PCH_DEFS (from the linktarget) are the same as the
+# PCH_CXXFLAGS/PCH_DEFS should never be overridden on an object -- they should be the same as for the whole
+# The DEFS/CXXFLAGS would have too be manually overridden for one object file for them to differ.
+# linktarget. In general it should be cleaner to use a static library compiled with different flags and link
+# that in rather than mixing different flags in one linktarget.
 define gb_CxxObject__set_pchflags
 ifeq ($(gb_ENABLE_PCH),$(true))
 ifneq ($(strip $$(PCH_NAME)),)
@@ -133,6 +144,8 @@ gb_ObjCxxObject_get_source = $(1)/$(2).mm
 # defined by platform
 #  gb_ObjCxxObject__command
 
+# this rule generates an "always rebuild" dep file, to have something to include.
+# the dep file will be overridden on the fly, when the object is compiled
 ifeq ($(gb_FULLDEPS),$(true))
 define gb_ObjCxxObject__command_dep
 mkdir -p $(dir $(1)) && \
@@ -192,6 +205,7 @@ $(call gb_LinkTarget_get_clean_target,%) :
 			$(DLLTARGET) \
 			$(AUXTARGETS))
 
+# cat the deps of all objects in one file, then we need only open that one file
 define gb_LinkTarget__command_dep
 $(call gb_Output_announce,LNK:$(2),$(true),DEP,1)
 $(call gb_Helper_abbreviate_dirs,\
@@ -211,6 +225,16 @@ $(call gb_LinkTarget_get_dep_target,%) : | $(call gb_LinkTarget_get_headers_targ
 	$(call gb_LinkTarget__command_dep,$@,$*,$(COBJECTS),$(CXXOBJECTS),$(OBJCXXOBJECTS))
 endif
 
+# Ok, this is some dark voodoo: When declaring a linktarget with
+# gb_LinkTarget_LinkTarget we set SELF in the headertarget to name of the
+# target. When the rule for the headertarget is executed and SELF does not
+# match the target name, we are depending on a linktarget that was never
+# declared. In a full build exclusively in gbuild that should never happen.
+# However, partial gbuild build will not know about how to build lower level
+# linktargets, just as gbuild can not know about linktargets generated in the
+# old build.pl/dmake system. Once all is migrated, gbuild should error out
+# when is is told to depend on a linktarget it does not know about and not
+# only warn.
 define gb_LinkTarget__get_external_headers_check
 ifneq ($$(SELF),$$*)
 $$(eval $$(call gb_Output_info,LinkTarget $$* not defined: Assuming headers to be there!,ALL))
@@ -227,6 +251,38 @@ $(call gb_LinkTarget_get_headers_target,%) : $(call gb_LinkTarget_get_external_h
 	$(call gb_Helper_abbreviate_dirs,\
 		mkdir -p $(dir $@) && touch $@)
 
+# Explanation of some of the targets:
+# - gb_LinkTarget_get_external_headers_target is the targets that guarantees all
+#   headers from linked against libraries are in OUTDIR.
+# - gb_LinkTarget_get_headers_target is the target that guarantees all headers
+#   from the linked against the libraries and the linktargets own headers
+#   (including generated headers) are in the OUTDIR.
+# - gb_LinkTarget_get_target links the objects into a file in WORKDIR.
+# gb_LinkTarget_get_target depends on gb_LinkTarget_get_headers_target which in
+# turn depends gb_LinkTarget_get_external_headers_target.
+# gb_LinkTarget_get_target depends additionally on the objects, which in turn
+# depend build-order only on the gb_LinkTarget_get_headers_target. The build
+# order-only dependency ensures all headers to be there for compiling and
+# dependency generation without causing all objects to be rebuild when one
+# header changes. Only the ones with an explicit dependency in their generated
+# dependency file will be rebuild.
+#
+# gb_LinkTarget_get_target is the target that links the objects into a file in
+# WORKDIR
+# Explanation of some of the variables:
+# - AUXTARGETS are the additionally generated files that need to be cleaned out
+#   on clean.
+# - PCH_CXXFLAGS and PCH_DEFS are the flags that the precompiled headers will
+#   be compiled with.  They should never be overridden in a single object
+#   files.
+# - TARGETTYPEFLAGS are the flags that are needed for a specific kind of target
+#   (shl,exe...) They are mostly used by the platforms.
+#
+# Since most variables are set on the linktarget and not on the object, the
+# object learns about these setting via GNU makes scoping of target variables.
+# Therefore it is important that objects are only directly depended on by the
+# linktarget. This for example means that you cannot build a single object
+# alone, because then you would directly depend on the object.
 define gb_LinkTarget_LinkTarget
 $(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
 $(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
commit f64ff0d9e0578782cb3dc0dce7083993b17b2d71
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:06:49 2010 -0600

    gbuild file permissions

diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
old mode 100755
new mode 100644
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
old mode 100755
new mode 100644
commit b8763b42988259e5cc57dbd63ae2044e4b938bf6
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:04:27 2010 -0600

    made setuplocal an extension

diff --git a/solenv/gbuild/BuildDirs.mk b/solenv/gbuild/BuildDirs.mk
index 832c469..33a96a1 100644
--- a/solenv/gbuild/BuildDirs.mk
+++ b/solenv/gbuild/BuildDirs.mk
@@ -6,45 +6,11 @@ SOLARINC += $(JDKINCS)
 OUTDIR := $(SOLARVERSION)/$(INPATH)
 WORKDIR := $(SOLARVERSION)/$(INPATH)/workdir
 
-.PHONY : setuplocal removelocal
-ifneq ($(gb_LOCALBUILDDIR),)
-ifneq ($(wildcard $(gb_LOCALBUILDDIR)/SetupLocal.mk),)
+# Override for SetupLocal
+ifneq ($(and $(gb_LOCALBUILDDIR),$(wildcard $(gb_LOCALBUILDDIR)/SetupLocal.mk)),)
 include $(gb_LOCALBUILDDIR)/SetupLocal.mk
-$(eval $(call gb_Output_info,Using local setup at $(gb_LOCALBUILDDIR).,ALL))
-$(eval $(call gb_Output_info,gb_REPOS:=$(gb_REPOS),ALL))
-$(eval $(call gb_Output_info,WORKDIR:=$(WORKDIR),ALL))
-$(eval $(call gb_Output_info,OUTDIR:=$(OUTDIR),ALL))
-
-setuplocal :
-	$(eval, $(call gb_Output_error,$(gb_LOCALBUILDDIR) exists already.))
-
-else
-
-setuplocal :
-	$(eval MODULE := $(firstword $(MODULE) $(lastword $(subst /, ,$(dir $(realpath $(firstword $(MAKEFILE_LIST))))))))
-	$(eval modulerepo := $(patsubst %/$(MODULE),%,$(foreach repo,$(gb_REPOS),$(wildcard $(repo)/$(MODULE)))))
-	$(eval $(call gb_Output_announce,setting up local build directory (module: $(MODULE)).,$(true),SYC,5))
-	mkdir -p $(gb_LOCALBUILDDIR)/srcdir $(gb_LOCALBUILDDIR)/workdir $(gb_LOCALBUILDDIR)/outdir
-	rsync --archive --exclude 'workdir/**' $(SOLARVERSION)/$(INPATH)/ $(gb_LOCALBUILDDIR)/outdir
-	cp $(modulerepo)/Repository.mk $(gb_LOCALBUILDDIR)/srcdir/Repository.mk
-	cp $(modulerepo)/RepositoryFixes.mk $(gb_LOCALBUILDDIR)/srcdir/RepositoryFixes.mk 
-	rsync --archive $(modulerepo)/$(MODULE)/ $(gb_LOCALBUILDDIR)/srcdir/$(MODULE)
-	echo "gb_REPOS := $(gb_LOCALBUILDDIR)/srcdir $(filter-out $(patsubst %/$(MODULE),%,$(foreach repo,$(gb_REPOS),$(wildcard $(repo)/$(MODULE)))),$(gb_REPOS))" > $(gb_LOCALBUILDDIR)/SetupLocal.mk
-	echo "#original gb_REPOS was $(gb_REPOS)" >> $(gb_LOCALBUILDDIR)/SetupLocal.mk
-	echo "OUTDIR := $(gb_LOCALBUILDDIR)/outdir" >> $(gb_LOCALBUILDDIR)/SetupLocal.mk
-	echo "#original OUTDIR was $(OUTDIR)" >> $(gb_LOCALBUILDDIR)/SetupLocal.mk
-	echo "WORKDIR := $(gb_LOCALBUILDDIR)/workdir" >> $(gb_LOCALBUILDDIR)/SetupLocal.mk
-	echo "#original WORKDIR was $(WORKDIR)" >> $(gb_LOCALBUILDDIR)/SetupLocal.mk
-
 endif
 
-endif
-
-removelocal :
-	$(eval $(call gb_Output_warn,removing directory $(gb_LOCALBUILDDIR).,SYC))
-	sleep 10
-	rm -rf $(gb_LOCALBUILDDIR)
-
 ifeq ($(strip $(gb_REPOS)),)
 gb_REPOS := $(SOLARSRC)
 endif
@@ -53,18 +19,17 @@ SRCDIR := $(firstword $(gb_REPOS))
 # HACK
 # unixify windoze paths
 ifeq ($(OS),WNT)
-SRCDIR := $(shell cygpath -u $(SRCDIR))
-WORKDIR := $(shell cygpath -u $(WORKDIR))
-OUTDIR := $(shell cygpath -u $(OUTDIR))
-gb_REPOS := $(shell cygpath -u $(gb_REPOS))
+override SRCDIR := $(shell cygpath -u $(SRCDIR))
+override WORKDIR := $(shell cygpath -u $(WORKDIR))
+override OUTDIR := $(shell cygpath -u $(OUTDIR))
+override gb_REPOS := $(shell cygpath -u $(gb_REPOS))
 endif
 
 REPODIR := $(patsubst %/,%,$(dir $(firstword $(gb_REPOS))))
 
-ifneq ($(MAKECMDGOALS),setuplocal)
+ifeq ($(filter setuplocal removelocal,$(MAKECMDGOALS)),)
 ifneq ($(filter-out $(foreach repo,$(gb_REPOS),$(realpath $(repo))/%),$(realpath $(firstword $(MAKEFILE_LIST)))),)
-$(eval $(call gb_Output_warn,The initial makefile $(realpath $(firstword $(MAKEFILE_LIST))) is not in the repositories $(foreach repo,$(gb_REPOS),$(realpath $(repo))).,ALL))
-$(shell sleep 10)
+$(eval $(call gb_Output_error,The initial makefile $(realpath $(firstword $(MAKEFILE_LIST))) is not in the repositories $(foreach repo,$(gb_REPOS),$(realpath $(repo))).,ALL))
 endif
 endif
 
commit 4da3ea64936a0a3fad1350fc6dc298d7b10f6328
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:03:27 2010 -0600

    some more comments on deliver

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 8f06c5f..b746228 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -50,15 +50,15 @@ gb_Deliver_DELIVERABLES += $$(patsubst $(SOURCE_ROOT_DIR)/%,%,$(2)):$$(patsubst
 
 endef
 
-define gb_Deliver_get_deliverlog
-$(foreach deliverable,$(gb_Deliver_DELIVERABLES),$(NEWLINE)COPY $(subst :, ,$(deliverable)))
-endef
-
 define gb_Deliver_deliver
 $(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2)
 endef
 
-# we need the trailing whitespace so that the newline of echo does not become part of the last record
+# We are currently only creating a deliver.log, if only one module gets build.
+# As it is possible to add gbuild modules into other (which is done for example for
+# the toplevel ooo module already) it does not make sense to create a deliver.log once
+# fully migrated. The whole process should be rethought then.
+# We need the trailing whitespace so that the newline of echo does not become part of the last record.
 define gb_Deliver_setdeliverlogcommand
 ifeq ($$(words $(gb_Module_ALLMODULES)),1)
 $$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),LOG,1))
@@ -73,7 +73,7 @@ endef
 .PHONY : deliverlog
 deliverlog:
 	$(eval $(call gb_Deliver_setdeliverlogcommand))
-	$(COMMAND)
+	$(call gb_Helper_abbreviate_dirs, $(COMMAND))
 
 all : deliverlog
 
commit 9b948b5b47a486da25952901c954ffd3f5ae3c47
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 09:00:22 2010 -0600

    packmodule extension

diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index a71497e..8f06c5f 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -58,11 +58,12 @@ define gb_Deliver_deliver
 $(call gb_Deliver__deliverprefix,$(2)) $(gb_Deliver_GNUCOPY) -f $(1) $(2)
 endef
 
+# we need the trailing whitespace so that the newline of echo does not become part of the last record
 define gb_Deliver_setdeliverlogcommand
 ifeq ($$(words $(gb_Module_ALLMODULES)),1)
 $$(eval $$(call gb_Output_announce,$$(strip $$(gb_Module_ALLMODULES)),$$(true),LOG,1))
 deliverlog : COMMAND := mkdir -p $$(OUTDIR)/inc/$$(strip $$(gb_Module_ALLMODULES)) &&
-deliverlog : COMMAND += echo "$$(strip $$(call gb_Deliver_DELIVERABLES))" | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
+deliverlog : COMMAND += echo "$$(strip $$(call gb_Deliver_DELIVERABLES)) " | awk -f $$(GBUILDDIR)/processdelivered.awk > $$(OUTDIR)/inc/$$(strip $(gb_Module_ALLMODULES))/deliver.log
 else
 $$(eval $$(call gb_Output_announce,more than one module - creating no deliver.log,$$(true),LOG,1))
 deliverlog : COMMAND := true
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 8442195..bc9b69b 100755
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -203,4 +203,9 @@ include $(foreach class, \
 	Module \
 ,$(GBUILDDIR)/$(class).mk)
 
+# optional extensions that should never be essential
+ifneq ($(wildcard $(GBUILDDIR)/extensions/*.mk),)
+include $(wildcard $(GBUILDDIR)/extensions/*.mk)
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/processdelivered.awk b/solenv/gbuild/processdelivered.awk
index fa37ed9..90e12bf 100644
--- a/solenv/gbuild/processdelivered.awk
+++ b/solenv/gbuild/processdelivered.awk
@@ -33,4 +33,3 @@ BEGIN {
 NF == 2 {
     print "COPY " $1 " " $2;
 }
-
commit 7b2617112bf0da03aa6889d23cf2efabfbe47c74
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:58:30 2010 -0600

    primitive implementation of module packer created

diff --git a/solenv/bin/packmodule b/solenv/bin/packmodule
new file mode 100755
index 0000000..0a5769f
--- /dev/null
+++ b/solenv/bin/packmodule
@@ -0,0 +1,58 @@
+#! /usr/bin/env python
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+import os, os.path, sys, zipfile
+
+def paths_to_pack(loglines):
+    """Returns a generator iterating the outdir fields (with platform) of deliver.log lines."""
+    return (line.split()[2] for line in loglines)
+
+def stripped_paths_to_pack(loglines):
+    """returns a generator iterating the outdir fields (stripped of the platform) of deliver.log lines."""
+    return (path.partition('/')[2] for path in paths_to_pack(loglines))
+
+def main(args):
+    """creates/overwrites a file at OUTDIR/zip/MILESTONE/MODULE.zip containing the contents of the deliver.log."""
+    if len(args) != 4:
+        print('usage: packmodule OUTDIR MODULE MILESTONE')
+        sys.exit(2)
+    (executable, outdir, module, milestone) = args
+    os.chdir(outdir)
+    zipdir = os.path.join('zip', milestone)
+    try:
+        os.makedirs(zipdir)
+    except OSError:
+        pass
+    deliverlog = open(os.path.join('inc', module, 'deliver.log'))
+    packedmodule = zipfile.ZipFile(os.path.join(zipdir,module+'.zip'), 'w')
+    [packedmodule.write(path) for path in stripped_paths_to_pack(deliverlog)]
+    packedmodule.close()
+
+if __name__ == "__main__": 
+    main(sys.argv)
+
+# vim:set et sw=4 ts=4 filetype=python:
commit 6325237e2bf838c30a950be1bbb1138ac32bbbe0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:58:17 2010 -0600

    fix merge errors

diff --git a/Repository.mk b/Repository.mk
index dba9655..2643471 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 	xo \
 	xof \
 	xcr \
+))
 
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
 	xml2 \
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 9d2e6e6..e89de5e 100755
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -47,6 +47,9 @@ $(call gb_Module_get_target,%) :
 		mkdir -p $(dir $@) && \
 		touch $@)
 
+.PHONY : all clean
+.DEFAULT_GOAL := all
+
 all :
 	$(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)
@@ -59,18 +62,6 @@ clean :
 	$(call gb_Output_announce_title,all cleared.)
 	$(call gb_Output_announce_bell)
 
-.PHONY : all clean install uninstall
-.DEFAULT_GOAL := all
-
-all :
-	$(call gb_Helper_announce,Build for modules $(foreach module,$^,$(notdir $(module))) finished (loaded modules: $(sort $(gb_Module_ALLMODULES))).)
-
-clean :
-	$(call gb_Helper_announce,Cleanup for modules $(foreach module,$^,$(notdir $(module))) finished (loaded modules: $(sort $(gb_Module_ALLMODULES))).)
-
-.PHONY : all clean install uninstall
-.DEFAULT_GOAL := all
-
 define gb_Module_Module
 gb_Module_ALLMODULES += $(1)
 gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
commit ca383786ed9e26d77c28222a00bc368a7f5d3c0d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:41:17 2010 -0600

    making macosx-create-bundle a good unix citizen and shut up on success

diff --git a/solenv/bin/macosx-create-bundle b/solenv/bin/macosx-create-bundle
index ba7d624..4b03e07 100755
--- a/solenv/bin/macosx-create-bundle
+++ b/solenv/bin/macosx-create-bundle
@@ -96,7 +96,7 @@ while [ $# != 0 ]; do
 			# Link jnilib
 			ln -sf "$inputfilename" "$outputdir/$inputjnilibname"
 
-			printf "macosx-create-bundle: $outputdir/$inputjnilibname successfully created\n"
+			#printf "macosx-create-bundle: $outputdir/$inputjnilibname successfully created\n"
 		fi
 	else
 		printf "macosx-create-bundle: error: file is not an executable or shared library.\n" >&2
commit 3f38ca3900157359a4bff843efa032b2c2714e24
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:40:22 2010 -0600

    fixes for linking on OSX

diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 2225c2e..3d061fe 100755
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -68,7 +68,7 @@ $(call gb_ComponentTarget_get_external_target,%) :
 	$(call gb_Deliver_deliver,$<,$@)
 
 define gb_ComponentTarget_ComponentTarget
-$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $(firstword $(3) $(2))
+$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $(or $(3),$(2))
 $(call gb_ComponentTarget_get_outdir_target,$(1)) : $(call gb_ComponentTarget_get_target,$(1))
 $(call gb_Deliver_add_deliverable,$(call gb_ComponentTarget_get_outdir_target,$(1)),$(call gb_ComponentTarget_get_target,$(1)))
 
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index d5d3f19..285fe28 100755
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -68,7 +68,7 @@ $(call gb_LinkTarget_set_defs,$(2)),\
 	$(gb_StaticLibrary_DEFS) \
 )
 $(call gb_StaticLibrary_get_target,$(1)) : $(call gb_StaticLibrary_get_target,$(2))
-
+$(call gb_StaticLibrary_StaticLibrary_platform,$(1),$(2))
 $(call gb_Module_register_target,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_StaticLibrary_get_clean_target,$(1)))
 $(call gb_Deliver_add_deliverable,$(call gb_StaticLibrary_get_target,$(1)),$(call gb_LinkTarget_get_target,$(2)))
 
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index a3f7999..b8a6e78 100755
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -291,6 +291,7 @@ gb_StaticLibrary_FILENAMES := \
 	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
 	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
 
+gb_StaticLibrary_StaticLibrary_platform =
 
 # Executable class
 
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 8d4082f..28e31f1 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -206,7 +206,7 @@ gb_LinkTarget_RPATHS := \
 	NONEBIN: \
 
 define gb_LinkTarget__get_installname
-$(if $(2),-install_name '$(2)$(notdir $(1))',)
+$(if $(2),-install_name '$(2)$(1)',)
 endef
 
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
@@ -241,6 +241,8 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(foreach lib,$(5),$(call gb_StaticLibrary_get_target,$(lib))) \
 		-o $(1) \
 		`cat $${DYLIB_FILE}` && \
+	$(if $(filter shl exe,$(TARGETTYPE)),$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl $(TARGETTYPE) $(LAYER) $(1) &&,) \
+	$(if $(filter shl,$(TARGETTYPE)),macosx-create-bundle $(1) &&,) \
 	rm -f $${DYLIB_FILE})
 endef
 
@@ -291,10 +293,16 @@ gb_Library_FILENAMES := \
 	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
 
 
-gb_Library_Library_platform =
+# HACK
+# SUBSTITING OOOLIB with OOO to make the perl script happy
+define gb_Library_Library_platform
+$(call gb_LinkTarget_get_target,$(2)) : TARGETTYPE := shl
+$(call gb_LinkTarget_get_target,$(2)) : LAYER :=$(subst OOOLIB,OOO,$(call gb_Library_get_layer,$(1)))
+
+endef
 
 define gb_Library_get_rpath
-$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))))
+$(call gb_LinkTarget__get_installname,$(call gb_Library_get_filename,$(1)),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))))
 endef
 
 gb_Library_LAYER := \
@@ -321,13 +329,24 @@ gb_StaticLibrary_FILENAMES := \
 	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
 	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
 
+define gb_StaticLibrary_StaticLibrary_platform
+$(call gb_LinkTarget_get_target,$(2)) : TARGETTYPE := staticlib
+$(call gb_LinkTarget_get_target,$(2)) : LAYER :=
+
+endef
 
 # Executable class
 
 gb_Executable_EXT :=
 gb_Executable_TARGETTYPEFLAGS := -bind_at_load
-gb_Executable_Executable_platform =
 
+# HACK
+# SUBSTITING OOOLIB with OOO to make the perl script happy
+define gb_Executable_Library_platform
+$(call gb_LinkTarget_get_target,$(2)) : TARGETTYPE := exe
+$(call gb_LinkTarget_get_target,$(2)) : LAYER :=$(subst OOOLIB,OOO,$(call gb_Executable_get_layer,$(1)))
+
+endef
 
 define gb_Executable_get_rpath
 $(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))))
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 27f86b3..3cd793a 100755
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -116,7 +116,7 @@ endif
 # Helper class
 
 gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
-gb_Deliver_GNUCOPY := $(firstword $(GNUCOPY) gnucp)
+gb_Deliver_GNUCOPY := $(or $(GNUCOPY),gnucp)
 
 
 # CObject class
@@ -269,6 +269,7 @@ gb_StaticLibrary_FILENAMES := \
 	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
 	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
 
+gb_StaticLibrary_StaticLibrary_platform =
 
 # Executable class
 
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 1f61e3a..387daf2 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -497,6 +497,7 @@ gb_StaticLibrary_FILENAMES := \
 
 gb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(gb_StaticLibrary_FILENAMES))
 
+gb_StaticLibrary_StaticLibrary_platform =
 
 # Executable class
 
commit 7c6817e223441a70d54f7938869a8675e60517f0
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:38:26 2010 -0600

    major refactoring of the layer logic
    
    separating it between linktarget, library and executable classes

diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index da8e210..4cf2d4e 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -50,7 +50,7 @@ endef
 
 define gb_Executable__Executable_impl
 $(call gb_LinkTarget_LinkTarget,$(2))
-$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS)  $(call gb_LinkTarget_get_rpath,$(2),$(1)))
+$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS) $(call gb_Executable_get_rpath,$(1)))
 $(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
 $(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
 $(call gb_Executable_Executable_platform,$(1),$(2))
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index f8f1532..7668801 100755
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -63,7 +63,7 @@ endef
 
 define gb_Library__Library_impl
 $(call gb_LinkTarget_LinkTarget,$(2))
-$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Library_TARGETTYPEFLAGS) $(call gb_LinkTarget_get_rpath,$(2),$(1)))
+$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Library_TARGETTYPEFLAGS) $(call gb_Library_get_rpath,$(1)))
 $(call gb_LinkTarget_set_defs,$(2),\
 	$$(DEFS) \
 	$(gb_Library_DEFS) \
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index a6fe42a..25e8a12 100755
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -120,8 +120,12 @@ $(eval $(call gb_Helper_make_dep_targets,\
 gb_Library_get_linktargetname = Library/$(1)
 gb_StaticLibrary_get_linktargetname = StaticLibrary/$(1)
 
-define gb_LinkTarget_get_layer
-$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget_LAYER)))
+define gb_Library_get_layer
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_LAYER)))
+endef
+
+define gb_Executable_get_layer
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_LAYER)))
 endef
 
 define gb_Library_get_filename
@@ -143,8 +147,8 @@ endef
 
 # static members declared here because they are used globally
 
-gb_Library_OUTDIRLOCATION := $(OUTDIR)/lib
-gb_Library_DLLDIR := $(WORKDIR)/LinkTarget/Library
-gb_StaticLibrary_OUTDIRLOCATION := $(OUTDIR)/lib
+gb_Library_OUTDIRLOCATION = $(OUTDIR)/lib
+gb_Library_DLLDIR = $(WORKDIR)/LinkTarget/Library
+gb_StaticLibrary_OUTDIRLOCATION = $(OUTDIR)/lib
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index c87a18b..8442195 100755
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -63,8 +63,11 @@ endef
 COMMA :=,
 
 include $(GBUILDDIR)/Output.mk
+
+# BuildDirs uses the Output functions already
 include $(GBUILDDIR)/BuildDirs.mk
 
+
 ifneq ($(strip $(PRODUCT)$(product)),)
 gb_PRODUCT := $(true)
 else
@@ -95,6 +98,7 @@ gb_FULLDEPS := $(true)
 endif
 
 include $(GBUILDDIR)/Helper.mk
+include $(GBUILDDIR)/TargetLocations.mk
 
 $(eval $(call gb_Helper_init_registries))
 $(eval $(call gb_Helper_add_repositories,$(gb_REPOS)))
@@ -165,7 +169,6 @@ endif
 
 gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS))
 
-include $(GBUILDDIR)/TargetLocations.mk
 include $(GBUILDDIR)/Deliver.mk
 
 $(eval $(call gb_Deliver_init))
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index cca317e..a3f7999 100755
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -182,10 +182,6 @@ endef
 define gb_LinkTarget__get_rpath_for_layer
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
 endef
-define gb_LinkTarget_get_rpath
--Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2))) \
--Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
-endef
 
 gb_LinkTarget__RPATHS := \
 	URELIB:'$$$$ORIGIN' \
@@ -195,22 +191,6 @@ gb_LinkTarget__RPATHS := \
 	SDKBIN:'$$$$ORIGIN/../../ure-link/lib' \
 	NONEBIN:'$$$$ORIGIN/../lib:$$$$ORIGIN' \
 
-gb_LinkTarget_LAYER := \
-	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
-	$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
-	$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
-	$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
-
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
 
@@ -282,6 +262,22 @@ gb_Library_FILENAMES := \
 
 gb_Library_Library_platform =
 
+define gb_Library_get_rpath
+-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))) \
+-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
+endef
+
+gb_Library_LAYER := \
+	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
+
 
 # StaticLibrary class
 
@@ -302,6 +298,18 @@ gb_Executable_EXT :=
 gb_Executable_TARGETTYPEFLAGS :=
 gb_Executable_Executable_platform =
 
+gb_Executable_LAYER := \
+	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
+	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
+	$(foreach exe,$(gb_Executable_OOO),$(exe):OOOLIB) \
+	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
+	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
+
+
+define gb_Executable_get_rpath
+-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))) \
+-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
+endef
 
 # SdiTarget class
 
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index f60a5cc..8d4082f 100755
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -196,12 +196,6 @@ endef
 define gb_LinkTarget__get_rpath_for_layer
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget_RPATHS)))
 endef
-define gb_LinkTarget__get_installname
-$(if $(2),-install_name '$(2)$(notdir $(1))',)
-endef
-define gb_LinkTarget_get_rpath
-$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2))))
-endef
 
 gb_LinkTarget_RPATHS := \
 	URELIB:@__________________________________________________URELIB/ \
@@ -211,21 +205,9 @@ gb_LinkTarget_RPATHS := \
 	SDKBIN: \
 	NONEBIN: \
 
-gb_LinkTarget_LAYER := \
-	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
-	$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
-	$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
-	$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
+define gb_LinkTarget__get_installname
+$(if $(2),-install_name '$(2)$(notdir $(1))',)
+endef
 
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
@@ -311,6 +293,21 @@ gb_Library_FILENAMES := \
 
 gb_Library_Library_platform =
 
+define gb_Library_get_rpath
+$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))))
+endef
+
+gb_Library_LAYER := \
+	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
+
 
 # StaticLibrary class
 
@@ -332,6 +329,18 @@ gb_Executable_TARGETTYPEFLAGS := -bind_at_load
 gb_Executable_Executable_platform =
 
 
+define gb_Executable_get_rpath
+$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))))
+endef
+
+gb_Executable_LAYER := \
+	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
+	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
+	$(foreach exe,$(gb_Executable_OOO),$(exe):OOOLIB) \
+	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
+	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
+
+
 # SdiTarget class
 
 gb_SdiTarget_SVIDLPRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index acf24f7..27f86b3 100755
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -159,9 +159,6 @@ endef
 define gb_LinkTarget__get_rpath_for_layer
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
 endef
-define gb_LinkTarget_get_rpath
-'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2)))'
-endef
 
 gb_LinkTarget__RPATHS := \
 	URELIB:$$$$ORIGIN \
@@ -171,22 +168,6 @@ gb_LinkTarget__RPATHS := \
 	SDKBIN:$$$$ORIGIN/../../ure-link/lib \
 	NONEBIN:$$$$ORIGIN/../lib:$$$$ORIGIN \
 
-gb_LinkTarget_LAYER := \
-	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
-	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
-	$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
-	$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
-	$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
-	$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
-	$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
-
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
 
@@ -257,6 +238,21 @@ gb_Library_FILENAMES := \
 
 gb_Library_Library_platform =
 
+define gb_Library_get_rpath
+'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))'
+endef
+
+gb_Library_LAYER := \
+	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
+	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
+	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
+
 
 # StaticLibrary class
 
@@ -280,6 +276,17 @@ gb_Executable_EXT :=
 gb_Executable_TARGETTYPEFLAGS :=
 gb_Executable_Executable_platform =
 
+define gb_Executable_get_rpath
+'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))'
+endef
+
+gb_Executable_LAYER := \
+	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
+	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
+	$(foreach exe,$(gb_Executable_OOO),$(exe):OOOLIB) \
+	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
+	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
+
 
 # SdiTarget class
 
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 2da223a..1f61e3a 100755
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -360,7 +360,6 @@ endef
 
 # LinkTarget class
 
-gb_LinkTarget_get_rpath :=
 
 gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
 gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
@@ -403,6 +402,7 @@ endef
 
 gb_Library_DEFS := -DSHAREDLIBS -D_DLL_ -D_DLL
 gb_Library_TARGETTYPEFLAGS := -DLL
+gb_Library_get_rpath :=
 
 gb_Library_SYSPRE := i
 gb_Library_PLAINEXT := .lib
@@ -502,6 +502,7 @@ gb_StaticLibrary_FILENAMES := $(patsubst salcpprt:salcpprt%,salcpprt:cpprtl%,$(g
 
 gb_Executable_EXT := .exe
 gb_Executable_TARGETTYPEFLAGS := -RELEASE -BASE:0x1b000000 -OPT:NOREF -INCREMENTAL:NO -DEBUG
+gb_Executable_get_rpath :=
 
 define gb_Executable_Executable_platform
 $(call gb_LinkTarget_set_auxtargets,$(2),\
commit 57bd4693c22ac512fd5eba5b23ddb3bf39c7fe5c
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:34:34 2010 -0600

    pch announcement

diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index 391c0c8..393bf43 100755
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -57,14 +57,14 @@ $(call gb_NoexPrecompiledHeader_get_target,%) :
 
 .PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_NoExPrecompiledHeader_get_clean_target,%)
 $(call gb_PrecompiledHeader_get_clean_target,%) :
-	$(call gb_Output_announce,$*,$(true),PCH,1)
+	$(call gb_Output_announce,$*,$(false),PCH,1)
 	-$(call gb_Helper_abbreviate_dirs,\
 		rm -f $(call gb_PrecompiledHeader_get_target,$*) \
 			$(call gb_PrecompiledHeader_get_dep_target,$*))
 
 
 $(call gb_NoexPrecompiledHeader_get_clean_target,%) :
-	$(call gb_Output_announce,$*,$(true),PCH,1)
+	$(call gb_Output_announce,$*,$(false),PCH,1)
 	-$(call gb_Helper_abbreviate_dirs,\
 		rm -f $(call gb_NoexPrecompiledHeader_get_target,$*) \
 			$(call gb_NoexPrecompiledHeader_get_dep_target,$*))
commit 61c86fcb83d04547edb96d2f34066be8afe6594a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Dec 20 08:21:12 2010 -0600

    fixing library names in components on windows

diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index e31e918..2225c2e 100755
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -68,7 +68,7 @@ $(call gb_ComponentTarget_get_external_target,%) :
 	$(call gb_Deliver_deliver,$<,$@)
 
 define gb_ComponentTarget_ComponentTarget
-$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $(2)
+$(call gb_ComponentTarget_get_target,$(1)) : LIBFILENAME := $(firstword $(3) $(2))
 $(call gb_ComponentTarget_get_outdir_target,$(1)) : $(call gb_ComponentTarget_get_target,$(1))
 $(call gb_Deliver_add_deliverable,$(call gb_ComponentTarget_get_outdir_target,$(1)),$(call gb_ComponentTarget_get_target,$(1)))
 
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index d48a3d4..f8f1532 100755
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -76,7 +76,7 @@ $(call gb_Deliver_add_deliverable,$(call gb_Library_get_target,$(1)),$(call gb_L
 endef
 
 define gb_Library_set_componentfile
-$(call gb_ComponentTarget_ComponentTarget,$(2),$(call gb_Library_get_filename,$(1)))
+$(call gb_ComponentTarget_ComponentTarget,$(2),$(call gb_Library_get_filename,$(1)),$(call gb_Library_get_dllname,$(1)))
 $(call gb_Library_get_target,$(1)) : $(call gb_ComponentTarget_get_outdir_target,$(2))
 $(call gb_Library_get_clean_target,$(1)) : $(call gb_ComponentTarget_get_clean_target,$(2))
 
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index 1046065..d5d3f19 100755
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -69,6 +69,9 @@ $(call gb_LinkTarget_set_defs,$(2)),\
 )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list