[X2Go-Commits] [x2goclient] 01/01: Makefile: add comment explaining why we need to do this in the first place and why it's so complicated.

git-admin at x2go.org git-admin at x2go.org
Sun Aug 20 12:39:57 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 da584f03e1f949ef77eb0e753e35a77b28a5392c
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sun Aug 20 12:39:45 2017 +0200

    Makefile: add comment explaining why we need to do this in the first place and why it's so complicated.
---
 Makefile         | 33 ++++++++++++++++++++++++++++++++-
 debian/changelog |  2 ++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8805d05..a7656e2 100755
--- a/Makefile
+++ b/Makefile
@@ -30,11 +30,42 @@ QMAKE_OPTS=
 
 LDFLAGS+=-lldap -lcups -lX11 -lXpm
 
-all: build
 
+#####################################################################
+# 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_man build_pluginprovider
 	$(MAKE) build_client
 	$(MAKE) build_plugin
diff --git a/debian/changelog b/debian/changelog
index c034cbc..0b11622 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -180,6 +180,8 @@ x2goclient (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
       passed down seems to be to remove them from MAKEOVERRIDES.
       .MAKEOVERRIDES is the FreeBSD-make-equivalent variable. MAKEFLAGS has no
       effect on this behavior, so removing it again.
+    - Makefile: add comment explaining why we need to do this in the first
+      place and why it's so complicated.
   * 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