[Libreoffice-commits] .: solenv/gbuild

David Tardon dtardon at kemper.freedesktop.org
Mon Mar 21 05:37:17 PDT 2011


 solenv/gbuild/gbuild.mk |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

New commits:
commit 2cebb7028e169e3b17523af6590ce3a56e4a4ac2
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Mar 21 13:37:01 2011 +0100

    accept user-supplied CFLAGS/CXXFLAGS

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index dc80650..d9479d1 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -118,6 +118,24 @@ else
 gb_FULLDEPS := $(true)
 endif
 
+# save user-supplied flags for latter use
+ifneq ($(strip $(CFLAGS)),)
+gb__ENV_CFLAGS := $(CFLAGS)
+else
+# TODO remove after the old build system is abolished
+ifneq ($(strip $(ENVCFLAGS)),)
+gb__ENV_CFLAGS := $(ENVCFLAGS)
+endif
+endif
+ifneq ($(strip $(CXXFLAGS)),)
+gb__ENV_CXXFLAGS := $(CFLAGS)
+else
+# TODO remove after the old build system is abolished
+ifneq ($(strip $(ENVCFLAGSCXX)),)
+gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX)
+endif
+endif
+
 include $(GBUILDDIR)/Helper.mk
 include $(GBUILDDIR)/TargetLocations.mk
 
@@ -153,6 +171,14 @@ include $(foreach repo,$(gb_REPOS),$(repo)/RepositoryFixes.mk)
 
 $(eval $(call gb_Helper_collect_knownlibs))
 
+# add user-supplied flags
+ifneq ($(strip gb__ENV_CFLAGS),)
+gb_LinkTarget_CFLAGS += $(gb__ENV_CFLAGS)
+endif
+ifneq ($(strip gb__ENV_CXXFLAGS),)
+gb_LinkTarget_CXXFLAGS += $(gb__ENV_CXXFLAGS)
+endif
+
 gb_GLOBALDEFS := \
 	-D_REENTRANT \
 	-DCUI \


More information about the Libreoffice-commits mailing list