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 <akihiko.odaki@daynix.com>
Message-ID: <20231119101604.47325-1-akihiko.odaki@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
cd9113633f
commit
9abbb37535
12
configure
vendored
12
configure
vendored
@ -41,12 +41,7 @@ then
|
|||||||
# This file is auto-generated by configure to support in-source tree
|
# This file is auto-generated by configure to support in-source tree
|
||||||
# 'make' command invocation
|
# 'make' command invocation
|
||||||
|
|
||||||
ifeq ($(MAKECMDGOALS),)
|
build:
|
||||||
recurse: all
|
|
||||||
endif
|
|
||||||
|
|
||||||
.NOTPARALLEL: %
|
|
||||||
%: force
|
|
||||||
@echo 'changing dir to build for $(MAKE) "$(MAKECMDGOALS)"...'
|
@echo 'changing dir to build for $(MAKE) "$(MAKECMDGOALS)"...'
|
||||||
@$(MAKE) -C build -f Makefile $(MAKECMDGOALS)
|
@$(MAKE) -C build -f Makefile $(MAKECMDGOALS)
|
||||||
@if test "$(MAKECMDGOALS)" = "distclean" && \
|
@if test "$(MAKECMDGOALS)" = "distclean" && \
|
||||||
@ -54,8 +49,9 @@ endif
|
|||||||
then \
|
then \
|
||||||
rm -rf build GNUmakefile ; \
|
rm -rf build GNUmakefile ; \
|
||||||
fi
|
fi
|
||||||
force: ;
|
%: build
|
||||||
.PHONY: force
|
@
|
||||||
|
.PHONY: build
|
||||||
GNUmakefile: ;
|
GNUmakefile: ;
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user