From: Angus Gratton Date: Fri, 22 Sep 2017 00:04:00 +0000 (+1000) Subject: build: make clean should remove all .d files in tools/kconfig X-Git-Tag: v3.1-dev~240^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a361a00405c954a8f694a25a07634d1eb919aa2f;p=esp-idf build: make clean should remove all .d files in tools/kconfig Causes a problem that can't be fixed by "make clean" if the host OS headers have moved around. ie https://esp32.com/viewtopic.php?f=13&t=3098&p=14487 --- diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index c421365f2e..6675294b79 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -173,9 +173,12 @@ gconf-objs := gconf.o zconf.tab.o hostprogs-y := conf nconf mconf kxgettext qconf gconf -clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck *.d +all-objs := $(conf-objs) $(mconf-objs) $(lxdialog) +all-deps := $(all-objs:.o=.d) + +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h -clean-files += $(conf-objs) $(mconf-objs) conf mconf $(lxdialog) +clean-files += $(all-objs) $(all-deps) conf mconf # Check that we have the required ncurses stuff installed for lxdialog (menuconfig) PHONY += dochecklxdialog @@ -307,8 +310,8 @@ zconf.hash.c: zconf.gperf zconf.tab.c: zconf.y bison -t -l -p zconf -o zconf.tab.c zconf.y -clean: +clean: rm -f $(clean-files) --include $(wildcard *.d) --include $(wildcard lxdialog/*.d) +-include $(all-deps) + diff --git a/tools/kconfig/lxdialog/check-lxdialog.sh b/tools/kconfig/lxdialog/check-lxdialog.sh index 79df5ed4f9..9e98145983 100755 --- a/tools/kconfig/lxdialog/check-lxdialog.sh +++ b/tools/kconfig/lxdialog/check-lxdialog.sh @@ -49,7 +49,7 @@ ccflags() # Temp file, try to clean up after us tmp=.lxdialog.tmp -trap "rm -f $tmp" 0 1 2 3 15 +trap "rm -f $tmp ${tmp%.tmp}.d" 0 1 2 3 15 # Check if we can link to ncurses check() {