[X2Go-Commits] [x2goclient] 01/01: Makefile: turns out the only somewhat portable way to do something like this is via shell hackery.

git-admin at x2go.org git-admin at x2go.org
Sun Aug 20 08:20:35 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit cedf870d96d6fab29328ed26f4bd967b8c99d0ef
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun Aug 20 08:20:00 2017 +0200

    Makefile: turns out the only somewhat portable way to do something like this is via shell hackery.
---
 Makefile         | 6 ++----
 debian/changelog | 2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 55add75..c57422f 100755
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,6 @@ MOZPLUGDIR=$(PREFIX)/lib/mozilla/plugins
 QMAKE_BINARY=qmake-qt4
 LRELEASE_BINARY=lrelease-qt4
 QMAKE_OPTS=
-QMAKE_CFLAGS=$(CPPFLAGS) $(CFLAGS)
-QMAKE_CXXFLAGS=$(CPPFLAGS) $(CXXFLAGS)
 
 LDFLAGS+=-lldap -lcups -lX11 -lXpm
 
@@ -40,12 +38,12 @@ build: build_man build_pluginprovider
 
 build_client:
 	$(LRELEASE_BINARY) x2goclient.pro
-	mkdir -p $(CLIENT_DIR) && cd $(CLIENT_DIR) && $(QMAKE_BINARY) QMAKE_CFLAGS="${QMAKE_CFLAGS}" QMAKE_CXXFLAGS="${QMAKE_CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" $(QMAKE_OPTS) ../x2goclient.pro
+	mkdir -p $(CLIENT_DIR) && cd $(CLIENT_DIR) && { tmp_cppflags="${CPPFLAGS}"; tmp_cppflags="$${tmp_cppflags:+$${tmp_cppflags} }"; tmp_cflags="$${tmp_cppflags}$(CFLAGS)"; tmp_cxxflags="$${tmp_cppflags}$(CXXFLAGS)"; $(QMAKE_BINARY) QMAKE_CFLAGS="$${tmp_cflags}" QMAKE_CXXFLAGS="$${tmp_cxxflags}" QMAKE_LFLAGS="${LDFLAGS}" $(QMAKE_OPTS) ../x2goclient.pro ; }
 	cd $(CLIENT_DIR) && $(MAKE)
 
 build_plugin:
 	$(LRELEASE_BINARY) x2goclient.pro
-	mkdir -p $(PLUGIN_DIR) && cd $(PLUGIN_DIR) && X2GO_CLIENT_TARGET=plugin $(QMAKE_BINARY) QMAKE_CFLAGS="${QMAKE_CFLAGS}" QMAKE_CXXFLAGS="${QMAKE_CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" $(QMAKE_OPTS) ../x2goclient.pro
+	mkdir -p $(PLUGIN_DIR) && cd $(PLUGIN_DIR) && { tmp_cppflags="${CPPFLAGS}"; tmp_cppflags="$${tmp_cppflags:+$${tmp_cppflags} }"; tmp_cflags="$${tmp_cppflags}$(CFLAGS)"; tmp_cxxflags="$${tmp_cppflags}$(CXXFLAGS)"; X2GO_CLIENT_TARGET=plugin $(QMAKE_BINARY) QMAKE_CFLAGS="$${tmp_cflags}" QMAKE_CXXFLAGS="$${tmp_cxxflags}" QMAKE_LFLAGS="${LDFLAGS}" $(QMAKE_OPTS) ../x2goclient.pro ; }
 	cd $(PLUGIN_DIR) && $(MAKE)
 
 build_pluginprovider:
diff --git a/debian/changelog b/debian/changelog
index 31bdab8..46da89c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -171,6 +171,8 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
     - Makefile: qmake seems to act weird if QMAKE_C(XX)FLAGS starts with a
       space followed by additional non-whitespace characters. Refactor the
       variables a bit to work around this issue.
+    - Makefile: turns out the only somewhat portable way to do something like
+      this is via shell hackery.
   * x2goclient.spec:
     - Respect %{optflags} and pass QMAKE_STRIP=: to fix missing debug info
       issues.

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list