From patchwork Sat Jul 2 01:47:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 939762 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p621mjOu003740 for ; Sat, 2 Jul 2011 01:48:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899Ab1GBBr7 (ORCPT ); Fri, 1 Jul 2011 21:47:59 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:41010 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753119Ab1GBBr6 (ORCPT ); Fri, 1 Jul 2011 21:47:58 -0400 Received: by mail-iy0-f174.google.com with SMTP id 12so3223102iyb.19 for ; Fri, 01 Jul 2011 18:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=uKhwA4hsec7VyZ1BA3ZlG11QIKwQ4cGpJCYiv6eTR3o=; b=KCfu6aacIzVW3JhavE/JN7SGuSk2uAWOGpWGJvxFbRbDWNS0SiCh0M5ct1Gy3eBJRA Ttv8DSFF61KI9tljK7aupxCnBxUdNL1LlHbkNqT4XGDO0LmqBnbLZxvwYScLHok1G8qi hXdbNCiiU6c2gZKrXx/Z6OBD83UpKGzNvYTj4= Received: by 10.42.170.129 with SMTP id f1mr3780127icz.190.1309571278242; Fri, 01 Jul 2011 18:47:58 -0700 (PDT) Received: from localhost.localdomain (69-165-144-226.dsl.teksavvy.com [69.165.144.226]) by mx.google.com with ESMTPS id d8sm3918766icy.21.2011.07.01.18.47.56 (version=SSLv3 cipher=OTHER); Fri, 01 Jul 2011 18:47:57 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Marek Cc: Arnaud Lacombe Subject: [RFC 5/7] kconfig: move GTK checks to `scripts/kconfig/check.sh' Date: Fri, 1 Jul 2011 21:47:37 -0400 Message-Id: <1309571259-15241-6-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty In-Reply-To: <1309571259-15241-1-git-send-email-lacombar@gmail.com> References: <1307387767-9237-1-git-send-email-lacombar@gmail.com> <1309571259-15241-1-git-send-email-lacombar@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 02 Jul 2011 01:48:45 +0000 (UTC) --- scripts/kconfig/Makefile | 39 +++++---------------------------------- scripts/kconfig/check.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index a3176dc..5021817 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -174,7 +174,7 @@ qconf-objs := zconf.tab.o gconf-objs := gconf.o zconf.tab.o frontends-objs := $(conf-objs) $(mconf-objs) $(nconf-objs) -frontends-objs += $(qconf-cxxobjs) +frontends-objs += $(qconf-cxxobjs) $(gconf-objs) hostprogs-y := @@ -198,18 +198,15 @@ ifeq ($(MAKECMDGOALS),xconfig) hostprogs-y += qconf KC_CHECK += qt endif -ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 -endif - -ifeq ($(gconf-target),1) +ifeq ($(MAKECMDGOALS),gconfig) hostprogs-y += gconf + KC_CHECK += gtk endif hostprogs-y += conf -clean-files := qconf.moc .tmp_gtkcheck .tmp_check +clean-files := qconf.moc .tmp_check clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h clean-files += mconf qconf gconf nconf clean-files += config.pot linux.pot @@ -226,38 +223,12 @@ always := dochecklxdialog HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src) -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ - -Wno-missing-prototypes +HOSTCFLAGS_gconf.o = -Wno-missing-prototypes HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses -$(obj)/gconf.o: $(obj)/.tmp_gtkcheck - -ifeq ($(gconf-target),1) --include $(obj)/.tmp_gtkcheck - -# GTK needs some extra effort, too... -$(obj)/.tmp_gtkcheck: - @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ - if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ - touch $@; \ - else \ - echo "*"; \ - echo "* GTK+ is present but version >= 2.0.0 is required."; \ - echo "*"; \ - false; \ - fi \ - else \ - echo "*"; \ - echo "* Unable to find the GTK+ installation. Please make sure that"; \ - echo "* the GTK+ 2.0 development package is correctly installed..."; \ - echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ - echo "*"; \ - false; \ - fi need-check := $(addprefix $(obj)/,$(frontends-objs)) diff --git a/scripts/kconfig/check.sh b/scripts/kconfig/check.sh index 47abde4..4456d63 100755 --- a/scripts/kconfig/check.sh +++ b/scripts/kconfig/check.sh @@ -19,6 +19,34 @@ check_gettext() } } +check_gtk() +{ + local cflags="" + local libs="" + + if pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0; then + if ! pkg-config --atleast-version=2.0.0 gtk+-2.0; then + echo "*" + echo "* GTK+ is present but version >= 2.0.0 is required." + echo "*" + false + fi + else + echo "*" + echo "* Unable to find the GTK+ installation. Please make sure that" + echo "* the GTK+ 2.0 development package is correctly installed..." + echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0." + echo "*" + false + fi + + cflags="$(pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0)" + libs="$(pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0)" + + echo "HOSTCFLAGS_gconf.o += $cflags" >> ${obj}/.tmp_check + echo "HOSTLOADLIBES_gconf += $libs" >> ${obj}/.tmp_check +} + check_qt() { local cflags="" @@ -85,6 +113,7 @@ rm -f ${obj}/.tmp_check for arg in $*; do case $arg in gettext) ;; + gtk) ;; qt) ;; *) echo " *"