linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Lippers-Hollmann <s.l-h@gmx.de>
To: Thiago Macieira <thiago.macieira@intel.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Marek <mmarek@suse.com>
Subject: Re: [PATCH 39/39] Update the buildsystem for KConfig finding Qt
Date: Fri, 16 Oct 2015 06:12:41 +0200	[thread overview]
Message-ID: <20151016061241.45c51b63@mir> (raw)
In-Reply-To: <1442946999-37018-40-git-send-email-thiago.macieira@intel.com>

Hi

On 2015-09-22, Thiago Macieira wrote:
> The buildsystem will now only search for Qt 4 and Qt 5. Support for Qt 2
> and 3 was dropped in the previous commits (Qt 3 was EOL'ed in 2010 or
> so...).
> 
> For Qt 5, to be future-proof with the future direction notice appearing
> in the 5.5 release, C++11 support is automatically enabled.
[...]
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
[...]
> +	@set -e; $(kecho) "  CHECK   qt"; \
> +	qtver=`qmake -query QT_VERSION` || { \
> +	    echo >&2 "*"; \
> +	    echo >&2 "* qmake failed."; \
> +	    echo >&2 "*"; \
> +	    exit 1; \
> +	}; \
[...]

"qmake -query QT_VERSION" appears to be a little fragile on Debian 
with both qt4-qmake and qt5-qmake installed, as it reports back 
"4.8.7" by default. The actual qmake is hiding behind qtchooser
(/usr/bin/qmake -> qtchooser) and will report different environments
based on the chosen personality:

$ qmake -query QT_VERSION
4.8.7

$ QT_SELECT=5 qmake -query QT_VERSION
5.4.2

While I'm not quite sure what would be the best kind of test
here (and if qtchooser can be commonly expected), the following 
might provide another approach to query the most recent installed 
qt version:

$ qtchooser --list-versions | grep ^[0-9]*$ | sort | tac | head -n1
5

(and then exporting QT_SELECT=5 to the rest of the build).

Another approach which appears to work for me (with both qt4 and qt5) 
would be this, but I'm not quite sure if this would be a good solution:

--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -227,6 +227,7 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
 # Qt needs some extra effort...
 $(obj)/.tmp_qtcheck:
 	@set -e; $(kecho) "  CHECK   qt"; \
+	QT_SELECT=5 qmake -query QT_VERSION >/dev/null 2>&1 && export QT_SELECT=5 ||: ; \
 	qtver=`qmake -query QT_VERSION` || { \
 	    echo >&2 "*"; \
 	    echo >&2 "* qmake failed."; \

Regards
	Stefan Lippers-Hollmann

  reply	other threads:[~2015-10-16  4:18 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
2015-09-22 18:36 ` [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar Thiago Macieira
2015-09-22 18:36 ` [PATCH 03/39] Port xconfig to Qt5 - Use QAction Thiago Macieira
2015-09-22 18:36 ` [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog Thiago Macieira
2015-09-22 18:36 ` [PATCH 05/39] Port xconfig to Qt5 - Use QList Thiago Macieira
2015-09-22 18:36 ` [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser Thiago Macieira
2015-09-22 18:36 ` [PATCH 07/39] Port xconfig to Qt5 - Use QMenu Thiago Macieira
2015-09-22 18:36 ` [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h> Thiago Macieira
2015-09-22 18:36 ` [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget Thiago Macieira
2015-09-22 18:36 ` [PATCH 10/39] Port xconfig to Qt5 - Fix layout Thiago Macieira
2015-09-22 18:36 ` [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin Thiago Macieira
2015-09-22 18:36 ` [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes Thiago Macieira
2015-09-22 18:36 ` [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 16/39] Port xconfig to Qt5 - update signals Thiago Macieira
2015-09-22 18:36 ` [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem Thiago Macieira
2015-09-22 18:36 ` [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation Thiago Macieira
2015-09-22 18:36 ` [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2) Thiago Macieira
2015-09-22 18:36 ` [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile Thiago Macieira
2015-09-22 18:36 ` [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names Thiago Macieira
2015-09-22 18:36 ` [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name Thiago Macieira
2015-09-22 18:36 ` [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup Thiago Macieira
2015-09-22 18:36 ` [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles Thiago Macieira
2015-09-22 18:36 ` [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list Thiago Macieira
2015-09-22 18:36 ` [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode " Thiago Macieira
2015-09-22 18:36 ` [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template Thiago Macieira
2015-09-22 18:36 ` [PATCH 28/39] Add current selection check Thiago Macieira
2015-09-22 18:36 ` [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring Thiago Macieira
2015-09-22 18:36 ` [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type Thiago Macieira
2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
2015-10-14 14:03   ` Michal Marek
2015-09-22 18:36 ` [PATCH 32/39] Port xconfig to Qt5 - Source format Thiago Macieira
2015-09-22 18:36 ` [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code Thiago Macieira
2015-09-22 18:36 ` [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing Thiago Macieira
2015-09-22 18:36 ` [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle Thiago Macieira
2015-09-22 18:36 ` [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item Thiago Macieira
2015-09-22 18:36 ` [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue Thiago Macieira
2015-09-22 18:36 ` [PATCH 38/39] Port xconfig to Qt5 - Update copyright Thiago Macieira
2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
2015-10-16  4:12   ` Stefan Lippers-Hollmann [this message]
2015-10-16  4:21     ` Stefan Lippers-Hollmann
2015-10-16  9:47     ` Michal Marek
2015-10-16 15:28     ` Thiago Macieira
2015-10-14 14:00 ` Port of [qx]config to Qt 5 Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151016061241.45c51b63@mir \
    --to=s.l-h@gmx.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=thiago.macieira@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).