From: Eric Blake Date: Tue, 6 Apr 2010 19:08:01 +0000 (-0600) Subject: build: avoid autogen on 'make clean' X-Git-Tag: v0.8.0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36bcd7026b1cc39ac022efec1402c081a475a788;p=thirdparty%2Flibvirt.git build: avoid autogen on 'make clean' Tested by running 'git submodule foreach git pull origin master' and 'git add .gnulib', then seeing that 'make clean' skips autogen although 'make' properly runs it. * cfg.mk (_clean_requested): New check, to speed up 'make clean' even if gnulib submodule is outdated. Suggested by Daniel P. Berrange. --- diff --git a/cfg.mk b/cfg.mk index 70465c3b5a..f422a53e2e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -301,7 +301,8 @@ ifeq (0,$(MAKELEVEL)) git diff .gnulib); \ stamp="$$($(_submodule_hash) $(_curr_status) 2>/dev/null)"; \ test "$$stamp" = "$$actual"; echo $$?) - ifeq (1,$(_update_required)) + _clean_requested = $(filter %clean,$(MAKECMDGOALS)) + ifeq (1,$(_update_required)$(_clean_requested)) $(info INFO: gnulib update required; running ./autogen.sh first) Makefile: _autogen endif