From 682eb716861233b79d9e5c2fec491487de2b0b37 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Thu, 21 Dec 2006 03:44:09 -0800 Subject: Support kernels where make menuconfig doesn't need lxdialog From: Trent Piepho make menuconfig used to need to build two kernel configuration programs, mconf and lxdialog. In 2.6.19-rc1, this was changed so there no longer was a separate lxdialog binary, it was integrated into mconf. This adapts the v4l-dvb Makefile to check for lxdialog/Makefile, if it's not present then no lxdialog binary needs to be built. The rules and dependencies on lxdialog will be omitted from the v4l-dvb Makefile in that case. Signed-off-by: Trent Piepho --- v4l/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v4l/Makefile b/v4l/Makefile index c8f42006d..7674abd98 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -301,8 +301,13 @@ CONF := $(KDIR)/scripts/kconfig/conf # lxdialog can be in either scripts/lxdialog or scripts/kconfig/lxdialog LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kconfig/ ; fi) -LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) -LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog +# lxdialog might not be a separate program that needs to be built, check +# for lxdialog/Makefile to find out. +ifneq ($(wildcard $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/Makefile),) + # lxdialog must be built + LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) + LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog +endif # Ideally, some kind of oldconfig process would be used to update .config # without destroying the user's configuration. Lacking that, we will @@ -345,11 +350,13 @@ $(QCONF) $(GCONF) $(MCONF) $(CONF): .PHONY: lxdialog lxdialog: $(LXDIALOG) $(LXDIALOG_LNK) +ifdef LXDIALOG $(LXDIALOG_LNK): ln -snf $(KDIR)/$(LXDIALOG_LNK) $(LXDIALOG_LNK) $(LXDIALOG): $(MAKE) -C $(KDIR) -f $(PWD)/Makefile.kernel $(KMAKEVARS) v4l-$(LXDIALOG) +endif ################################################# # IVTV link rules -- cgit v1.2.3