[X2Go-Commits] [x2goclient] 01/03: Makefile: support version switching through a QT_VERSION variable - might be overridden via environment variables or the make call.

git-admin at x2go.org git-admin at x2go.org
Wed May 12 23:07:14 CEST 2021


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

x2go pushed a commit to branch master
in repository x2goclient.

commit d532f77f0c5cdbaf67f477e408ce177db21824ea
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed May 12 22:17:14 2021 +0200

    Makefile: support version switching through a QT_VERSION variable - might be overridden via environment variables or the make call.
---
 Makefile         | 17 +++++++++++++++--
 debian/changelog |  2 ++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 0654f1d..bac0109 100755
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,10 @@ CLIENT_BINARY=$(CLIENT_DIR)/x2goclient
 
 SHELL=/bin/bash
 
+# Default to Qt 4.
+# We'll change this to Qt 5 as soon as Qt-4-based platforms go EOL.
+QT_VERSION ?= 4
+
 INSTALL_DIR=install -d -o root -g root -m 755
 INSTALL_FILE=install -o root -g root -m 644
 INSTALL_SYMLINK=ln -s -f
@@ -20,8 +24,17 @@ ETCDIR=/etc/x2go
 BINDIR=$(PREFIX)/bin
 SHAREDIR=$(PREFIX)/share
 MANDIR=$(SHAREDIR)/man
-QMAKE_BINARY=qmake-qt4
-LRELEASE_BINARY=lrelease-qt4
+ifeq ($(QT_VERSION),4)
+  QMAKE_BINARY := qmake-qt4
+  LRELEASE_BINARY := lrelease-qt4
+else
+  ifeq ($(QT_VERSION),5)
+    QMAKE_BINARY := qmake
+    LRELEASE_BINARY := lrelease
+  else
+    $(error Unsupported Qt version "$(QT_VERSION)" passed.)
+  endif
+endif
 QMAKE_OPTS=
 
 LDFLAGS=
diff --git a/debian/changelog b/debian/changelog
index 682bf1e..dc5df05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,8 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
     - src/sshmasterconnection.{c,h}: fix builds, new function should have been
       registered and not static, but private.
     - .gitignore: add debian/control, since it's now auto-generated.
+    - Makefile: support version switching through a QT_VERSION variable -
+      might be overridden via environment variables or the make call.
   * debian/control:
     + Move to debian/control.in.
   * debian/control.in:

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list