Author: oxygene Date: Wed Apr 21 08:36:20 2010 New Revision: 5470 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5470
Log: Optimize distclean and configuration.
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/Makefile
Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Wed Apr 21 08:23:19 2010 (r5469) +++ trunk/Makefile Wed Apr 21 08:36:20 2010 (r5470) @@ -69,8 +69,21 @@ DOXYGEN := doxygen DOXYGEN_OUTPUT_DIR := doxygen
+# Three cases where we don't need fully populated $(obj) lists: +# 1. when no .config exists +# 2. when make config (in any flavour) is run +# 3. when make distclean is run +# Don't waste time on reading all Makefile.incs in these cases ifeq ($(strip $(HAVE_DOTCONFIG)),) +NOCOMPILE:=1 +endif +ifneq ($(MAKECMDGOALS),) +ifneq ($(filter %config distclean,$(MAKECMDGOALS)),) +NOCOMPILE:=1 +endif +endif
+ifeq ($(NOCOMPILE),1) all: config
else @@ -294,9 +307,7 @@ endif
prepare: - mkdir -p $(obj) - mkdir -p $(objutil)/kconfig/lxdialog $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options - test -n "$(alldirs)" && mkdir -p $(alldirs) || true + mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options $(alldirs)
$(obj)/build.h: .xcompile @printf " GEN build.h\n" @@ -342,9 +353,9 @@ clean: clean-for-update rm -f $(obj)/coreboot* .ccwrap
-distclean: clean +distclean: rm -rf $(obj) - rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* + rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
update: dongle.py -c /dev/term/1 $(obj)/coreboot.rom EOF