lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  1 Jul 2011 21:47:37 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	Michal Marek <mmarek@...e.cz>
Cc:	Arnaud Lacombe <lacombar@...il.com>
Subject: [RFC 5/7] kconfig: move GTK checks to `scripts/kconfig/check.sh'

---
 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 "  *"
-- 
1.7.3.4.574.g608b.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ