Skip to content

Commit cde958d

Browse files
committed
fix: [Makefile] Use $(MAKE) for parallel builds
Using $(MAKE) enables the parallel builds and removes jobserver unavailable warning. Refer: https://stackoverflow.com/q/50510278
1 parent 9fb242f commit cde958d

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ FORMAT_SUB_DIRS:=$(foreach subdir,$(SUB_DIRS),format-$(subdir))
1616
LINT_SUB_DIRS:=$(foreach subdir,$(SUB_DIRS),lint-$(subdir))
1717

1818
$(SUB_DIRS): venv
19-
make -C $@
19+
$(MAKE) -C $@
2020

2121
$(TESTS_SUB_DIRS): venv
22-
make -C $(@:tests-%=%) tests
22+
$(MAKE) -C $(@:tests-%=%) tests
2323

2424
$(CHECK_SUB_DIRS): $(TESTS_SUB_DIRS)
25-
make -C $(@:check-%=%) check
25+
$(MAKE) -C $(@:check-%=%) check
2626

2727
$(CLEAN_SUB_DIRS):
28-
make -C $(@:clean-%=%) clean
28+
$(MAKE) -C $(@:clean-%=%) clean
2929

3030
$(FORMAT_SUB_DIRS):
31-
make -C $(@:format-%=%) format
31+
$(MAKE) -C $(@:format-%=%) format
3232

3333
$(LINT_SUB_DIRS):
34-
make -C $(@:lint-%=%) lint
34+
$(MAKE) -C $(@:lint-%=%) lint
3535

3636
# ============================================================================
3737
# Setup venv for python and docs
@@ -59,10 +59,10 @@ CPP_SRCS_LINT:=$(addsuffix -lint,$(CPP_BINS))
5959
CPP_ALL:=$(CPP_BINS) $(CPP_BINS_CLEAN) $(CPP_SRCS_FORMAT) $(CPP_SRCS_LINT)
6060

6161
$(CPP_BINS_CHECK):
62-
$(Q)make -C cpp $(@:cpp/%=%)
62+
$(Q)$(MAKE) -C cpp $(@:cpp/%=%)
6363

6464
$(CPP_ALL):
65-
make -C cpp $(@:cpp/%=%)
65+
$(MAKE) -C cpp $(@:cpp/%=%)
6666

6767
# ============================================================================
6868
# Top level targets

cpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SRCS_FORMAT:=$(addsuffix -format,$(BINS))
3030
SRCS_LINT:=$(addsuffix -lint,$(BINS))
3131

3232
$(BINS_CHECK):
33-
$(Q)make $(@:-check=)
33+
$(Q)$(MAKE) $(@:-check=)
3434
$(Q)./$(BUILD_DIR)/$(@:-check=)
3535

3636
$(BINS_CLEAN):

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ html: venv
2222
venv: $(VENV_DONE)
2323

2424
$(VENV_DONE):
25-
make -C ../ venv
25+
$(MAKE) -C ../ venv
2626

2727
# ============================================================================
2828
# Top level targets

python3/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MODULES:=$(sort $(dir $(shell $(GIT_LS) -- '*/__init__.py')))
1515
venv: $(VENV_DONE)
1616

1717
$(VENV_DONE):
18-
make -C ../ venv
18+
$(MAKE) -C ../ venv
1919

2020
flake8: venv
2121
$(VENV_ACTIVATE) flake8 $(MODULES)

0 commit comments

Comments
 (0)