build: fix host menu config targets using ncurses
[openwrt/openwrt.git] / scripts / config / Makefile
index 745a5d0f84dcac4edf571b189ec3c9b563b54510..8b78d5a6824722ac56830bca63db6a0ff2d8fd95 100644 (file)
@@ -20,8 +20,6 @@ check_lxdialog = $(shell $(SHELL) $(CURDIR)/lxdialog/check-lxdialog.sh -$(1))
 export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags)
 export CXXFLAGS += -DKBUILD_NO_NLS
 
-DISTRO-PKG-CONFIG := $(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
-
 conf-objs      := conf.o zconf.tab.o
 mconf-objs     := mconf.o zconf.tab.o
 qconf-cxxobjs  := qconf.o
@@ -31,7 +29,7 @@ lxdialog-objs := \
        lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o \
        lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
 
-clean-files    := zconf.tab.c lex.zconf.c zconf.hash.c
+clean-files    := zconf.tab.c zconf.lex.c zconf.hash.c
 # Remove qconf junk files
 clean-files    += $(qconf-cxxobjs) qconf.moc .tmp_qtcheck qconf
 
@@ -55,9 +53,9 @@ zconf.tab.o: zconf.lex.c zconf.hash.c confdata.c
 
 kconfig_load.o: lkc_defs.h
 
-zconf.tab.c: zconf.y
-zconf.lex.c: zconf.l
-zconf.hash.c: zconf.gperf
+zconf.tab.c: zconf.y $(wildcard zconf.tab.c_shipped)
+zconf.lex.c: zconf.l $(wildcard zconf.lex.c_shipped)
+zconf.hash.c: zconf.gperf $(wildcard zconf.hash.c_shipped)
 
 %.tab.c: %.y
        cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<