Skip to contentSkip to conversation

kconfig: Prepare for Qt based kconfig update to Qt4/Qt5

RFC PATCH In review David Graeff 2 participants 4 messages Mar 25, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover kconfig: Prepare for Qt based kconfig update to Qt4/Qt5

Hi Yann, all,

with this rfc patch set I would like to reorganize the kconfig directory structure in preparation for updating the Qt3 based flavour of kconfig to Qt4/5 and the gtk flavour (version 2->3) eventually. I renamed lxdialog to menuconfig and created subdirectories for each flavour except the line based one.

My suggestion is to add a "qconfig" target to the buildsystem for
beeing consistent with the names of the other targets where the first character provide a hint for the used toolkit. And to accommodate the fact that this frontend may also be used on non xserver machines. May feel weird to type xconfig on wayland systems. Patch 2 adds that target.

Last time (some month ago) I provided a patch-set containing all changes (buildystem+qt+gtk) at once, that didn't worked well.

All patches can also be found at [email protected]:davidgraeff/linux.git in the kconf branch
(https://github.com/davidgraeff/linux/compare/kconf).

Regards,
David

David Graeff (2):
kconfig: Move flavours into their own subdirectories.
kconfig: Add qconfig makefile target additionally to the xconfig
target

 scripts/kconfig/Makefile                           | 189 ++-------------------
 scripts/kconfig/POTFILES.in                        |  20 +--
 scripts/kconfig/gconfig/Makefile                   |  62 +++++++
 scripts/kconfig/{ => gconfig}/gconf.c              |   6 +-
 scripts/kconfig/{ => gconfig}/gconf.glade          |   0
 .../kconfig/{lxdialog => menuconfig}/.gitignore    |   0
 .../{lxdialog => menuconfig}/BIG.FAT.WARNING       |   0
 scripts/kconfig/menuconfig/Makefile                |  42 +++++
 .../{lxdialog => menuconfig}/check-lxdialog.sh     |   0
 .../kconfig/{lxdialog => menuconfig}/checklist.c   |   0
 scripts/kconfig/{lxdialog => menuconfig}/dialog.h  |   0
 .../kconfig/{lxdialog => menuconfig}/inputbox.c    |   0
 scripts/kconfig/{ => menuconfig}/mconf.c           |   4 +-
 scripts/kconfig/{lxdialog => menuconfig}/menubox.c |   0
 scripts/kconfig/{lxdialog => menuconfig}/textbox.c |   0
 scripts/kconfig/{lxdialog => menuconfig}/util.c    |   0
 scripts/kconfig/{lxdialog => menuconfig}/yesno.c   |   0
 scripts/kconfig/nconfig/Makefile                   |  26 +++
 scripts/kconfig/{ => nconfig}/nconf.c              |   2 +-
 scripts/kconfig/{ => nconfig}/nconf.gui.c          |   0
 scripts/kconfig/{ => nconfig}/nconf.h              |   0
 scripts/kconfig/qconfig/Makefile                   | 107 ++++++++++++
 scripts/kconfig/{ => qconfig}/qconf.cc             |   4 +-
 scripts/kconfig/{ => qconfig}/qconf.h              |   0
 24 files changed, 270 insertions(+), 192 deletions(-)
 create mode 100644 scripts/kconfig/gconfig/Makefile
 rename scripts/kconfig/{ => gconfig}/gconf.c (99%)
 rename scripts/kconfig/{ => gconfig}/gconf.glade (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/.gitignore (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/BIG.FAT.WARNING (100%)
 create mode 100644 scripts/kconfig/menuconfig/Makefile
 rename scripts/kconfig/{lxdialog => menuconfig}/check-lxdialog.sh (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/checklist.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/dialog.h (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/inputbox.c (100%)
 rename scripts/kconfig/{ => menuconfig}/mconf.c (99%)
 rename scripts/kconfig/{lxdialog => menuconfig}/menubox.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/textbox.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/util.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/yesno.c (100%)
 create mode 100644 scripts/kconfig/nconfig/Makefile
 rename scripts/kconfig/{ => nconfig}/nconf.c (99%)
 rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%)
 rename scripts/kconfig/{ => nconfig}/nconf.h (100%)
 create mode 100644 scripts/kconfig/qconfig/Makefile
 rename scripts/kconfig/{ => qconfig}/qconf.cc (99%)
 rename scripts/kconfig/{ => qconfig}/qconf.h (100%)
Signature · 1 line
1.9.1
#1 lore raw

RFC PATCH 1/2 kconfig: Move flavours into their own subdirectories.

* Split out non-generic Makefile targets into new Makefiles.
* Each flavour has its own specific Makefile now.
* Rename lxdialog to menuconfig.
* Update POTFILES.in

 create mode 100644 scripts/kconfig/gconfig/Makefile
 rename scripts/kconfig/{ => gconfig}/gconf.c (99%)
 rename scripts/kconfig/{ => gconfig}/gconf.glade (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/.gitignore (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/BIG.FAT.WARNING (100%)
 create mode 100644 scripts/kconfig/menuconfig/Makefile
 rename scripts/kconfig/{lxdialog => menuconfig}/check-lxdialog.sh (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/checklist.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/dialog.h (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/inputbox.c (100%)
 rename scripts/kconfig/{ => menuconfig}/mconf.c (99%)
 rename scripts/kconfig/{lxdialog => menuconfig}/menubox.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/textbox.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/util.c (100%)
 rename scripts/kconfig/{lxdialog => menuconfig}/yesno.c (100%)
 create mode 100644 scripts/kconfig/nconfig/Makefile
 rename scripts/kconfig/{ => nconfig}/nconf.c (99%)
 rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%)
 rename scripts/kconfig/{ => nconfig}/nconf.h (100%)
 create mode 100644 scripts/kconfig/qconfig/Makefile
 rename scripts/kconfig/{ => qconfig}/qconf.cc (99%)
 rename scripts/kconfig/{ => qconfig}/qconf.h (100%)
scripts/kconfig/Makefile +15 -174
index 844bc9d..77aa0ef 100644
@@ -1,8 +1,10 @@
 # ===========================================================================
 # Kernel configuration targets
 # These targets are used from top-level makefile
+# This specific makefile only contains special targets and targets for
+# the line-oriented program. Other interface flavours are included at the end.
 
-PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
+PHONY += oldconfig config silentoldconfig update-po-config \
 	localmodconfig localyesconfig
 
 ifdef KBUILD_KCONFIG
@@ -14,21 +16,9 @@ endif
 # We need this, in case the user has it in its environment
 unexport CONFIG_
 
-xconfig: $(obj)/qconf
-	$< $(Kconfig)
-
-gconfig: $(obj)/gconf
-	$< $(Kconfig)
-
-menuconfig: $(obj)/mconf
-	$< $(Kconfig)
-
 config: $(obj)/conf
 	$< --oldaskconfig $(Kconfig)
 
-nconfig: $(obj)/nconf
-	$< $(Kconfig)
-
 oldconfig: $(obj)/conf
 	$< --$@ $(Kconfig)
 
@@ -53,7 +43,7 @@ localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 
 # Create new linux.pot file
 # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
-update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
+update-po-config: $(obj)/kxgettext $(obj)/gkonfig/gconf.glade.h
 	$(Q)echo "  GEN     config.pot"
 	$(Q)xgettext --default-domain=linux                         \
 	    --add-comments --keyword=_ --keyword=N_                 \
@@ -110,6 +100,7 @@ help:
 	@echo  '  nconfig         - Update current config utilising a ncurses menu based program'
 	@echo  '  menuconfig	  - Update current config utilising a menu based program'
 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
+	@echo  '  qconfig	  - Update current config utilising a QT based front-end'
 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
 	@echo  '  localmodconfig  - Update current config disabling modules not loaded'
@@ -125,81 +116,28 @@ help:
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
 
-# lxdialog stuff
-check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
-
 # Use recursively expanded variables so we do not call gcc unless
 # we really need to do so. (Do not call gcc as part of make mrproper)
 HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
                     -DLOCALE
 
 # ===========================================================================
-# Shared Makefile for the various kconfig executables:
+# Shared Makefile for some of the kconfig executables:
 # conf:	  Used for defconfig, oldconfig and related targets
-# nconf:  Used for the nconfig target.
-#         Utilizes ncurses
-# mconf:  Used for the menuconfig target
-#         Utilizes the lxdialog package
-# qconf:  Used for the xconfig target
-#         Based on QT which needs to be installed to compile it
-# gconf:  Used for the gconfig target
-#         Based on GTK which needs to be installed to compile it
 # object files used by all kconfig flavours
 
-lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
-lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
-
 conf-objs	:= conf.o  zconf.tab.o
-mconf-objs     := mconf.o zconf.tab.o $(lxdialog)
-nconf-objs     := nconf.o zconf.tab.o nconf.gui.o
 kxgettext-objs	:= kxgettext.o zconf.tab.o
-qconf-cxxobjs	:= qconf.o
-qconf-objs	:= zconf.tab.o
-gconf-objs	:= gconf.o zconf.tab.o
 
 hostprogs-y := conf
 
-ifeq ($(MAKECMDGOALS),nconfig)
-	hostprogs-y += nconf
-endif
-
-ifeq ($(MAKECMDGOALS),menuconfig)
-	hostprogs-y += mconf
-endif
-
 ifeq ($(MAKECMDGOALS),update-po-config)
 	hostprogs-y += kxgettext
 endif
 
-ifeq ($(MAKECMDGOALS),xconfig)
-	qconf-target := 1
-endif
-ifeq ($(MAKECMDGOALS),gconfig)
-	gconf-target := 1
-endif
-
-
-ifeq ($(qconf-target),1)
-	hostprogs-y += qconf
-endif
-
-ifeq ($(gconf-target),1)
-	hostprogs-y += gconf
-endif
-
-clean-files	:= qconf.moc .tmp_qtcheck .tmp_gtkcheck
-clean-files	+= zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
-clean-files     += mconf qconf gconf nconf
+clean-files	:= zconf.tab.c zconf.lex.c zconf.hash.c
 clean-files     += config.pot linux.pot
 
-# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
-PHONY += $(obj)/dochecklxdialog
-$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
-$(obj)/dochecklxdialog:
-	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
-
-always := dochecklxdialog
-
 # Add environment specific flags
 HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
 
@@ -210,113 +148,16 @@ HOSTCFLAGS_zconf.tab.o	:= -I$(src)
 LEX_PREFIX_zconf	:= zconf
 YACC_PREFIX_zconf	:= zconf
 
-HOSTLOADLIBES_qconf	= $(KC_QT_LIBS)
-HOSTCXXFLAGS_qconf.o	= $(KC_QT_CFLAGS)
-
-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
-
-HOSTLOADLIBES_mconf   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
-
-HOSTLOADLIBES_nconf	= $(shell \
-				pkg-config --libs menu panel ncurses 2>/dev/null \
-				|| echo "-lmenu -lpanel -lncurses"  )
-$(obj)/qconf.o: $(obj)/.tmp_qtcheck
-
-ifeq ($(qconf-target),1)
-$(obj)/.tmp_qtcheck: $(src)/Makefile
--include $(obj)/.tmp_qtcheck
-
-# QT needs some extra effort...
-$(obj)/.tmp_qtcheck:
-	@set -e; echo "  CHECK   qt"; dir=""; pkg=""; \
-	if ! pkg-config --exists QtCore 2> /dev/null; then \
-	    echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
-	    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)"; \
-	    else \
-	      for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
-	        if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
-	      done; \
-	      if [ -z "$$dir" ]; then \
-	        echo >&2 "*"; \
-	        echo >&2 "* Unable to find any QT installation. Please make sure that"; \
-	        echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
-	        echo >&2 "* either qmake can be found or install pkg-config or set"; \
-	        echo >&2 "* the QTDIR environment variable to the correct location."; \
-	        echo >&2 "*"; \
-	        false; \
-	      fi; \
-	      libpath=$$dir/lib; lib=qt; osdir=""; \
-	      $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
-	        osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
-	      test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
-	      test -f $$libpath/libqt-mt.so && lib=qt-mt; \
-	      cflags="-I$$dir/include"; \
-	      libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
-	      moc="$$dir/bin/moc"; \
-	    fi; \
-	    if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
-	      echo "*"; \
-	      echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
-	      echo "*"; \
-	      moc="/usr/bin/moc"; \
-	    fi; \
-	else \
-	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
-	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
-	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
-	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
-	fi; \
-	echo "KC_QT_CFLAGS=$$cflags" > $@; \
-	echo "KC_QT_LIBS=$$libs" >> $@; \
-	echo "KC_QT_MOC=$$moc" >> $@
-endif
-
-$(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 >&2 "*"; 							\
-			echo >&2 "* GTK+ is present but version >= 2.0.0 is required.";	\
-			echo >&2 "*";							\
-			false;								\
-		fi									\
-	else										\
-		echo >&2 "*"; 								\
-		echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; 	\
-		echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; 	\
-		echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; 		\
-		echo >&2 "*"; 								\
-		false;									\
-	fi
-endif
-
 $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
 
-$(obj)/qconf.o: $(obj)/qconf.moc
-
-quiet_cmd_moc = MOC     $@
-      cmd_moc = $(KC_QT_MOC) -i $< -o $@
+# NCurses/Dialog Interface
+include $(obj)/menuconfig/Makefile
 
-$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
-	$(call cmd,moc)
+# Qt Interface
+include $(obj)/qconfig/Makefile
 
-# Extract gconf menu items for I18N support
-$(obj)/gconf.glade.h: $(obj)/gconf.glade
-	$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
-	$(obj)/gconf.glade
+# NCurses Interface
+include $(obj)/nconfig/Makefile
 
+# Gtk Interface
+include $(obj)/gconfig/Makefile
scripts/kconfig/POTFILES.in +10 -10
index 9674573..6422033 100644
@@ -1,12 +1,12 @@
-scripts/kconfig/lxdialog/checklist.c
-scripts/kconfig/lxdialog/inputbox.c
-scripts/kconfig/lxdialog/menubox.c
-scripts/kconfig/lxdialog/textbox.c
-scripts/kconfig/lxdialog/util.c
-scripts/kconfig/lxdialog/yesno.c
-scripts/kconfig/mconf.c
+scripts/kconfig/menuconfig/checklist.c
+scripts/kconfig/menuconfig/inputbox.c
+scripts/kconfig/menuconfig/menubox.c
+scripts/kconfig/menuconfig/textbox.c
+scripts/kconfig/menuconfig/util.c
+scripts/kconfig/menuconfig/yesno.c
+scripts/kconfig/menuconfig/mconf.c
 scripts/kconfig/conf.c
 scripts/kconfig/confdata.c
-scripts/kconfig/gconf.c
-scripts/kconfig/gconf.glade.h
-scripts/kconfig/qconf.cc
+scripts/kconfig/gconfig/gconf.c
+scripts/kconfig/gconfig/gconf.glade.h
+scripts/kconfig/qconfig/qconf.cc
scripts/kconfig/gconfig/Makefile new file +62 -0

62 lines not on this page · raw message

scripts/kconfig/gconfig/gconf.c renamed from scripts/kconfig/gconf.c +3 -3
similarity index 99%
rename from scripts/kconfig/gconf.c
rename to scripts/kconfig/gconfig/gconf.c
index f2bee70..aab4abf 100644
@@ -11,8 +11,8 @@
 #endif
 
 #include <stdlib.h>
-#include "lkc.h"
-#include "images.c"
+#include "../lkc.h"
+#include "../images.c"
 
 #include <glade/glade.h>
 #include <gtk/gtk.h>
@@ -1486,7 +1486,7 @@ int main(int ac, char *av[])
 	/* Determine GUI path */
 	env = getenv(SRCTREE);
 	if (env)
-		glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL);
+		glade_file = g_strconcat(env, "/scripts/kconfig/gconfig/gconf.glade", NULL);
 	else if (av[0][0] == '/')
 		glade_file = g_strconcat(av[0], ".glade", NULL);
 	else
scripts/kconfig/gconfig/gconf.glade renamed from scripts/kconfig/gconf.glade +0 -0
similarity index 100%
rename from scripts/kconfig/gconf.glade
rename to scripts/kconfig/gconfig/gconf.glade
scripts/kconfig/menuconfig/.gitignore renamed from scripts/kconfig/lxdialog/.gitignore +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/.gitignore
rename to scripts/kconfig/menuconfig/.gitignore
scripts/kconfig/menuconfig/BIG.FAT.WARNING renamed from scripts/kconfig/lxdialog/BIG.FAT.WARNING +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/BIG.FAT.WARNING
rename to scripts/kconfig/menuconfig/BIG.FAT.WARNING
scripts/kconfig/menuconfig/Makefile new file +42 -0

42 lines not on this page · raw message

scripts/kconfig/menuconfig/check-lxdialog.sh renamed from scripts/kconfig/lxdialog/check-lxdialog.sh +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/check-lxdialog.sh
rename to scripts/kconfig/menuconfig/check-lxdialog.sh
scripts/kconfig/menuconfig/checklist.c renamed from scripts/kconfig/lxdialog/checklist.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/checklist.c
rename to scripts/kconfig/menuconfig/checklist.c
scripts/kconfig/menuconfig/dialog.h renamed from scripts/kconfig/lxdialog/dialog.h +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/dialog.h
rename to scripts/kconfig/menuconfig/dialog.h
scripts/kconfig/menuconfig/inputbox.c renamed from scripts/kconfig/lxdialog/inputbox.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/inputbox.c
rename to scripts/kconfig/menuconfig/inputbox.c
scripts/kconfig/menuconfig/mconf.c renamed from scripts/kconfig/mconf.c +2 -2
similarity index 99%
rename from scripts/kconfig/mconf.c
rename to scripts/kconfig/menuconfig/mconf.c
index 59184bb..014c4d6 100644
@@ -19,8 +19,8 @@
 #include <unistd.h>
 #include <locale.h>
 
-#include "lkc.h"
-#include "lxdialog/dialog.h"
+#include "../lkc.h"
+#include "dialog.h"
 
 static const char mconf_readme[] = N_(
 "Overview\n"
scripts/kconfig/menuconfig/menubox.c renamed from scripts/kconfig/lxdialog/menubox.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/menubox.c
rename to scripts/kconfig/menuconfig/menubox.c
scripts/kconfig/menuconfig/textbox.c renamed from scripts/kconfig/lxdialog/textbox.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/textbox.c
rename to scripts/kconfig/menuconfig/textbox.c
scripts/kconfig/menuconfig/util.c renamed from scripts/kconfig/lxdialog/util.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/util.c
rename to scripts/kconfig/menuconfig/util.c
scripts/kconfig/menuconfig/yesno.c renamed from scripts/kconfig/lxdialog/yesno.c +0 -0
similarity index 100%
rename from scripts/kconfig/lxdialog/yesno.c
rename to scripts/kconfig/menuconfig/yesno.c
scripts/kconfig/nconfig/Makefile new file +26 -0
new file mode 100644
index 0000000..3d1b129
@@ -0,0 +1,26 @@
+# ===========================================================================
+# Kernel configuration targets
+# These targets are used from top-level makefile
+
+PHONY += nconfig
+
+nconfig: $(obj)/nconf
+	$< $(Kconfig)
+
+# ===========================================================================
+# nconf:  Used for the nconfig target.
+#         Utilizes ncurses
+# object files used by all kconfig flavours listed above
+
+nconf-objs     := nconfig/nconf.o zconf.tab.o nconfig/nconf.gui.o
+
+ifeq ($(MAKECMDGOALS),nconfig)
+	hostprogs-y += nconf
+endif
+
+clean-files     += nconf
+
+HOSTLOADLIBES_nconf	= $(shell \
+				pkg-config --libs menu panel ncurses 2>/dev/null \
+				|| echo "-lmenu -lpanel -lncurses"  )
+
scripts/kconfig/nconfig/nconf.c renamed from scripts/kconfig/nconf.c +1 -1
similarity index 99%
rename from scripts/kconfig/nconf.c
rename to scripts/kconfig/nconfig/nconf.c
index 4fbecd2..79ec5f1 100644
@@ -9,7 +9,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "lkc.h"
+#include "../lkc.h"
 #include "nconf.h"
 #include <ctype.h>
 
scripts/kconfig/nconfig/nconf.gui.c renamed from scripts/kconfig/nconf.gui.c +0 -0
similarity index 100%
rename from scripts/kconfig/nconf.gui.c
rename to scripts/kconfig/nconfig/nconf.gui.c
scripts/kconfig/nconfig/nconf.h renamed from scripts/kconfig/nconf.h +0 -0
similarity index 100%
rename from scripts/kconfig/nconf.h
rename to scripts/kconfig/nconfig/nconf.h
scripts/kconfig/qconfig/Makefile new file +104 -0

104 lines not on this page · raw message

scripts/kconfig/qconfig/qconf.cc renamed from scripts/kconfig/qconf.cc +2 -2
similarity index 99%
rename from scripts/kconfig/qconf.cc
rename to scripts/kconfig/qconfig/qconf.cc
index 9d3b04b..9ea6dcb 100644
@@ -43,11 +43,11 @@
 
 #include <stdlib.h>
 
-#include "lkc.h"
+#include "../lkc.h"
 #include "qconf.h"
 
 #include "qconf.moc"
-#include "images.c"
+#include "../images.c"
 
 #ifdef _
 # undef _
scripts/kconfig/qconfig/qconf.h renamed from scripts/kconfig/qconf.h +0 -0
similarity index 100%
rename from scripts/kconfig/qconf.h
rename to scripts/kconfig/qconfig/qconf.h
Signature · 1 line
1.9.1
#2 lore raw

RFC PATCH 2/2 kconfig: Add qconfig makefile target additionally to the xconfig target

In reply to David Graeff

Because we no longer only target the xserver with the qt frontend of kconfig and due to the name beeing inconsistent with the other makefile targets an additional qconfig target is added.

scripts/kconfig/qconfig/Makefile +4 -1
index d2e6463..ad1af34 100644
@@ -2,11 +2,14 @@
 # Kernel configuration targets
 # These targets are used from kconfig top-level makefile
 
-PHONY +=  xconfig
+PHONY +=  xconfig qconfig
 
 xconfig: $(obj)/qconf
 	$< $(Kconfig)
 
+qconfig: $(obj)/qconf
+	$< $(Kconfig)
+
 # ===========================================================================
 # qconf:  Used for the xconfig/qconfig target
 #         Based on Qt4+ which needs to be installed to compile it
Signature · 1 line
1.9.1
#3 lore raw
In reply to David Graeff
Quoted 7 lines · David Graeff

Hi Yann, all,

with this rfc patch set I would like to reorganize the kconfig directory structure in preparation for updating the Qt3 based flavour of kconfig to Qt4/5 and the gtk flavour (version 2->3) eventually. I renamed lxdialog to menuconfig and created subdirectories for each flavour except the line based one.

Quoted 8 lines

My suggestion is to add a "qconfig" target to the buildsystem for
beeing consistent with the names of the other targets where the first character provide a hint for the used toolkit. And to accommodate the fact that this frontend may also be used on non xserver machines. May feel weird to type xconfig on wayland systems. Patch 2 adds that target.

Last time (some month ago) I provided a patch-set containing all changes (buildystem+qt+gtk) at once, that didn't worked well.

The patches has not shown up yet. Maybe they are too big?
Remember to use flags to git so we only see the rename and not the full fil in the diff. -M -P IIRC but I am not sure.

Sam