diff options
| author | Helmut Eller | 2025-09-15 05:55:19 +0200 |
|---|---|---|
| committer | Helmut Eller | 2025-09-15 08:23:25 +0200 |
| commit | a97f6d888fcb34b416a64724e67b7d7e77df6f68 (patch) | |
| tree | b2ffd06b74b884062633658e959ab6794e6b5ad5 /mps/code/comm.gmk | |
| parent | d15aa6aa44018014a37fcc91f10a6d82da6ddd05 (diff) | |
| download | emacs-a97f6d888fcb34b416a64724e67b7d7e77df6f68.tar.gz emacs-a97f6d888fcb34b416a64724e67b7d7e77df6f68.zip | |
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.
Diffstat (limited to 'mps/code/comm.gmk')
| -rw-r--r-- | mps/code/comm.gmk | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mps/code/comm.gmk b/mps/code/comm.gmk index 05c73fb411a..cac85c4ee6a 100644 --- a/mps/code/comm.gmk +++ b/mps/code/comm.gmk | |||
| @@ -363,13 +363,18 @@ testscheme: phony | |||
| 363 | # These convenience targets allow one to type "make foo" to build target | 363 | # These convenience targets allow one to type "make foo" to build target |
| 364 | # foo in selected varieties (or none, for the latter rule). | 364 | # foo in selected varieties (or none, for the latter rule). |
| 365 | 365 | ||
| 366 | $(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa: phony | ||
| 367 | ifdef VARIETY | 366 | ifdef VARIETY |
| 368 | $(MAKE) -f $(PFM).gmk TARGET=$@ variety | 367 | $(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa: \ |
| 368 | %: $(PFM)/$(VARIETY)/% ; | ||
| 369 | else | 369 | else |
| 370 | $(LIB_TARGETS) $(TEST_TARGETS) $(EVENT_TARGETS) $(TEST_SUITES) testmmqa: | ||
| 370 | $(MAKE) -f $(PFM).gmk TARGET=$@ target | 371 | $(MAKE) -f $(PFM).gmk TARGET=$@ target |
| 372 | .NOTPARALLEL: | ||
| 371 | endif | 373 | endif |
| 372 | 374 | ||
| 375 | # Targets for toplevel make | ||
| 376 | clean-testansi: clean .WAIT testansi | ||
| 377 | clean-testpollnone: clean .WAIT testpollnone | ||
| 373 | 378 | ||
| 374 | # "clean" removes the directory containing the build results for the | 379 | # "clean" removes the directory containing the build results for the |
| 375 | # platform. | 380 | # platform. |
| @@ -611,14 +616,12 @@ endif | |||
| 611 | 616 | ||
| 612 | define run-cc-strict | 617 | define run-cc-strict |
| 613 | $(ECHO) "$(PFM): $@" | 618 | $(ECHO) "$(PFM): $@" |
| 614 | mkdir -p $(PFM) | ||
| 615 | mkdir -p $(PFM)/$(VARIETY) | 619 | mkdir -p $(PFM)/$(VARIETY) |
| 616 | $(CC) $(CFLAGSSTRICT) -c -o $@ $< | 620 | $(CC) $(CFLAGSSTRICT) -c -o $@ $< |
| 617 | endef | 621 | endef |
| 618 | 622 | ||
| 619 | define run-cc-lax | 623 | define run-cc-lax |
| 620 | $(ECHO) "$(PFM): $@ - compiling with lax flags." | 624 | $(ECHO) "$(PFM): $@ - compiling with lax flags." |
| 621 | mkdir -p $(PFM) | ||
| 622 | mkdir -p $(PFM)/$(VARIETY) | 625 | mkdir -p $(PFM)/$(VARIETY) |
| 623 | $(CC) $(CFLAGSLAX) -c -o $@ $< | 626 | $(CC) $(CFLAGSLAX) -c -o $@ $< |
| 624 | endef | 627 | endef |