From b7581c357a5bf089f0226ddefc20d3a32144ce7d Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Fri, 18 May 2012 12:45:26 +0200 Subject: Build system: create macro to delete kconfig generated files Signed-off-by: Abdoulaye Walsimou Gaye --- mk/buildsystem.mk | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'mk') diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk index 8c83105..80a8d51 100644 --- a/mk/buildsystem.mk +++ b/mk/buildsystem.mk @@ -66,8 +66,7 @@ basic: $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/basic clean: toolchain_clean rmallpath - $(Q)$(MAKE) -f scripts/Makefile.clean obj=scripts/kconfig - $(Q)$(MAKE) -f scripts/Makefile.clean obj=scripts/basic + $(Q)$(__embtk_kconfig_clean) $(Q)rm -rf .config kbuild.log .fakeroot* distclean: clean @@ -148,6 +147,27 @@ define __embtk_mk_inithosttoolsdirs mkdir -p $(HOSTTOOLS)/usr/local endef +define __embtk_kconfig_clean + $(MAKE) -f scripts/Makefile.clean obj=scripts/kconfig + $(MAKE) -f scripts/Makefile.clean obj=scripts/basic + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'config*') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'lex.*.c') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'zconf.lex.c') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.tab.c') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.tab.h') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'zconf.hash.c') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.moc') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'lkc_defs.h') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.cmd') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.o') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name '*.tmp_qtcheck') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'conf') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'mconf') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'qconf') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'gconf') + rm -rf $$(find $(EMBTK_ROOT)/scripts/kconfig -type f -name 'kxgettext') +endef + rmallpath: $(Q)rm -rf $(PACKAGES_BUILD)* $(ROOTFS)* $(TOOLS)* $(TOOLS_BUILD)* $(Q)rm -rf $(SYSROOT)* $(HOSTTOOLS)* $(EMBTK_GENERATED)/rootfs-* -- cgit v1.2.3