1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Better support for parallel make

* mps/code/comm.gmk (LIB_TARGETS, TEST_TARGETS, EVENT_TARGETS)
(TEST_SUITES, testmmqa): If VARIETY is not defined, then disable
parallism with .NOTPARALLEL.  Otherwise, avoid the recursive make with
a static pattern rule.
(clean-testansi, clean-testpollnone): New.
* mps/Makefile.in (build-via-make): Invoke submake explicit
VARIETY argument to allow more parallelism.
(test-make-build): Use clean-testansi and clean-testpollnone.
This commit is contained in:
Helmut Eller 2025-09-15 05:55:19 +02:00
parent d15aa6aa44
commit a97f6d888f
2 changed files with 11 additions and 7 deletions

View file

@ -34,7 +34,8 @@ XCODEBUILD=xcrun xcodebuild -project code/mps.xcodeproj
all: @BUILD_TARGET@
build-via-make:
$(MAKE) $(TARGET_OPTS)
$(MAKE) $(TARGET_OPTS) VARIETY=cool
$(MAKE) $(TARGET_OPTS) VARIETY=hot
clean-make-build:
$(MAKE) $(TARGET_OPTS) clean
@ -84,12 +85,12 @@ test-make-build:
$(MAKE) -C code -f anan$(MPS_BUILD_NAME).gmk VARIETY=cool \
CC='$(CC)' \
CFLAGSCOMPILERSTRICT='$(CFLAGSCOMPILERSTRICT)' \
clean testansi
clean-testansi
$(MAKE) -C code -f anan$(MPS_BUILD_NAME).gmk VARIETY=cool \
CC='$(CC)' \
CFLAGS="-DCONFIG_POLL_NONE" \
CFLAGSCOMPILERSTRICT='$(CFLAGSCOMPILERSTRICT)' \
clean testpollnone
clean-testpollnone
test-xcode-build:
$(XCODEBUILD) -config Debug -target testci

View file

@ -363,13 +363,18 @@ testscheme: phony
# These convenience targets allow one to type "make foo" to build target
# foo in selected varieties (or none, for the latter rule).
$(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa: phony
ifdef VARIETY
$(MAKE) -f $(PFM).gmk TARGET=$@ variety
$(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa: \
%: $(PFM)/$(VARIETY)/% ;
else
$(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa:
$(MAKE) -f $(PFM).gmk TARGET=$@ target
.NOTPARALLEL:
endif
# Targets for toplevel make
clean-testansi: clean .WAIT testansi
clean-testpollnone: clean .WAIT testpollnone
# "clean" removes the directory containing the build results for the
# platform.
@ -611,14 +616,12 @@ endif
define run-cc-strict
$(ECHO) "$(PFM): $@"
mkdir -p $(PFM)
mkdir -p $(PFM)/$(VARIETY)
$(CC) $(CFLAGSSTRICT) -c -o $@ $<
endef
define run-cc-lax
$(ECHO) "$(PFM): $@ - compiling with lax flags."
mkdir -p $(PFM)
mkdir -p $(PFM)/$(VARIETY)
$(CC) $(CFLAGSLAX) -c -o $@ $<
endef