lkml.org 
[lkml]   [2010]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHi v3] kconfig qconf: port to QT4
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


\
 
 \ /
  Last update: 2010-08-02 23:31    [W:0.164 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site