[X2Go-Commits] [x2goadmincenter] 02/03: x2goadmincenter/Makefile: make sure we don't pass random variables down to sub make calls.

git-admin at x2go.org git-admin at x2go.org
Sun Aug 20 14:03:29 CEST 2017


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

x2go pushed a commit to branch master
in repository x2goadmincenter.

commit bf3346d50af044646f47b12053c1b849c64fe16a
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun Aug 20 14:01:00 2017 +0200

    x2goadmincenter/Makefile: make sure we don't pass random variables down to sub make calls.
    
    Backported from X2Go Client.
---
 debian/changelog         |  2 ++
 x2goadmincenter/Makefile | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ac24ac2..3414e6e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -77,6 +77,8 @@ x2goadmincenter (0.0.0.1-0x2go1) UNRELEASED; urgency=low
     - Change string "X2go" to "X2Go" where appropriate.
     - x2goadmincenter/Makefile: add QMAKE_OPTS variable to be able to pass
       additional arguments to qmake.
+    - x2goadmincenter/Makefile: make sure we don't pass random variables down
+      to sub make calls. Backported from X2Go Client.
   * debian/control:
     - Maintainer change in package: X2Go Developers <x2go-dev at lists.x2go.org>.
     - Uploaders: add myself. Also, force a rebuild due to the changed
diff --git a/x2goadmincenter/Makefile b/x2goadmincenter/Makefile
index 6bd99c7..0a9fb30 100755
--- a/x2goadmincenter/Makefile
+++ b/x2goadmincenter/Makefile
@@ -24,6 +24,40 @@ QMAKE_BINARY=qmake-qt4
 LRELEASE_BINARY=lrelease-qt4
 QMAKE_OPTS=
 
+
+#####################################################################
+# Make sure that variables passed via the command line are not
+# automatically exported.
+#
+# By default, such variables are exported and passed on to child
+# (make) processes, which means that we will run into trouble if we
+# pass CXXFLAGS="some value" as an argument to the top-level
+# make call. Whatever qmake generates will be overridden by this
+# definition, leading to build failures (since the code expects
+# macro values to be set in some cases - which won't be the case
+# for "generic" CXXFLAGS values.)
+#
+# Doing that turns out to be somewhat difficult, though.
+#
+# While preventing make from passing down *options* is possible via
+# giving the new make call an empty MAKEFLAGS value and even though
+# variables defined on the command line are part of MAKEFLAGS, this
+# doesn't affect implicit exporting of variables (for most
+# implementations.)
+#
+# Even worse, the correct way to this stuff differs from make
+# implementation to make implementation.
+
+# GNU make way.
+MAKEOVERRIDES=
+
+# FreeBSD and NetBSD way.
+.MAKEOVERRIDES=
+
+# OpenBSD way.
+.MAKEFLAGS=
+
+
 all: build
 
 build: build-arch build-indep

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


More information about the x2go-commits mailing list