Submitter | Patrick Georgi |
---|---|
Date | 2010-04-20 19:49:03 |
Message ID | <4BCE052F.7060106@georgi-clan.de> |
Download | mbox | patch |
Permalink | /patch/1247/ |
State | Accepted |
Headers | show |
Comments
On 4/20/10 9:49 PM, Patrick Georgi wrote: > ifeq ($(strip $(HAVE_DOTCONFIG)),) > +NOCOMPILE:=1 > +endif > +ifneq ($(MAKECMDGOALS),) > +ifneq ($(filter config oldconfig menuconfig kconfig qconfig > distclean,$(MAKECMDGOALS)),) > +NOCOMPILE:=1 > +endif > +endif > This starts getting semi comprehensible... maybe a (short) comment why this is done would be nice.. Also, does %config or *config work instead of mentioning all configs? Other than that, Acked-by: Stefan Reinauer <stepan@coresystems.de>
Am 20.04.2010 23:49, schrieb Stefan Reinauer: > This starts getting semi comprehensible... maybe a (short) comment why > this is done would be nice.. Done. > Also, does %config or *config work instead of mentioning all configs? Yes, I didn't want to risk that we add some %config target that needs $(obj), which then fails. But I guess that won't happen, so done. Patrick
Patch
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
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@coresystems.de> 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