[Libreoffice-commits] .: Branch 'feature/gnumake4' - 18 commits - configure.in RepositoryExternal.mk RepositoryFixes.mk Repository.mk solenv/config solenv/gbuild
Bjoern Michaelsen
bmichaelsen at kemper.freedesktop.org
Fri Jun 17 02:14:45 PDT 2011
Repository.mk | 22 --
RepositoryExternal.mk | 281 ++++++++++++++++++++++++++++++++++
RepositoryFixes.mk | 25 ---
configure.in | 106 ------------
solenv/config/sdev300.ini | 6
solenv/gbuild/CppunitTest.mk | 8
solenv/gbuild/CustomTarget.mk | 42 +----
solenv/gbuild/Deliver.mk | 10 -
solenv/gbuild/Executable.mk | 8
solenv/gbuild/Helper.mk | 2
solenv/gbuild/Jar.mk | 35 ++--
solenv/gbuild/JavaClassSet.mk | 65 +++++--
solenv/gbuild/JunitTest.mk | 2
solenv/gbuild/Library.mk | 8
solenv/gbuild/LinkTarget.mk | 152 ++++++++++++++----
solenv/gbuild/Package.mk | 2
solenv/gbuild/StaticLibrary.mk | 6
solenv/gbuild/TargetLocations.mk | 2
solenv/gbuild/platform/linux.mk | 30 +--
solenv/gbuild/platform/macosx.mk | 30 +--
solenv/gbuild/platform/solaris.mk | 24 +-
solenv/gbuild/platform/windows.mk | 24 +-
solenv/gbuild/platform/winmingw.mk | 28 +--
solenv/gbuild/templates/Executable.mk | 6
24 files changed, 604 insertions(+), 320 deletions(-)
New commits:
commit b21da056de778ea31d30ae6101f5357cb8ab0e7e
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 11 14:02:22 2011 +0000
gnumake4: merge DEV300_m106 [hg:5102137bfe1e]
diff --git a/Repository.mk b/Repository.mk
index 0a4f00c..8ed986d 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -139,12 +139,12 @@ $(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \
fsstorage \
gdipluscanvas \
hatchwindowfactory \
+ msforms \
nullcanvas \
passwordcontainer \
productregistration \
simplecanvas \
vbaswobj \
- msforms \
vclcanvas \
))
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index fa3eb27..b23b4ff 100755
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -102,9 +102,7 @@ endif
# these are libraries built by OOo, but only a few of them
# all other libraries built by OOo and all platform libraries (exceptions see below) are used without an import library
# we link against their dlls in gcc format directly
-gb_Library_NOILIBFILENAMES:=\
- icuuc \
- uwinapi \
+gb_Library_NOILIBFILENAMES:= graphite_dll icule icuuc
gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
gb_Library_FILENAMES += $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib)$(gb_Library_PLAINEXT))
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index d3e8d58..0aeaf14 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -72,7 +72,7 @@ $(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_sourcefile,$(1),$(sourcefil
endef
define gb_JavaClassSet_set_classpath
-$(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $(2)
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $(2))
endef
@@ -80,7 +80,34 @@ endef
# build order dependency is a hack to get these prerequisites out of the way in the build command
define gb_JavaClassSet_add_jar
$(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(2))
$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
+endef
+
+# this does not generate dependency on the jar
+define gb_JavaClassSet_add_system_jar
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(2))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
+endef
+
+define gb_JavaClassSet_add_jars
+$(foreach jar,$(2),$(call gb_JavaClassSet_add_jar,$(1),$(jar)))
+endef
+define gb_JavaClassSet_add_system_jars
+$(foreach jar,$(2),$(call gb_JavaClassSet_add_system_jar,$(1),$(jar)))
endef
+
+# this forwards to functions that must be defined in RepositoryExternal.mk.
+# $(call gb_LinkTarget_use_external,library,external)
+define gb_JavaClassSet_use_external
+$(eval $(if $(value gb_JavaClassSet__use_$(2)),\
+ $(call gb_JavaClassSet__use_$(2),$(1)),\
+ $(error gb_JavaClassSet_use_external: unknown external: $(2))))
+endef
+
+define gb_JavaClassSet_use_externals
+$(foreach external,$(2),$(call gb_JavaClassSet_use_external,$(1),$(external)))
+endef
+
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 018a6d4..67faa61 100755
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -123,6 +123,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
SrsTarget \
CppunitTest \
CustomTarget \
+ WinResTarget \
))
$(eval $(call gb_Helper_make_outdir_clean_targets,\
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 622accd..1984e9e 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -277,15 +277,16 @@ gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
endif
gb_Library_PLAINLIBS_NONE += \
- fontconfig \
- Xrender \
dl \
freetype \
+ fontconfig \
m \
pthread \
+ ICE \
+ SM \
X11 \
Xext \
- SM \
+ Xrender \
ICE \
gb_Library_FILENAMES := \
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 1003788..043b5a0 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -262,7 +262,10 @@ gb_Library_PLAINLIBS_NONE += \
$(gb_STDLIBS) \
dl \
freetype \
+ jpeg \
pthread \
+ ICE \
+ SM \
X11 \
Xext \
SM \
commit 3ca77a518d18a67f32371b6539cfe3db7d8533a6
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Wed Apr 6 15:10:04 2011 +0200
masterfix DEV300: #i10000# added -L%SYSBASE%/lib for linux to SOLAREXTRALIB [hg:6b24005a31b8]
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index b58cef8..254f3b5 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -618,7 +618,7 @@ unxlngi6
FREETYPE_CFLAGS -I%SYSBASE%/usr/include/freetype2
VALGRIND_CFLAGS -I%SOLARVERSION%$/unxlngi6%PROEXT%$/inc%UPDMINOREXT%/valgrind
SOLAREXTRAINC -I%SOLAR_STLPATH% -I%SYSBASE%/usr/include -I%SYSBASE%/usr/include/X11 -I%SYSBASE%/include
- SOLAREXTRALIB -L../lib -L%SYSBASE%/usr/X11R6/lib -L%SYSBASE%/usr/lib -L/usr/X11R6/lib -L%SOLAR_STLLIBPATH%
+ SOLAREXTRALIB -L../lib -L%SYSBASE%/usr/X11R6/lib -L%SYSBASE%/lib -L%SYSBASE%/usr/lib -L/usr/X11R6/lib -L%SOLAR_STLLIBPATH%
SOLAR_JAVA TRUE
ZIPDEP %PERL% %SOLARENV%/bin/zipdep.pl
ENABLE_GCONF TRUE
@@ -915,7 +915,7 @@ unxlngx6
FREETYPE_CFLAGS -I%SYSBASE%/usr/include/freetype2
VALGRIND_CFLAGS -I%SOLARVERSION%$/unxlngx6%PROEXT%$/inc%UPDMINOREXT%/valgrind
SOLAREXTRAINC -I%SOLAR_STLPATH% -I%SYSBASE%/usr/include -I%SYSBASE%/usr/include/X11 -I%SYSBASE%/include
- SOLAREXTRALIB -L../lib64 -L%SYSBASE%/usr/lib64 -L%SOLAR_STLLIBPATH%
+ SOLAREXTRALIB -L../lib64 -L%SYSBASE%/lib -L%SYSBASE%/usr/lib64 -L%SOLAR_STLLIBPATH%
SOLAR_JAVA TRUE
ZIPDEP %PERL% %SOLARENV%/bin/zipdep.pl
ENABLE_GCONF TRUE
commit d78da8c7621a57c8a048ff7dd85293bf39723a16
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Tue Apr 5 17:42:15 2011 +0200
masterfix DEV300: #i10000# add cairo to build type [hg:38188af12de4]
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index 7f67787..b58cef8 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -9,7 +9,7 @@ common
BMP_WRITES_FLAG TRUE
BUILD_SPECIAL TRUE
BUILD_STAX YES
- BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS
+ BUILD_TYPE SO OOo EXT BINFILTER MORE_FONTS BSH CURL DICTIONARIES HSQLDB HUNSPELL HYPHEN MYTHES JPEG LIBXML2 LIBXMLSEC LPSOLVE MOZ NEON TWAIN PYTHON ZLIB SANE UNIXODBC X11_EXTENSIONS LIBWPD EPM ODK MSFONTEXTRACT MATHMLDTD BOOST MDDS EXPAT CRASHREP BERKELEYDB LIBXSLT SUN AGG GTK ICU SYSTRAY_GTK JAVAINSTALLER2 VIGRA OPENSSL JFREEREPORT APACHE_COMMONS TOMCAT REPORTBUILDER SDEXT SWEXT XPDF LUCENE REDLAND SAXON WRITER2LATEX NSS GRAPHITE MYSQLCPPCONN MYSQLC CPPUNIT LIBTEXTCAT LIBTEXTCATDATA AFMS CAIRO
CONFIG_PROJECT config_office
DIC_ALL TRUE
ENABLEUNICODE TRUE
commit 9a17f219caabf5de5b55c06cc3321f866c6b1b88
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 11 13:23:37 2011 +0000
gnumake4: Jar.mk: move CLASSPATH stuff to JavaClassSet, and add system/external [hg:db8ee7ba2cff]
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 36ec13a..06ea44a 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -71,11 +71,11 @@ $(call gb_Jar_get_target,%) : $(call gb_JavaClassSet_get_target,$(call gb_Jar_ge
# adds jar files to DeliverLogTarget
# adds dependency for outdir target to workdir target (pattern rule for delivery is in Package.mk)
define gb_Jar_Jar
-$(call gb_Jar_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH)
$(call gb_Jar_get_target,$(1)) : MANIFEST :=
$(call gb_Jar_get_target,$(1)) : JARCLASSPATH :=
$(call gb_Jar_get_target,$(1)) : PACKAGEROOTS :=
$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2))
+$(call gb_JavaClassSet_set_classpath,$(call gb_Jar_get_classsetname,$(1)),$(value XCLASSPATH))
$(eval $(call gb_Module_register_target,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_clean_target,$(1))))
$(call gb_Deliver_add_deliverable,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_target,$(1)))
$(call gb_Jar_get_outdir_target,$(1)) : $(call gb_Jar_get_target,$(1))
@@ -96,9 +96,8 @@ define gb_Jar_add_sourcefiles
$(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile,$(1),$(sourcefile)))
endef
-# don't forward it to ClassSet; the ClassSet "inherits" the classpath from the Jar
define gb_JarTest_set_classpath
-$(call gb_Jar_get_target,$(1)) : CLASSPATH := $(2)
+$(call gb_JavaClassSet_set_classpath,$(call gb_Jar_get_classsetname,$(1)),$(2))
endef
# JARCLASSPATH is the class path that is written to the manifest of the jar
@@ -118,14 +117,28 @@ endef
# remember: classpath is "inherited" to ClassSet
define gb_Jar_add_jar
-$(call gb_Jar_get_target,$(1)) : CLASSPATH := $$(CLASSPATH)$(gb_CLASSPATHSEP)$(2)
$(call gb_JavaClassSet_add_jar,$(call gb_Jar_get_classsetname,$(1)),$(2))
+endef
+define gb_Jar_add_system_jar
+$(call gb_JavaClassSet_add_system_jar,$(call gb_Jar_get_classsetname,$(1)),$(2))
endef
# specify jars with imported modules
define gb_Jar_add_jars
-$(foreach jar,$(2),$(call gb_Jar_add_jar,$(1),$(jar)))
+$(call gb_JavaClassSet_add_jars,$(call gb_Jar_get_classsetname,$(1)),$(2))
+endef
+
+define gb_Jar_add_system_jars
+$(call gb_JavaClassSet_add_system_jars,$(call gb_Jar_get_classsetname,$(1)),$(2))
+endef
+
+define gb_Jar_use_external
+$(call gb_JavaClassSet_use_external,$(call gb_Jar_get_classsetname,$(1)),$(2))
+endef
+
+define gb_Jar_use_externals
+$(call gb_JavaClassSet_use_externals,$(call gb_Jar_get_classsetname,$(1)),$(2))
endef
# possible directories for jar files containing UNO services
commit 1338aa4aa26cb2ee01a9f15109626f6e26bb4f08
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 11 13:23:37 2011 +0000
gnumake4: #i116959#: user defined CPPFLAGS: put them in target local DEFS. [hg:6ae64fc2b62e]
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 3150a55..17b6bf3 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -25,6 +25,13 @@
#
#*************************************************************************
+#the following user-defined variables are supported:
+# CPPFLAGS
+# CFLAGS
+# CXXFLAGS
+# OBJCXXFLAGS
+# LDFLAGS
+
# CFLAGS from environment override debug/optimization flags
ifeq ($(gb_DEBUGLEVEL),2)
CFLAGS ?= $(gb_COMPILEROPTFLAGS) $(gb_DEBUG_CFLAGS)
@@ -361,9 +368,9 @@ $(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
+$(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
+$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
$(call gb_LinkTarget_get_headers_target,$(1)) \
@@ -394,8 +401,8 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL)
$(call gb_LinkTarget_get_dep_target,$(1)) : TARGETTYPE :=
commit 1d926c88123ee1e36bd3798f21847c6eb4436394
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 11 13:23:37 2011 +0000
gnumake4: #i116959#: user defined LDFLAGS: [hg:5ed23c4158ac]
rename target local variable LDFLAGS.
add gb_LinkTarget_add_ldflags.
include user defined LDFLAGS in target local T_LDFLAGS.
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 2b93f96..c73cd3b 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -90,7 +90,9 @@ $(eval $(foreach method,\
add_defs \
set_defs \
set_include \
+ add_ldflags \
set_ldflags \
+ add_libs \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 9209625..9c7d47e 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -81,7 +81,9 @@ $(eval $(foreach method,\
add_defs \
set_defs \
set_include \
+ add_ldflags \
set_ldflags \
+ add_libs \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 09e35d8..fe365fb 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -124,7 +124,9 @@ $(eval $(foreach method,\
add_defs \
set_defs \
set_include \
+ add_ldflags \
set_ldflags \
+ add_libs \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 9c8acf6..3150a55 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -368,7 +368,7 @@ $(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)) : T_LDFLAGS := $$(gb_LinkTarget_LDFLAGS) $(LDFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : LIBS :=
@@ -501,8 +501,12 @@ endif
endef
+define gb_LinkTarget_add_ldflags
+$(call gb_LinkTarget_get_target,$(1)) : T_LDFLAGS += $(2)
+endef
+
define gb_LinkTarget_set_ldflags
-$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_LDFLAGS := $(2)
endef
define gb_LinkTarget_add_libs
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index 74da27d..af7db9a 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -99,7 +99,9 @@ $(eval $(foreach method,\
add_defs \
set_defs \
set_include \
+ add_ldflags \
set_ldflags \
+ add_libs \
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index b00a680..622accd 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -226,7 +226,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(subst \d,$$,$(RPATH)) $(LDFLAGS) \
+ $(subst \d,$$,$(RPATH)) \
+ $(T_LDFLAGS) \
$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 1f5b986..4642d3a 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -256,12 +256,14 @@ $(call gb_Helper_abbreviate_dirs,\
$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(subst \d,$$,$(RPATH)) $(LDFLAGS) \
+ $(subst \d,$$,$(RPATH)) \
+ $(T_LDFLAGS) \
$(patsubst lib%.dylib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) > $${DYLIB_FILE} && \
$(gb_CXX) \
$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(subst \d,$$,$(RPATH)) $(LDFLAGS) \
+ $(subst \d,$$,$(RPATH)) \
+ $(T_LDFLAGS) \
$(call gb_LinkTarget__get_liblinkflags,$(LINKED_LIBS)) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index b32809a..1003788 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -204,7 +204,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(subst \d,$$,$(RPATH)) $(LDFLAGS) \
+ $(subst \d,$$,$(RPATH)) \
+ $(T_LDFLAGS) \
$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index b3b5db8..f1c9266 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -433,7 +433,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
- $(LDFLAGS) \
+ $(T_LDFLAGS) \
@$${RESPONSEFILE} \
$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index d083d09..733b2ea 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -397,7 +397,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
$(gb_LINK) \
$(gb_Executable_TARGETTYPEFLAGS) \
- $(LDFLAGS) \
+ $(T_LDFLAGS) \
$(gb_MINGWLIBDIR)/crt2.o \
$(MINGW_CLIB_DIR)/crtbegin.o \
@$${RESPONSEFILE} \
@@ -419,7 +419,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) " > $${RESPONSEFILE} && \
$(gb_LINK) \
$(gb_Library_TARGETTYPEFLAGS) \
- $(LDFLAGS) \
+ $(T_LDFLAGS) \
--enable-auto-image-base \
-e _DllMainCRTStartup at 12 \
$(gb_MINGWLIBDIR)/dllcrt2.o \
commit d86fb8336a584967d389323f5b5c788392ba85bf
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 11 13:23:37 2011 +0000
gnumake4: #i116959#: rename target local variables {C,CXX,OBJCXX}FLAGS: [hg:8801515221cf]
add a T_ prefix, so we don't need to use override.
also introduce gb_LinkTarget_add_{c,cxx,objcxx}flags.
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 253d3b9..2b93f96 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -81,9 +81,13 @@ $(eval $(foreach method,\
add_objcxxobjects \
add_exception_objects \
add_noexception_objects \
+ add_cflags \
set_cflags \
+ add_cxxflags \
set_cxxflags \
+ add_objcxxflags \
set_objcxxflags \
+ add_defs \
set_defs \
set_include \
set_ldflags \
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index d90a14c..9209625 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -72,9 +72,13 @@ $(eval $(foreach method,\
add_exception_objects \
add_noexception_objects \
add_generated_exception_objects \
+ add_cflags \
set_cflags \
+ add_cxxflags \
set_cxxflags \
+ add_objcxxflags \
set_objcxxflags \
+ add_defs \
set_defs \
set_include \
set_ldflags \
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 357e7b6..09e35d8 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -115,9 +115,13 @@ $(eval $(foreach method,\
add_exception_objects \
add_noexception_objects \
add_generated_exception_objects \
+ add_cflags \
set_cflags \
+ add_cxxflags \
set_cxxflags \
+ add_objcxxflags \
set_objcxxflags \
+ add_defs \
set_defs \
set_include \
set_ldflags \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 1b0575d..9c8acf6 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -98,8 +98,8 @@ gb_CxxObject__command_dep =
endif
# 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
+# are the same as the T_CXXFLAGS and DEFS we want to use for this object. This
+# should usually be the case. The DEFS/T_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
@@ -108,16 +108,16 @@ endif
define gb_CxxObject__set_pchflags
ifeq ($(gb_ENABLE_PCH),$(true))
ifneq ($(strip $$(PCH_NAME)),)
-ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_EXCEPTIONFLAGS)),$$(sort $$(CXXFLAGS) $$(DEFS)))
+ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_EXCEPTIONFLAGS)),$$(sort $$(T_CXXFLAGS) $$(DEFS)))
$$@ : PCHFLAGS := $$(call gb_PrecompiledHeader_get_enableflags,$$(PCH_NAME))
else
-ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_NOEXCEPTIONFLAGS)),$$(sort $$(CXXFLAGS) $$(DEFS)))
+ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_NOEXCEPTIONFLAGS)),$$(sort $$(T_CXXFLAGS) $$(DEFS)))
$$@ : PCHFLAGS := $$(call gb_NoexPrecompiledHeader_get_enableflags,$$(PCH_NAME))
else
$$(info No precompiled header available for $$*.)
$$(info precompiled header flags ( ex) : $$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_EXCEPTIONFLAGS)))
$$(info precompiled header flags (noex) : $$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS) $$(gb_LinkTarget_NOEXCEPTIONFLAGS)))
-$$(info . object flags : $$(sort $$(CXXFLAGS) $$(DEFS)))
+$$(info . object flags : $$(sort $$(T_CXXFLAGS) $$(DEFS)))
$$@ : PCHFLAGS :=
endif
endif
@@ -225,9 +225,6 @@ gb_ObjCxxObject_ObjCxxObject =
# LinkTarget class
-# need an alias for global CXXFLAGS in gb_LinkTarget_add_exception_object etc.
-gb_CXXFLAGS_TOO := $(CXXFLAGS)
-
gb_LinkTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
# defined by platform
# gb_LinkTarget_CXXFLAGS
@@ -341,12 +338,9 @@ $(call gb_LinkTarget_get_headers_target,%) : $(call gb_LinkTarget_get_external_h
# linktarget. This for example means that you cannot build a single object
# alone, because then you would directly depend on the object.
#
-# A note about flags: here the global variable CFLAGS is overridden by a target
-# local variable of the same name. The $(CFLAGS) on the rhs refers to the
-# global variable. (same thing for OBJCXXFLAGS)
-# CXXFLAGS is slightly different, because it is not set at the link target,
-# but only when using gb_LinkTarget_add_{no,}exception_object etc., to
-# provide a mechanism that disables optimization for a specific file.
+# A note about flags: because the overriding the global variables with a target
+# local variable of the same name is considered obscure, the target local
+# variables have a T_ prefix.
define gb_LinkTarget_LinkTarget
$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
@@ -360,12 +354,12 @@ $(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS :=
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : override CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : override CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
-$(call gb_LinkTarget_get_target,$(1)) : override OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(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)) \
@@ -396,10 +390,10 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXOBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS :=
-$(call gb_LinkTarget_get_dep_target,$(1)) : override CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : override CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : override OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
@@ -410,6 +404,17 @@ endif
endef
+define gb_LinkTarget_add_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)
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS += $(2)
+endif
+endef
+
define gb_LinkTarget_set_defs
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : DEFS := $(2)
@@ -423,30 +428,57 @@ endif
endef
+define gb_LinkTarget_add_cflags
+$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS += $(2)
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS += $(2)
+endif
+
+endef
+
define gb_LinkTarget_set_cflags
-$(call gb_LinkTarget_get_target,$(1)) : override CFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : override CFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS := $(2)
endif
endef
+define gb_LinkTarget_add_cxxflags
+$(call gb_LinkTarget_get_headers_target,$(1)) \
+$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS += $(2)
+$(call gb_LinkTarget_get_headers_target,$(1)) \
+$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS += $(2)
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS += $(2)
+endif
+endef
+
+# maybe should deprecate this...
define gb_LinkTarget_set_cxxflags
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : override CXXFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS := $(2)
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : override CXXFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS := $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $(2)
endif
endef
+define gb_LinkTarget_add_objcxxflags
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS += $(2)
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS += $(2)
+endif
+endef
+
define gb_LinkTarget_set_objcxxflags
-$(call gb_LinkTarget_get_target,$(1)) : override OBJCXXFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : override OBJCXXFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS := $(2)
endif
endef
@@ -511,7 +543,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2))
$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_CObject_get_target,$(2)) : override CFLAGS += $(3)
+$(call gb_CObject_get_target,$(2)) : T_CFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS += $(2)
@@ -526,7 +558,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : CXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CxxObject_get_target,$(2))
$(call gb_CxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_CxxObject_get_target,$(2)) : override CXXFLAGS += $(3)
+$(call gb_CxxObject_get_target,$(2)) : T_CXXFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2)
@@ -541,7 +573,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : OBJCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_ObjCxxObject_get_target,$(2))
$(call gb_ObjCxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_ObjCxxObject_get_target,$(2)) : override OBJCXXFLAGS += $(3)
+$(call gb_ObjCxxObject_get_target,$(2)) : T_OBJCXXFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXOBJECTS += $(2)
@@ -556,7 +588,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCxxObject_get_target,$(2))
$(call gb_GenCxxObject_get_source,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_GenCxxObject_get_target,$(2)) : override CXXFLAGS += $(3) $(gb_CXXFLAGS_TOO)
+$(call gb_GenCxxObject_get_target,$(2)) : T_CXXFLAGS += $(3) $(CXXFLAGS)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
@@ -566,11 +598,11 @@ endif
endef
define gb_LinkTarget_add_noexception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(gb_CXXFLAGS_TOO))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(CXXFLAGS))
endef
define gb_LinkTarget_add_exception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_CXXFLAGS_TOO))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(CXXFLAGS))
endef
define gb_LinkTarget_add_cobjects
diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk
index a2521bc..74da27d 100644
--- a/solenv/gbuild/StaticLibrary.mk
+++ b/solenv/gbuild/StaticLibrary.mk
@@ -90,9 +90,13 @@ $(eval $(foreach method,\
add_exception_objects \
add_noexception_objects \
add_generated_exception_objects \
+ add_cflags \
set_cflags \
+ add_cxxflags \
set_cxxflags \
+ add_objcxxflags \
set_objcxxflags \
+ add_defs \
set_defs \
set_include \
set_ldflags \
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 92c448e..b00a680 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -170,7 +170,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
$(gb_CC) \
- $(DEFS) $(CFLAGS) \
+ $(DEFS) \
+ $(T_CFLAGS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CObject_get_target,$(2)) \
@@ -188,7 +189,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) \
+ $(DEFS) \
+ $(T_CXXFLAGS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index e0b601f..1f5b986 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -160,7 +160,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
$(gb_CC) \
- $(DEFS) $(CFLAGS) \
+ $(DEFS) \
+ $(T_CFLAGS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CObject_get_target,$(2)) \
@@ -179,7 +180,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) \
+ $(DEFS) \
+ $(T_CXXFLAGS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
@@ -197,7 +199,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_ObjCxxObject_get_dep_target,$(2))) && \
$(gb_CXX) \
- $(DEFS) $(OBJCXXFLAGS) \
+ $(DEFS) \
+ $(T_OBJCXXFLAGS) \
-c $(3) \
-o $(1) \
-MMD -MT $(call gb_ObjCxxObject_get_target,$(2)) \
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index eb54e06..b32809a 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -152,7 +152,8 @@ $(call gb_Helper_abbreviate_dirs,\
-o $(1) \
-xMMD \
-xMF $(call gb_CObject_get_dep_target,$(2)) \
- $(DEFS) $(CFLAGS) \
+ $(DEFS) \
+ $(T_CFLAGS) \
-I$(dir $(3)) \
$(INCLUDE))
endef
@@ -166,7 +167,8 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) \
+ $(DEFS) \
+ $(T_CXXFLAGS) \
-c $(3) \
-o $(1) \
-xMMD \
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 58b9004..b3b5db8 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -271,13 +271,15 @@ $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
unset INCLUDE && \
$(gb_CC) \
- $(DEFS) $(CFLAGS) -Fd$(PDBFILE) \
+ $(DEFS) \
+ $(T_CFLAGS) \
+ -Fd$(PDBFILE) \
$(PCHFLAGS) \
-I$(dir $(3)) \
$(INCLUDE) \
-c $(3) \
-Fo$(1))
-$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
+$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE))
endef
@@ -310,7 +312,9 @@ $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
unset INCLUDE && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) -Fd$(PDBFILE)\
+ $(DEFS) \
+ $(T_CXXFLAGS) \
+ -Fd$(PDBFILE) \
$(PCHFLAGS) \
-I$(dir $(3)) \
$(INCLUDE_STL) $(INCLUDE) \
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index beca3a1..d083d09 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -239,12 +239,13 @@ $(call gb_Output_announce,$(2),$(true),C ,3)
$(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
$(gb_CC) \
- $(DEFS) $(CFLAGS) \
+ $(DEFS) \
+ $(T_CFLAGS) \
-c $(3) \
-o $(1) \
-I$(dir $(3)) \
$(INCLUDE))
-$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CFLAGS),$(INCLUDE))
+$(call gb_CObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(T_CFLAGS),$(INCLUDE))
endef
@@ -277,12 +278,13 @@ $(call gb_Output_announce,$(2),$(true),CXX,3)
$(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) \
- $(DEFS) $(CXXFLAGS) \
+ $(DEFS) \
+ $(T_CXXFLAGS) \
-c $(3) \
-o $(1) \
-I$(dir $(3)) \
$(INCLUDE_STL) $(INCLUDE))
-$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(CXXFLAGS),$(INCLUDE_STL) $(INCLUDE))
+$(call gb_CxxObject__command_deponcompile,$(1),$(2),$(3),$(DEFS),$(T_CXXFLAGS),$(INCLUDE_STL) $(INCLUDE))
endef
diff --git a/solenv/gbuild/templates/Executable.mk b/solenv/gbuild/templates/Executable.mk
index 691e530..157233a 100644
--- a/solenv/gbuild/templates/Executable.mk
+++ b/solenv/gbuild/templates/Executable.mk
@@ -31,9 +31,9 @@ $(eval $(call gb_Executable_set_include,EXEC,\
$$(INCLUDE) \
))
-$(eval $(call gb_Executable_set_cxxflags,EXEC,\
- $$(CXXFLAGS) \
-))
+#$(eval $(call gb_Executable_add_defs,EXEC,\
+# -Dfoo \
+#))
$(eval $(call gb_Executable_add_linked_libs,EXEC,\
$(gb_STDLIBS) \
commit 1cee2735904be52b5a98b14a09484fbb55058e05
Author: Michael Stahl <mst at openoffice.org>
Date: Thu Apr 7 12:09:24 2011 +0000
gnumake4: #i116959#: allow user to override {C,CXX,OBJCXX}FLAGS: [hg:6af861d98643]
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 83dc5a3..1b0575d 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -25,6 +25,17 @@
#
#*************************************************************************
+# CFLAGS from environment override debug/optimization flags
+ifeq ($(gb_DEBUGLEVEL),2)
+CFLAGS ?= $(gb_COMPILEROPTFLAGS) $(gb_DEBUG_CFLAGS)
+CXXFLAGS ?= $(gb_COMPILEROPTFLAGS) $(gb_DEBUG_CFLAGS)
+OBJCXXFLAGS ?= $(gb_COMPILEROPTFLAGS) $(gb_DEBUG_CFLAGS)
+else
+CFLAGS ?= $(gb_COMPILEROPTFLAGS)
+CXXFLAGS ?= $(gb_COMPILEROPTFLAGS)
+OBJCXXFLAGS ?= $(gb_COMPILEROPTFLAGS)
+endif
+
# CObject class
@@ -214,6 +225,9 @@ gb_ObjCxxObject_ObjCxxObject =
# LinkTarget class
+# need an alias for global CXXFLAGS in gb_LinkTarget_add_exception_object etc.
+gb_CXXFLAGS_TOO := $(CXXFLAGS)
+
gb_LinkTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
# defined by platform
# gb_LinkTarget_CXXFLAGS
@@ -326,6 +340,13 @@ $(call gb_LinkTarget_get_headers_target,%) : $(call gb_LinkTarget_get_external_h
# 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.
+#
+# A note about flags: here the global variable CFLAGS is overridden by a target
+# local variable of the same name. The $(CFLAGS) on the rhs refers to the
+# global variable. (same thing for OBJCXXFLAGS)
+# CXXFLAGS is slightly different, because it is not set at the link target,
+# but only when using gb_LinkTarget_add_{no,}exception_object etc., to
+# provide a mechanism that disables optimization for a specific file.
define gb_LinkTarget_LinkTarget
$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_LinkTarget_get_external_headers_target,$(1)) : SELF := $(1)
@@ -339,12 +360,12 @@ $(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS :=
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : CFLAGS := $$(gb_LinkTarget_CFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : override CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : override CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
-$(call gb_LinkTarget_get_target,$(1)) : OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : override OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(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)) \
@@ -375,10 +396,10 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXOBJECTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS :=
-$(call gb_LinkTarget_get_dep_target,$(1)) : CFLAGS := $$(gb_LinkTarget_CFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
-$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override CFLAGS := $$(gb_LinkTarget_CFLAGS) $(CFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) $(CXXFLAGS)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS) $(OBJCXXFLAGS)
$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS)
$(call gb_LinkTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
@@ -403,29 +424,29 @@ endif
endef
define gb_LinkTarget_set_cflags
-$(call gb_LinkTarget_get_target,$(1)) : CFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : override CFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : CFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override CFLAGS := $(2)
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_target,$(1)) : override CXXFLAGS := $(2)
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : CXXFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override CXXFLAGS := $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $(2)
endif
endef
define gb_LinkTarget_set_objcxxflags
-$(call gb_LinkTarget_get_target,$(1)) : OBJCXXFLAGS := $(2)
+$(call gb_LinkTarget_get_target,$(1)) : override OBJCXXFLAGS := $(2)
ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXFLAGS := $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : override OBJCXXFLAGS := $(2)
endif
endef
@@ -490,7 +511,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : COBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CObject_get_target,$(2))
$(call gb_CObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_CObject_get_target,$(2)) : CFLAGS += $(3)
+$(call gb_CObject_get_target,$(2)) : override CFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : COBJECTS += $(2)
@@ -505,7 +526,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : CXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_CxxObject_get_target,$(2))
$(call gb_CxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_CxxObject_get_target,$(2)) : CXXFLAGS += $(3)
+$(call gb_CxxObject_get_target,$(2)) : override CXXFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2)
@@ -520,7 +541,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : OBJCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_ObjCxxObject_get_target,$(2))
$(call gb_ObjCxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_ObjCxxObject_get_target,$(2)) : OBJCXXFLAGS += $(3)
+$(call gb_ObjCxxObject_get_target,$(2)) : override OBJCXXFLAGS += $(3)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : OBJCXXOBJECTS += $(2)
@@ -535,7 +556,7 @@ $(call gb_LinkTarget_get_clean_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCxxObject_get_target,$(2))
$(call gb_GenCxxObject_get_source,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
-$(call gb_GenCxxObject_get_target,$(2)) : CXXFLAGS += $(3) $(gb_COMPILEROPTFLAGS)
+$(call gb_GenCxxObject_get_target,$(2)) : override CXXFLAGS += $(3) $(gb_CXXFLAGS_TOO)
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
@@ -545,11 +566,11 @@ endif
endef
define gb_LinkTarget_add_noexception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(gb_CXXFLAGS_TOO))
endef
define gb_LinkTarget_add_exception_object
-$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS))
+$(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_CXXFLAGS_TOO))
endef
define gb_LinkTarget_add_cobjects
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 2bc0a52..92c448e 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -141,6 +141,8 @@ gb_LinkTarget_LDFLAGS += \
endif
+gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+
ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS := -O0
else
@@ -210,14 +212,9 @@ gb_LinkTarget__RPATHS := \
SDKBIN:\dORIGIN/../../ure-link/lib \
NONEBIN:\dORIGIN/../lib:\dORIGIN \
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-gb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-
-endif
gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 7b325a0..e0b601f 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -130,6 +130,8 @@ gb_LinkTarget_LDFLAGS := \
$(subst -L../lib , ,$(SOLARLIB)) \
#man ld says: obsolete -Wl,-multiply_defined,suppress \
+gb_DEBUG_CFLAGS := -g
+
ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS := -O0
else
@@ -223,15 +225,9 @@ define gb_LinkTarget__get_installname
$(if $(2),-install_name '$(2)$(1)',)
endef
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS)
-
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CFLAGS += -g
-gb_LinkTarget_CXXFLAGS += -g
-gb_LinkTarget_OBJCXXFLAGS += -g
-endif
+gb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) $(gb_OBJCXXFLAGS)
gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 0ba0d00..eb54e06 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -108,6 +108,9 @@ gb_LinkTarget_LDFLAGS := \
-PIC \
-library=no%Cstd \
+
+gb_DEBUG_CFLAGS := -g
+
ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS :=
else
@@ -187,13 +190,9 @@ gb_LinkTarget__RPATHS := \
SDKBIN:\dORIGIN/../../ure-link/lib \
NONEBIN:\dORIGIN/../lib:\dORIGIN \
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CXXFLAGS += -g
-gb_LinkTarget_CFLAGS += -g
-endif
gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 52b9ed0..58b9004 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -200,6 +200,9 @@ gb_LinkTarget_LDFLAGS := \
-dynamicbase \
$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
+gb_DEBUG_CFLAGS := -Zi
+
+# this does not use CFLAGS so it is not overridable
ifneq ($(ENABLE_CRASHDUMP),)
gb_LinkTarget_LDFLAGS += -DEBUG
gb_CFLAGS+=-Zi
@@ -207,10 +210,8 @@ gb_CXXFLAGS+=-Zi
endif
ifeq ($(gb_DEBUGLEVEL),2)
-gb_CXXFLAGS +=-Zi
-gb_CFLAGS +=-Zi
-gb_COMPILEROPTFLAGS :=
gb_LinkTarget_LDFLAGS += -DEBUG
+gb_COMPILEROPTFLAGS :=
else
gb_COMPILEROPTFLAGS := -Ob1 -Oxs -Oy-
endif
@@ -403,7 +404,7 @@ endef
# LinkTarget class
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
gb_LinkTarget_INCLUDE :=\
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 7c00399..beca3a1 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -166,6 +166,8 @@ ifeq ($(MINGW_GCCLIB_EH),YES)
gb_LinkTarget_LDFLAGS += -shared-libgcc
endif
+gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+
ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS := -O0
else
@@ -374,15 +376,9 @@ endef
# LinkTarget class
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
-ifeq ($(gb_DEBUGLEVEL),2)
-gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-gb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
-
-endif
-
gb_LinkTarget_INCLUDE :=\
$(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) \
$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
commit 49afb442f2410a5b717e60dc094b2f95ead925e1
Author: Michael Stahl <mst at openoffice.org>
Date: Thu Apr 7 12:09:24 2011 +0000
gnumake4: LinkTarget.mk: remove some unnecessary arguments [hg:38ca0135d0e9]
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index f36aa52..83dc5a3 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -48,11 +48,11 @@ endif
define gb_CObject__rules
$$(call gb_CObject_get_target,%) : $$(call gb_CObject_get_source,$(1),%)
- $$(call gb_CObject__command,$$@,$$*,$$<,$$(DEFS),$$(CFLAGS),$$(INCLUDE))
+ $$(call gb_CObject__command,$$@,$$*,$$<)
ifeq ($(gb_FULLDEPS),$(true))
$$(call gb_CObject_get_dep_target,%) : $$(call gb_CObject_get_source,$(1),%)
- $$(call gb_CObject__command_dep,$$@,$$*,$$<,$$(DEFS),$$(CFLAGS),$$(INCLUDE))
+ $$(call gb_CObject__command_dep,$$@,$$*,$$<)
endif
endef
@@ -192,11 +192,11 @@ endif
define gb_ObjCxxObject__rules
$$(call gb_ObjCxxObject_get_target,%) : $$(call gb_ObjCxxObject_get_source,$(1),%)
- $$(call gb_ObjCxxObject__command,$$@,$$*,$$<,$$(DEFS),$$(OBJCXXFLAGS),$$(INCLUDE_STL) $$(INCLUDE))
+ $$(call gb_ObjCxxObject__command,$$@,$$*,$$<)
ifeq ($(gb_FULLDEPS),$(true))
$$(call gb_ObjCxxObject_get_dep_target,%) : $$(call gb_ObjCxxObject_get_source,$(1),%)
- $$(call gb_ObjCxxObject__command_dep,$$@,$$*,$$<,$$(DEFS),$$(OBJCXXFLAGS),$$(INCLUDE_STL) $$(INCLUDE))
+ $$(call gb_ObjCxxObject__command_dep,$$@,$$*,$$<)
endif
endef
commit 97a4aacb05c3da112e5df2ea5c8d39c1152b9aa0
Author: Michael Stahl <mst at openoffice.org>
Date: Thu Apr 7 12:09:24 2011 +0000
gnumake4: Deliver.mk: print better diagnostic on error [hg:a016e9618f3d]
diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 6077289..2af490e 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -44,15 +44,21 @@ $(if $(gb_HIRESTIME),,.LOW_RESOLUTION_TIME : $(1))
endef
ifeq ($(strip $(gb_Deliver_GNUCOPY)),)
-define gb_Deliver_deliver
+define gb_Deliver__deliver
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
+define gb_Deliver__deliver
mkdir -p $(dir $(2)) && $(gb_Deliver_GNUCOPY) $(if $(gb_Deliver_CLEARONDELIVER),--remove-destination) --force --preserve=timestamps $(1) $(2)
endef
endif
+define gb_Deliver_deliver
+$(if $(1),$(call gb_Deliver__deliver,$(1),$(2)),\
+ $(error gb_Deliver_deliver:\
+ file does not exist in solver, and cannot be delivered: $(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
commit a89b7edd3cb71f8c372f5b2cc22142f8a3f92143
Author: Michael Stahl <mst at openoffice.org>
Date: Tue Apr 5 09:10:18 2011 +0000
gnumake4: Jar.mk: remove unnecessary final target [hg:1e9ce815719e]
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 7e6a222..36ec13a 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -56,16 +56,10 @@ endef
$(call gb_Jar_get_clean_target,%) : $(call gb_JavaClassSet_get_clean_target,$(call gb_Jar_get_classsetname,%))
$(call gb_Output_announce,$*,$(false),JAR,3)
$(call gb_Helper_abbreviate_dirs,\
- rm -rf $(dir $(call gb_Jar_get_target,$*)) && \
- rm -f $(call gb_Jar_get_final_target,$*) && \
- rm -f $(call gb_Jar_get_outdir_target,$*))
+ rm -f $(call gb_Jar_get_target,$*) $(call gb_Jar_get_outdir_target,$*))
-# the final target is a touch target; we use it as registered targets should be in workdir, not in outdir
# the outdir target depends on the workdir target and is built by delivering the latter
# the workdir target is created by cd'ing to the target directory and adding/updating the files
-$(call gb_Jar_get_final_target,%) : $(call gb_Jar_get_outdir_target,%)
- $(call gb_Helper_abbreviate_dirs,\
- touch $@)
# rule for creating the jar file using the command defined above
$(call gb_Jar_get_target,%) : $(call gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,%))
@@ -82,7 +76,7 @@ $(call gb_Jar_get_target,$(1)) : MANIFEST :=
$(call gb_Jar_get_target,$(1)) : JARCLASSPATH :=
$(call gb_Jar_get_target,$(1)) : PACKAGEROOTS :=
$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2))
-$(eval $(call gb_Module_register_target,$(call gb_Jar_get_final_target,$(1)),$(call gb_Jar_get_clean_target,$(1))))
+$(eval $(call gb_Module_register_target,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_clean_target,$(1))))
$(call gb_Deliver_add_deliverable,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_target,$(1)))
$(call gb_Jar_get_outdir_target,$(1)) : $(call gb_Jar_get_target,$(1))
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 4fa8221..018a6d4 100755
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -61,7 +61,6 @@ gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
gb_Jar_get_target = $(WORKDIR)/Jar/$(1).jar
-gb_Jar_get_final_target = $(WORKDIR)/Jar/$(1).done
gb_Jar_get_classsetname = Jar/$(1)
gb_JavaClassSet_get_classdir = $(WORKDIR)/JavaClassSet/$(1)
gb_JavaClassSet_get_repo_target = $(WORKDIR)/JavaClassSet/$(2)/$(1).done
commit deb79bdc4ef3713a413e8cab7ecda2c3ef97ab68
Author: Michael Stahl <mst at openoffice.org>
Date: Tue Apr 5 09:05:18 2011 +0000
gnumake4: #i117340#: CustomTarget: replace broken multi-repo support [hg:a639061a46c8]
diff --git a/solenv/gbuild/CustomTarget.mk b/solenv/gbuild/CustomTarget.mk
index 0829435..6f65308 100644
--- a/solenv/gbuild/CustomTarget.mk
+++ b/solenv/gbuild/CustomTarget.mk
@@ -36,56 +36,44 @@ define gb_CustomTarget__command
endef
-define gb_CustomTarget__rules
-$$(call gb_CustomTarget_get_repo_target,$(1),%) :
- $$(call gb_Output_announce,$$*,$$(true),MAK,3)
- $$(call gb_CustomTarget__command,$$@,$$*)
-
-$$(call gb_CustomTarget_get_target,%) : $$(call gb_CustomTarget_get_repo_target,$(1),%)
- $$(call gb_Helper_abbreviate_dirs,\
- touch $$@)
-
-endef
+$(call gb_CustomTarget_get_target,%) :
+ $(call gb_Output_announce,$*,$(true),MAK,3)
+ $(call gb_CustomTarget__command,$@,$*)
.PHONY: $(call gb_CustomTarget_get_clean_target,%)
$(call gb_CustomTarget_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),MAK,3)
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(call gb_CustomTarget_get_workdir,$*) && \
- rm -f $(call gb_CustomTarget_get_target,$*) \
- $(foreach reponame,$(gb_CustomTarget_REPOSITORYNAMES),$(call gb_CustomTarget_get_repo_target,$(reponame),$*)))
-
-
-$(foreach reponame,$(gb_CustomTarget_REPOSITORYNAMES),$(eval $(call gb_CustomTarget__rules,$(reponame))))
+ rm -f $(call gb_CustomTarget_get_target,$*))
define gb_CustomTarget__get_makefile
$(1)/$(2)/Makefile
endef
define gb_CustomTarget_CustomTarget
-$(foreach reponame,$(gb_CustomTarget_REPOSITORYNAMES),\
- $(eval $(call gb_CustomTarget_get_repo_target,$(reponame),$(1)) : $(call gb_CustomTarget__get_makefile,$($(reponame)),$(1))))
-
-$(call gb_CustomTarget_get_workdir,$(1))/% : $(call gb_CustomTarget_get_target,$(1))
-
+$(if $(filter $(2),$(gb_CustomTarget_REPOSITORYNAMES)),,\
+ $(error CustomTarget: no or invalid repository given; known repositories: \
+ $(gb_JavaClassSet_REPOSITORYNAMES)))
+gb_CustomTarget_REPO_$(1) := $(2)
+$(call gb_CustomTarget_get_target,$(1)) : \
+ $(call gb_CustomTarget__get_makefile,$($(2)),$(1))
+$(call gb_CustomTarget_get_workdir,$(1))/% : \
+ $(call gb_CustomTarget_get_target,$(1))
endef
define gb_CustomTarget_add_dependency
-$(foreach reponame,$(gb_CustomTarget_REPOSITORYNAMES),\
- $(eval $(call gb_CustomTarget_get_repo_target,$(reponame),$(1)) : $($(reponame))/$(2)))
-
+$(eval $(call gb_CustomTarget_get_target,$(1)) : \
+ $($(gb_CustomTarget_REPO_$(1)))/$(2))
endef
define gb_CustomTarget_add_dependencies
$(foreach dependency,$(2),$(call gb_CustomTarget_add_dependency,$(1),$(dependency)))
-
endef
define gb_CustomTarget_add_outdir_dependency
-$(foreach reponame,$(gb_CustomTarget_REPOSITORYNAMES),\
- $(eval $(call gb_CustomTarget_get_repo_target,$(reponame),$(1)) : $(2)))
-
+$(eval $(call gb_CustomTarget_get_target,$(1)) : $(2))
endef
define gb_CustomTarget_add_outdir_dependencies
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 6e16b21..4b52570 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -73,7 +73,7 @@ endef
define gb_Package_add_customtarget
$(call gb_Package_get_preparation_target,$(1)) : $(call gb_CustomTarget_get_target,$(2))
$(call gb_Package_get_clean_target,$(1)) : $(call gb_CustomTarget_get_clean_target,$(2))
-$(call gb_CustomTarget_CustomTarget,$(2))
+$(eval $(call gb_CustomTarget_CustomTarget,$(2),$(3)))
endef
commit 6202628ffd25d03ba903b82a796962a8401b951c
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:49:35 2011 +0000
gnumake4: #i117610#: add RepositoryExternal.mk, and use it. [hg:62e2f8dc95a7]
diff --git a/Repository.mk b/Repository.mk
index 0ea7d9b..0a4f00c 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -100,18 +100,14 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
))
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
- xml2 \
xmlreader \
))
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
cppunit \
- icuuc \
icule \
graphite_dll \
cppunit \
- rdf \
- xslt \
))
@@ -161,23 +157,11 @@ $(eval $(call gb_Helper_register_libraries,UNOVERLIBS, \
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
basegfx_s \
- jpeglib \
+ graphite \
ooopathutils \
salcpprt \
+ vclmain \
zlib \
- graphite \
- vclmain \
))
-ifeq ($(SYSTEM_EXPAT),YES)
-$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
- expat \
-))
-else
-$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
- expat_xmlparse \
- expat_xmltok \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
new file mode 100644
index 0000000..13985e8
--- /dev/null
+++ b/RepositoryExternal.mk
@@ -0,0 +1,281 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# 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.
+#
+#*************************************************************************
+
+# this file describes all the external libraries
+# depending on the configure options these may be taken from the system,
+# or the internal/bundled copy may be built.
+
+# for every external, a function gb_LinkTarget_use__FOO is defined,
+# once for the system case, once for the internal case.
+
+# in the system case, no libraries should be registered, but the target-local
+# variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
+
+
+ifeq ($(SYSTEM_ZLIB),YES)
+
+define gb_LinkTarget__use_zlib
+$(call gb_LinkTarget_set_defs,$(1),\
+ $$(DEFS) \
+ -DSYSTEM_ZLIB \
+)
+$(call gb_LinkTarget_add_libs,$(1),-lz)
+endef
+
+else # !SYSTEM_ZLIB
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ zlib \
+))
+
+define gb_LinkTarget__use_zlib
+$(call gb_LinkTarget_add_linked_static_libs,$(1),\
+ zlib \
+)
+endef
+
+endif # SYSTEM_ZLIB
+
+
+ifeq ($(SYSTEM_JPEG),YES)
+
+define gb_LinkTarget__use_jpeg
+$(call gb_LinkTarget_add_libs,$(1),-ljpeg)
+$(call gb_LinkTarget_set_ldflags,$(1),\
+ $$(filter-out -L/usr/lib/jvm%,$$(LDFLAGS)) \
+)
+endef
+
+else # !SYSTEM_JPEG
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ jpeglib \
+))
+
+define gb_LinkTarget__use_jpeg
+$(call gb_LinkTarget_add_linked_static_libs,$(1),\
+ jpeglib \
+)
+endef
+
+endif # SYSTEM_JPEG
+
+
+ifeq ($(SYSTEM_EXPAT),YES)
+
+define gb_LinkTarget__use_expat
+$(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter))
+
+$(call gb_LinkTarget_set_defs,$(1),\
+ $$(DEFS) \
+ -DSYSTEM_EXPAT \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),-lexpat)
+endef
+
+else # !SYSTEM_EXPAT
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ ascii_expat_xmlparse \
+ expat_xmlparse \
+ expat_xmltok \
+))
+
+define gb_LinkTarget__use_expat
+$(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter))
+
+$(if $(filter-out ascii_expat_xmlparse,$(2)),\
+ $(call gb_LinkTarget_set_defs,$(1),\
+ $$(DEFS) \
+ -DXML_UNICODE \
+))
+
+$(call gb_LinkTarget_add_linked_static_libs,$(1),\
+ $(2) \
+ expat_xmltok \
+)
+endef
+
+endif # SYSTEM_EXPAT
+
+# now define 2 wrappers that select which internal static library to use...
+define gb_LinkTarget__use_expat_utf8
+$(call gb_LinkTarget__use_expat,$(1),ascii_expat_xmlparse)
+endef
+
+define gb_LinkTarget__use_expat_utf16
+$(call gb_LinkTarget__use_expat,$(1),expat_xmlparse)
+endef
+
+
+ifeq ($(SYSTEM_LIBXML),YES)
+
+define gb_LinkTarget__use_libxml2
+$(call gb_LinkTarget_set_defs,$(1),\
+ $$(DEFS) \
+ -DSYSTEM_LIBXML \
+)
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(LIBXML_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
+endef
+
+else # !SYSTEM_LIBXML
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_URE, \
+ xml2 \
+))
+
+define gb_LinkTarget__use_libxml2
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ xml2 \
+)
+endef
+
+endif # SYSTEM_LIBXML
+
+
+ifeq ($(SYSTEM_LIBXSLT),YES)
+
+define gb_LinkTarget__use_libxslt
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(LIBXSLT_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
+endef
+
+else # !SYSTEM_LIBXSLT
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ xslt \
+))
+
+define gb_LinkTarget__use_libxslt
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ xslt \
+)
+endef
+
+endif # SYSTEM_LIBXSLT
+
+
+ifeq ($(SYSTEM_REDLAND),YES)
+
+define gb_LinkTarget__use_librdf
+$(call gb_LinkTarget_set_defs,$(1),\
+ $$(DEFS) \
+ -DSYSTEM_REDLAND \
+)
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(REDLAND_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
+endef
+
+else # !SYSTEM_REDLAND
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ rdf \
+))
+
+define gb_LinkTarget__use_librdf
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ rdf \
+)
+endef
+
+endif # SYSTEM_REDLAND
+
+
+ifeq ($(SYSTEM_CAIRO),YES)
+
+# FREETYPE_CLAGS from environment if ENABLE_CAIRO is used
+define gb_LinkTarget__use_cairo
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(FREETYPE_CFLAGS) \
+ $(CAIRO_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
+endef
+
+else # !SYSTEM_CAIRO
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ cairo \
+))
+ifneq ($(OS),WNT)
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ pixman-1 \
+))
+endif # WNT
+
+define gb_LinkTarget__use_cairo
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/cairo \
+ $(FREETYPE_CFLAGS) \
+)
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ cairo \
+)
+ifneq ($(OS),WNT)
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ pixman-1 \
+)
+endif
+endef
+
+endif # SYSTEM_CAIRO
+
+
+ifeq ($(SYSTEM_ICU),YES)
+
+define gb_LinkTarget__use_icuuc
+$(call gb_LinkTarget_add_libs,$(1),-licuuc)
+endef
+
+else # !SYSTEM_ICU
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ icuuc \
+))
+
+define gb_LinkTarget__use_icuuc
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ icuuc \
+)
+endef
+
+endif # SYSTEM_ICU
+
+# vim: set noet sw=4 ts=4:
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 7286f27..fa3eb27 100755
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -184,25 +184,4 @@ ifeq ($(USE_SYSTEM_STL),YES)
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
endif
-ifeq ($(SYSTEM_LIBXML),YES)
-gb_Library_TARGETS := $(filter-out xml2,$(gb_Library_TARGETS))
-endif
-
-ifeq ($(SYSTEM_LIBXSLT),YES)
-gb_Library_TARGETS := $(filter-out xslt,$(gb_Library_TARGETS))
-endif
-
-ifeq ($(SYSTEM_REDLAND),YES)
-gb_Library_TARGETS := $(filter-out rdf,$(gb_Library_TARGETS))
-endif
-
-ifeq ($(SYSTEM_ICU),YES)
-gb_Library_TARGETS := $(filter-out icuuc,$(gb_Library_TARGETS))
-endif
-
-ifeq ($(SYSTEM_CAIRO),YES)
-gb_Library_TARGETS := $(filter-out cairo,$(gb_Library_TARGETS))
-gb_Library_TARGETS := $(filter-out pixman-1,$(gb_Library_TARGETS))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 43b4f4f..2bc0a52 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -277,20 +277,16 @@ gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
endif
gb_Library_PLAINLIBS_NONE += \
- cairo \
fontconfig \
Xrender \
- pixman-1 \
dl \
freetype \
- jpeg \
m \
pthread \
X11 \
Xext \
SM \
ICE \
- z
gb_Library_FILENAMES := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 5100d17..7b325a0 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -325,10 +325,8 @@ gb_Library__FRAMEWORKS := \
gb_Library_PLAINLIBS_NONE += \
Cocoa \
objc \
- jpeg \
m \
pthread \
- z \
gb_Library_FILENAMES := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 98a7b81..0ba0d00 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -260,13 +260,11 @@ gb_Library_PLAINLIBS_NONE += \
$(gb_STDLIBS) \
dl \
freetype \
- jpeg \
pthread \
X11 \
Xext \
SM \
ICE \
- z
gb_Library_FILENAMES := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 320dc11..52b9ed0 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -449,7 +449,6 @@ gb_Library_PLAINEXT := .lib
gb_Library_PLAINLIBS_NONE += \
advapi32 \
- cairo \
d3d9 \
d3dx \
ddraw \
@@ -471,7 +470,6 @@ gb_Library_PLAINLIBS_NONE += \
uwinapi \
winmm \
winspool \
- z \
gb_Library_LAYER := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 5f4ac60..7c00399 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -471,7 +471,6 @@ gb_Library_PLAINLIBS_NONE += \
$(gb_MINGW_LIBSTDCPP) \
$(gb_MINGW_LIBGCC) \
advapi32 \
- cairo \
d3d9 \
d3dx \
ddraw \
@@ -489,7 +488,6 @@ gb_Library_PLAINLIBS_NONE += \
uuid \
uwinapi \
winmm \
- z \
gb_Library_LAYER := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
commit ff2ba721cebcab8e3d2c25854dcb0711589458cf
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:49:35 2011 +0000
gnumake4: #i117610#: gbuild: more convenient handling for external libs: [hg:ee31ca60454d]
add local variable LIBS to LinkTarget, which is given verbatim to the linker.
add gb_LinkTarget_use_external, with forwards for Library etc.
for actual definitions of externals read in optional RepositoryExternal.mk.
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index c44ad59..253d3b9 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -90,6 +90,8 @@ $(eval $(foreach method,\
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
+ use_external \
+ use_externals \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index a1cf1c3..d90a14c 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -81,6 +81,8 @@ $(eval $(foreach method,\
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
+ use_external \
+ use_externals \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index c62825d..310fa1c 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -99,6 +99,7 @@ gb_Helper_REPOSITORYNAMES += $(1)
endef
+# RepositoryExternal.mk is optional
define gb_Helper_add_repository
gb_Helper_CURRENTREPOSITORY :=
include $(1)/Repository.mk
@@ -106,6 +107,7 @@ ifeq ($$(gb_Helper_CURRENTREPOSITORY),)
$$(eval $$(call gb_Output_error,No call to gb_Helper_register_repository in Repository.mk for repository $(1)))
endif
$$(gb_Helper_CURRENTREPOSITORY) := $(1)
+-include $(1)/RepositoryExternal.mk
endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 9efdea7..357e7b6 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -124,6 +124,8 @@ $(eval $(foreach method,\
set_library_path_flags \
add_linked_libs \
add_linked_static_libs \
+ use_external \
+ use_externals \
add_package_headers \
add_sdi_headers \
add_precompiled_header \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index cdde6ab..f36aa52 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -356,6 +356,7 @@ $(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_
$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS :=
+$(call gb_LinkTarget_get_target,$(1)) : LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE :=
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME :=
@@ -451,6 +452,10 @@ define gb_LinkTarget_set_ldflags
$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $(2)
endef
+define gb_LinkTarget_add_libs
+$(call gb_LinkTarget_get_target,$(1)) : LIBS += $(2)
+endef
+
define gb_LinkTarget_add_linked_libs
ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2)))
$$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Library_KNOWNLIBS)),ALL))
@@ -639,4 +644,17 @@ endif
endef
+# this forwards to functions that must be defined in RepositoryExternal.mk.
+# $(call gb_LinkTarget_use_external,library,external)
+define gb_LinkTarget_use_external
+$(eval $(if $(value gb_LinkTarget__use_$(2)),\
+ $(call gb_LinkTarget__use_$(2),$(1)),\
+ $(error gb_LinkTarget_use_external: unknown external: $(2))))
+endef
+
+# $(call gb_LinkTarget_use_externals,library,externals)
+gb_LinkTarget_use_externals = \
+ $(foreach external,$(2),$(call gb_LinkTarget_use_external,$(1),$(external)))
+
+
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 9268951..43b4f4f 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -233,6 +233,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+ $(LIBS) \
-o $(1))
endef
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index dfa6d9a..5100d17 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -269,6 +269,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
+ $(LIBS) \
-o $(1) \
`cat $${DYLIB_FILE}` && \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),\
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 6e7129e..98a7b81 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -209,6 +209,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
+ $(LIBS) \
-o $(1))
endef
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index f42e500..320dc11 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -432,6 +432,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
@$${RESPONSEFILE} \
$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
+ $(LIBS) \
$(if $(DLLTARGET),-out:$(DLLTARGET) -implib:$(1),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \
$(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) ; exit $$RC)
endef
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index dfe7ade..5f4ac60 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -405,6 +405,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
@$${RESPONSEFILE} \
--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+ $(LIBS) \
$(MINGW_CLIB_DIR)/crtend.o \
-Map $(basename $(1)).map \
-o $(1))
@@ -428,6 +429,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
@$${RESPONSEFILE} \
--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) --end-group \
--start-group $(patsubst %.dll,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_dllname,$(lib)))) --end-group \
+ $(LIBS) \
$(MINGW_CLIB_DIR)/crtend.o \
-Map $(basename $(DLLTARGET)).map \
-o $(DLLTARGET) && touch $(1))
commit 5fdc44efd45592a03e3b2acc6f5752412ee2b4f8
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:47:04 2011 +0000
gnumake4: #i117340#: JavaClassSet: replace broken multi-repo support [hg:3c843d4c457b]
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 4cb7ecf..7e6a222 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -81,7 +81,7 @@ $(call gb_Jar_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH)
$(call gb_Jar_get_target,$(1)) : MANIFEST :=
$(call gb_Jar_get_target,$(1)) : JARCLASSPATH :=
$(call gb_Jar_get_target,$(1)) : PACKAGEROOTS :=
-$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)))
+$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2))
$(eval $(call gb_Module_register_target,$(call gb_Jar_get_final_target,$(1)),$(call gb_Jar_get_clean_target,$(1))))
$(call gb_Deliver_add_deliverable,$(call gb_Jar_get_outdir_target,$(1)),$(call gb_Jar_get_target,$(1)))
$(call gb_Jar_get_outdir_target,$(1)) : $(call gb_Jar_get_target,$(1))
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 3c1ddb3..d3e8d58 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -38,37 +38,32 @@ $(call gb_Helper_abbreviate_dirs_native,\
endef
-define gb_JavaClassSet__rules
-$$(call gb_JavaClassSet_get_repo_target,$(1),%) :
- $$(call gb_JavaClassSet__command,$$@,$$*,$$?,$$^)
+$(call gb_JavaClassSet_get_clean_target,%) : vaClassSet_get_target,%) :
+ $(call gb_Output_announce,$*,$(true),JCS,3)
+ $(call gb_JavaClassSet__command,$@,$*,$?,$^)
-$$(call gb_JavaClassSet_get_target,%) : $$(call gb_JavaClassSet_get_repo_target,$(1),%)
- $$(call gb_Output_announce,$$*,$$(true),JCS,3)
- $$(call gb_Helper_abbreviate_dirs,\
- touch $$@)
-
-endef
-
-$(call gb_JavaClassSet_get_clean_target,%) :
- $(call gb_Output_announce,$*,$(false),JCS,3)
+$(call gb_Output_announce,$*,$(false),JCS,3)
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_JavaClassSet_get_target,$*)))
-$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),$(eval $(call gb_JavaClassSet__rules,$(reponame))))
-
# no initialization of scoped variable CLASSPATH as it is "inherited" from controlling instance (e.g. JUnitTest, Jar)
+# UGLY: cannot use target local variable for REPO because it's needed in prereq
define gb_JavaClassSet_JavaClassSet
$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS :=
+$(if $(filter $(2),$(gb_JavaClassSet_REPOSITORYNAMES)),,\
+ $(error JavaClassSet: no or invalid repository given; known repositories: \
+ $(gb_JavaClassSet_REPOSITORYNAMES)))
+gb_JavaClassSet_REPO_$(1) := $(2)
+$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS :=
endef
define gb_JavaClassSet__get_sourcefile
-$(1)/$(2).java
+$($(1))/$(2).java
endef
define gb_JavaClassSet_add_sourcefile
-$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),\
- $(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : $(call gb_JavaClassSet__get_sourcefile,$($(reponame)),$(2))))
-
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : \
+ $(call gb_JavaClassSet__get_sourcefile,$(gb_JavaClassSet_REPO_$(1)),$(2)))
endef
define gb_JavaClassSet_add_sourcefiles
@@ -84,9 +79,8 @@ endef
# problem: currently we can't get these dependencies to work
# build order dependency is a hack to get these prerequisites out of the way in the build command
define gb_JavaClassSet_add_jar
-$(foreach reponame,$(gb_JavaClassSet_REPOSITORYNAMES),\
-$(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : $(2))
-$(eval $(call gb_JavaClassSet_get_repo_target,$(reponame),$(1)) : JARDEPS += $(2)))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2))
+$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2))
endef
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 4b6fe5e..5c84726 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -54,7 +54,7 @@ $(call gb_JunitTest_get_target,$(1)) : CLASSPATH := $(value XCLASSPATH)$(gb_CLAS
$(call gb_JunitTest_get_target,$(1)) : CLASSES :=
$(call gb_JunitTest_JunitTest_platform,$(1))
-$(call gb_JavaClassSet_JavaClassSet,$(call gb_JunitTest_get_classsetname,$(1)))
+$(call gb_JavaClassSet_JavaClassSet,$(call gb_JunitTest_get_classsetname,$(1)),$(2))
$(call gb_JunitTest_get_target,$(1)) : $(call gb_JavaClassSet_get_target,$(call gb_JunitTest_get_classsetname,$(1)))
$(eval $(call gb_Module_register_target,$(call gb_JunitTest_get_target,$(1)),$(call gb_JunitTest_get_clean_target,$(1))))
endef
commit b5facbb99109d51ae29fae3760e85c6ebe2829d0
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:47:04 2011 +0000
gnumake4: configure.in: require Info-ZIP 3.0 [hg:ce56f9735b9c]
diff --git a/configure.in b/configure.in
index 3a8b466..641d511 100644
--- a/configure.in
+++ b/configure.in
@@ -5480,6 +5480,9 @@ dnl ===================================================================
if test -z "$ZIP" -o -z "$UNZIP"; then
AC_MSG_ERROR([Zip/Unzip are required to build, please install or use --with-zip-home],,)
fi
+if "$ZIP" -FS < /dev/null 2>&1 | $EGREP "no such option: S" > /dev/null; then
+ AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,)
+fi
dnl ===================================================================
dnl Zip must be a specific type for different build types.
commit f955d09a76d996c381e0ba0c58e09798a29af71a
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:47:04 2011 +0000
gnumake4: configure.in: remove checks for obsolete Solaris 2.[67] [hg:e37d17b6d8d9]
diff --git a/configure.in b/configure.in
index 010704c..3a8b466 100644
--- a/configure.in
+++ b/configure.in
@@ -2300,107 +2300,6 @@ AC_LANG_POP([C++])
EXCEPTIONS="$exceptions_type"
AC_SUBST(EXCEPTIONS)
-dnl **************************************************************
-dnl Testing for required Solaris and SunStudio compiler patches...
-dnl **************************************************************
-dnl Check whether the OS is SunOS.
-if test "$_os" = "SunOS"; then
- _temp=`showrev -p | $AWK -F" " '{ print $2 }'`
- if test "$_os_release" = "7"; then
- dnl ***************
- dnl patch 106327-06
- dnl ***************
- AC_MSG_CHECKING([for patch 106327-06 or greater])
- _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'`
- _patch="false"
- for i in $_temp
- do
- _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
- if test "$_patch_major" = "106327"; then
- _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
- if test "$_patch_rev" -ge "6"; then
- _patch="found"
- fi
- fi
- done
- if test "$_patch" = "found"; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_WARN([patch 106327-06 not found, please install compiler patch 106327-06 or greater])
- echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn
- fi
- dnl ***************
- dnl patch 106950-11
- dnl ***************
- AC_MSG_CHECKING([for patch 106950-11 or greater])
- _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'`
- _patch="false"
- for i in $_temp
- do
- _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
- if test "$_patch_major" = "106950"; then
- _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
- if test "$_patch_rev" -ge "11"; then
- _patch="found"
- fi
- fi
- done
- if test "$_patch" = "found"; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_WARN([patch 106950-11 not found, please install linker patch 106950-11 or greater])
- echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn
- fi
- else
- if test "$_os_release" = "6"; then
- dnl ***************
- dnl patch 105591-09
- dnl ***************
- AC_MSG_CHECKING([for patch 105591-09 or greater])
- _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'`
- _patch="false"
- for i in $_temp
- do
- _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
- if test "$_patch_major" = "105591"; then
- _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
- if test "$_patch_rev" -ge "9"; then
- _patch="found"
- fi
- fi
- done
- if test "$_patch" = "found"; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_WARN([patch 105591-09 not found, please install compiler patch 105591-09 or greater])
- echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn
- fi
- dnl ***************
- dnl patch 107733-08
- dnl ***************
- AC_MSG_CHECKING([for patch 107733-08 or greater])
- _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'`
- _patch="false"
- for i in $_temp
- do
- _patch_major=`echo $i | $AWK -F"-" '{ print $1 }'`
- if test "$_patch_major" = "107733"; then
- _patch_rev=`echo $i | $AWK -F"-" '{ print $2 }'`
- if test "$_patch_rev" -ge "8"; then
- _patch="found"
- fi
- fi
- done
- if test "$_patch" = "found"; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_WARN([patch 107733-06 not found, please install linker patch 107733-08 or greater])
- echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn
- fi
- fi
- fi
-fi
-
dnl ===================================================================
dnl Checks for what the default STL should be
dnl ===================================================================
commit e1254058d54f62f76c2ff863fe31b988a3fc7402
Author: Michael Stahl <mst at openoffice.org>
Date: Fri Apr 1 20:47:04 2011 +0000
gnumake4: #i117350# configure.in: s/MINGSTRIP/MINGWSTRIP/ [hg:82fc045a63a6]
diff --git a/configure.in b/configure.in
index 10dcbb3..010704c 100644
--- a/configure.in
+++ b/configure.in
@@ -3505,7 +3505,7 @@ if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
AC_MSG_RESULT(yes)
fi
if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
- if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
+ if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGWSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
else
AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false)
fi
More information about the Libreoffice-commits
mailing list