From 9abbb37535b27321e9f7bde38a6996343b2bc5f2 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sun, 19 Nov 2023 19:16:02 +0900 Subject: [PATCH] configure: Make only once with pseudo-"in source tree" builds Pseudo-"in source tree" build used to run make in the build directory as many times as goals. Worse, although .NOTPARALLEL is specified, it does not work for patterns, and run make in parallel, which can break things. Add a new rule "build", and let it call make. The pattern rule only needs to specify "build" as its prerequisite and have a no-op recipe so that it does more than canceling built-in implicit rules. Fixes: dedad02720 ("configure: add support for pseudo-"in source tree" builds") Signed-off-by: Akihiko Odaki Message-ID: <20231119101604.47325-1-akihiko.odaki@daynix.com> Signed-off-by: Paolo Bonzini --- configure | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 959b1a20c1..bdda912f36 100755 --- a/configure +++ b/configure @@ -41,12 +41,7 @@ then # This file is auto-generated by configure to support in-source tree # 'make' command invocation -ifeq ($(MAKECMDGOALS),) -recurse: all -endif - -.NOTPARALLEL: % -%: force +build: @echo 'changing dir to build for $(MAKE) "$(MAKECMDGOALS)"...' @$(MAKE) -C build -f Makefile $(MAKECMDGOALS) @if test "$(MAKECMDGOALS)" = "distclean" && \ @@ -54,8 +49,9 @@ endif then \ rm -rf build GNUmakefile ; \ fi -force: ; -.PHONY: force +%: build + @ +.PHONY: build GNUmakefile: ; EOF -- 2.11.0