Hi,
following patch reduces time make -n oldconfig from ~5 to ~0.5 seconds
on mingw, by not parsing all the Makefile.incs when they're not in use.
Same for the other config targets and distclean.
It also optimizes rm -rf and mkdir -p sequences a bit: No need to delete
all object files manually, just to run rm -rf $(obj) afterwards.
Signed-off-by: Patrick Georgi <patrick.georgi(a)coresystems.de>
Index: Makefile
===================================================================
--- Makefile (Revision 5467)
+++ Makefile (Arbeitskopie)
@@ -70,7 +70,15 @@
DOXYGEN_OUTPUT_DIR := doxygen
ifeq ($(strip $(HAVE_DOTCONFIG)),)
+NOCOMPILE:=1
+endif
+ifneq ($(MAKECMDGOALS),)
+ifneq ($(filter config oldconfig menuconfig kconfig qconfig
distclean,$(MAKECMDGOALS)),)
+NOCOMPILE:=1
+endif
+endif
+ifeq ($(NOCOMPILE),1)
all: config
else
@@ -294,9 +302,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 +348,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