This patch adds support for the kernel_xconfig top-level target. If
qt3 is detected on the system (by checking for the presence of the
directory /usr/include/qt3), the top-level target expands to the
invocation of the kernel xconfig target. Otherwise, the target prints
a message and errors.

Signed-off-by: Emmanuel Deloget <emmanuel.delo...@efixo.com>

(Warning)
Please note that this patch does not apply cleanly, although it applies.
I get the following warning (after I applied patches 1/4 to 3/4):

  patching file include/toplevel.mk
  Hunk #1 succeeded at 129 (offset 22 lines).
  patching file include/kernel-build.mk
  patching file target/linux/Makefile

---
Changes since version 1:

 * the missing changes from several important makefiles have been
   added back.

---

Index: include/toplevel.mk
===================================================================
--- include/toplevel.mk	(revision 27257)
+++ include/toplevel.mk	(working copy)
@@ -107,6 +129,16 @@
 kernel_nconfig: prepare_kernel_conf
 	$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux nconfig
 
+ifneq ($(have-qt3-dev),)
+kernel_xconfig: prepare_kernel_conf
+	$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig
+else
+kernel_xconfig:
+	@echo "  Target kernel_xconfig adds qt3-dev to the dependencies of OpenWRT, and this dependency is missing on your system"
+	@echo "  You shall install qt3-dev to be able to run make xconfig."
+	@false
+endif
+
 tmp/.prereq-build: include/prereq-build.mk
 	mkdir -p tmp
 	rm -f tmp/.host.mk
Index: include/kernel-build.mk
===================================================================
--- include/kernel-build.mk	(revision 27257)
+++ include/kernel-build.mk	(working copy)
@@ -113,7 +113,7 @@
   compile: $(LINUX_DIR)/.modules
 	$(MAKE) -C image compile TARGET_BUILD=
 
-  oldconfig menuconfig nconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
+  oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
 	rm -f $(STAMP_CONFIGURED)
 	$(LINUX_RECONF_CMD) > $(LINUX_DIR)/.config
 	$(_SINGLE)$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) $$@
Index: target/linux/Makefile
===================================================================
--- target/linux/Makefile	(revision 27257)
+++ target/linux/Makefile	(working copy)
@@ -9,5 +9,5 @@
 
 export TARGET_BUILD=1
 
-prereq clean download prepare compile install menuconfig nconfig oldconfig update refresh: FORCE
+prereq clean download prepare compile install menuconfig nconfig xconfig oldconfig update refresh: FORCE
 	@+$(NO_TRACE_MAKE) -C $(BOARD) $@
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to