build system: Don't run the full build system on "make clean"
When running "make clean" the build system used to parse the entire build system. Besides costing time, it prevents cleaning the tree if a blobs-board is selected but blobs are not enabled. Instead, clean always removes all of $(obj) and .xcompile, while distclean additionally removes .config and the like. Besides cleaning up more completely (eg. dependency files), a side effect is that this also removes $(obj)/util, if it exists (default location for build tools). Change-Id: Ief6362460d4eb7edcb4b0a47ec76cb9a61bf3b86 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/2338 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
9a00016238
commit
02ae0bf8fe
11
Makefile
11
Makefile
|
@ -97,10 +97,10 @@ ifeq ($(strip $(HAVE_DOTCONFIG)),)
|
||||||
NOCOMPILE:=1
|
NOCOMPILE:=1
|
||||||
endif
|
endif
|
||||||
ifneq ($(MAKECMDGOALS),)
|
ifneq ($(MAKECMDGOALS),)
|
||||||
ifneq ($(filter %config distclean,$(MAKECMDGOALS)),)
|
ifneq ($(filter %config %clean,$(MAKECMDGOALS)),)
|
||||||
NOCOMPILE:=1
|
NOCOMPILE:=1
|
||||||
endif
|
endif
|
||||||
ifeq ($(MAKECMDGOALS), distclean)
|
ifeq ($(MAKECMDGOALS), %clean)
|
||||||
NOMKDIR:=1
|
NOMKDIR:=1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -299,9 +299,7 @@ doxygen-clean:
|
||||||
rm -rf $(DOXYGEN_OUTPUT_DIR)
|
rm -rf $(DOXYGEN_OUTPUT_DIR)
|
||||||
|
|
||||||
clean-for-update: doxygen-clean clean-for-update-target
|
clean-for-update: doxygen-clean clean-for-update-target
|
||||||
rm -f $(allobjs) .xcompile
|
rm -rf $(obj) .xcompile
|
||||||
rm -f $(DEPENDENCIES)
|
|
||||||
rmdir -p $(alldirs) 2>/dev/null >/dev/null || true
|
|
||||||
|
|
||||||
clean: clean-for-update clean-target
|
clean: clean-for-update clean-target
|
||||||
rm -f .ccwrap
|
rm -f .ccwrap
|
||||||
|
@ -309,8 +307,7 @@ clean: clean-for-update clean-target
|
||||||
clean-cscope:
|
clean-cscope:
|
||||||
rm -f cscope.out
|
rm -f cscope.out
|
||||||
|
|
||||||
distclean:
|
distclean: clean
|
||||||
rm -rf $(obj)
|
|
||||||
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
|
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
|
||||||
|
|
||||||
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy .xcompile
|
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy .xcompile
|
||||||
|
|
Loading…
Reference in New Issue