public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: linux-kbuild@vger.kernel.org,
	Roman Zippel <zippel@linux-m68k.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHi v3] kconfig qconf: port to QT4
Date: Mon, 02 Aug 2010 23:29:32 +0200	[thread overview]
Message-ID: <4C5738BC.4040608@suse.cz> (raw)
In-Reply-To: <1280488517-30116-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de>

On 30.7.2010 13:15, Alexander Stein wrote:
> A straight forward port to QT4 using qt3to4 and compiling against
>   qt3support
> 
> * rewritten makefile rules to detect QT4 by using qmake which is hopefully
>   portable enough

You are using pkg-config now.


> * If no QT4, QT3 will by tried instead
> * Classes renamed using qt3to4
>   * If build using QT3 renamed to QT3 class names using defines
> * ConfigInfoView::menu has to be renamed as QT4 moc strips struct from
>   struct menu and creates a name conflict
> * QT2 support has been dropped
> * The hidden options inserted in 39a4897c1bb66e8a36043c105d7fd73d8b32b480
>   are use in native API
> 
> Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
> ---
> Changes in v2:
> * Use QT3 as fallback if no QT4 is available
> * Rename class names using defines for QT3
> 
> Changes in v3:
> * based on git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
>   kconfig branch

Thanks, that makes my life easier.


> * Proper support for hidden options from 39a4897c1bb
> * slightly rework Makefile detection to use pkg-config for QT4 detection
> * Removed USE_QT3 usage, use QT_VERSION instead
> * Drop QT2 support
> 
> Michael,
> 
> i kept using Q3Foo classes and redefine them to QFoo instead of the other way
> around, as defining QFoo to Q3Foo doesn't work here.

OK.


>  scripts/kconfig/Makefile |   77 +++++++++++++---------
>  scripts/kconfig/qconf.cc |  162 +++++++++++++++++++++++++---------------------
>  scripts/kconfig/qconf.h  |   76 ++++++++++-----------
>  3 files changed, 169 insertions(+), 146 deletions(-)
> 
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index f8d1ee3..a203a90 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -233,40 +233,51 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
>  # QT needs some extra effort...
>  $(obj)/.tmp_qtcheck:
>  	@set -e; echo "  CHECK   qt"; dir=""; pkg=""; \
> -	pkg-config --exists qt 2> /dev/null && pkg=qt; \
> -	pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
> -	if [ -n "$$pkg" ]; then \
> -	  cflags="\$$(shell pkg-config $$pkg --cflags)"; \
> -	  libs="\$$(shell pkg-config $$pkg --libs)"; \
> -	  moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
> -	  dir="$$(pkg-config $$pkg --variable=prefix)"; \
> +	pkg-config --exists QtCore 2> /dev/null; \
> +	if [ ! $? ]; then \

A couple of issues here: 1) The script is running under set -e, so if
there is no Qt4, it will exit right away. 2) The '$?' is interpreted by
make, you need to say '$$?' if you want the shell see '$?'. Last but not
least, there is no C-style arithmetics in the [ builtin, [ ! 0 ] and [ !
1 ] will both evaluate to failure. You probably meant [ $$? -ne 0 ], but
it still wouldn't work because of 1). Just use

  if ! pkg-config --exists QtCore 2> /dev/null; then
    ... qt 3 ...
  else
    ... qt 4 ...
  fi

When I fix it manually, it works OK both under Qt4 and Qt3, which is
great, but please submit a patch that you tested yourself. If you're
quick (but not too quick to omit testing), I'll push it in this merge
window.

thanks,
Michal

  parent reply	other threads:[~2010-08-02 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1275846668-17863-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de>
2010-06-07 12:45 ` [PATCH] kconfig qconf: port to QT4 Michal Marek
2010-06-07 17:12   ` Alexander Stein
2010-06-07 18:01     ` Gene Heskett
2010-06-07 21:29     ` Michal Marek
2010-07-13 19:26       ` [PATCH v2] " Alexander Stein
2010-07-26 12:44         ` Michal Marek
2010-07-26 12:47           ` Michal Marek
2010-07-30 11:15           ` [PATCHi v3] " Alexander Stein
2010-08-01 14:32             ` Ed Tomlinson
2010-08-01 19:28               ` [PATCH] " Alexander Stein
2010-08-02 12:01                 ` Ed Tomlinson
2010-09-18 14:22                   ` Ed Tomlinson
2010-09-20 12:03                     ` Michal Marek
2010-09-21 17:31                     ` [PATCH 1/2] " Alexander Stein
2010-09-21 17:31                     ` [PATCH 2/2] Fix QT4 moc, cflags libs detection on dual QT3/Qt4 systems Alexander Stein
2010-08-02 21:29             ` Michal Marek [this message]
2010-08-31 15:34               ` [PATCH v4] kconfig qconf: port to QT4 Alexander Stein
2010-09-01 14:57                 ` 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=4C5738BC.4040608@suse.cz \
    --to=mmarek@suse.cz \
    --cc=alexander.stein@informatik.tu-chemnitz.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /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