build: Add specified modules to the container build list.

And not only when ending with 32/64.
This commit is contained in:
Rémi Bernon 2021-04-02 12:40:30 +02:00
parent 5dd383efff
commit 8726ea849d
No known key found for this signature in database
GPG key ID: 38D0E5827B54E5C9
2 changed files with 4 additions and 1 deletions

View file

@ -73,6 +73,7 @@ endif
MAKECMDGOALS32 := $(filter-out all32,$(filter %32,$(MAKECMDGOALS)))
MAKECMDGOALS64 := $(filter-out all64,$(filter %64,$(MAKECMDGOALS)))
CONTAINERGOALS := $(MAKECMDGOALS32) $(MAKECMDGOALS64)
all: all32 all64
.PHONY: all
@ -87,7 +88,7 @@ ifeq ($(CONTAINER),)
J := $(shell nproc)
container-build: private SHELL := $(CONTAINER_SHELL)
container-build:
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) -f $(firstword $(MAKEFILE_LIST)) $(MFLAGS) $(MAKEOVERRIDES) CONTAINER=1 $(MAKECMDGOALS32) $(MAKECMDGOALS64)
+$(MAKE) -j$(J) $(filter -j%,$(MAKEFLAGS)) -f $(firstword $(MAKEFILE_LIST)) $(MFLAGS) $(MAKEOVERRIDES) CONTAINER=1 $(CONTAINERGOALS)
.PHONY: container-build
all32 $(MAKECMDGOALS32): container-build

View file

@ -98,6 +98,8 @@ all$(3) $(1): $(1)$(3)
all: $(1)
.PHONY: all
CONTAINERGOALS := $(CONTAINERGOALS) $(filter $(1),$(MAKECMDGOALS))
$(2)_ENV$(3) = \
CARGO_HOME=$$(OBJ)/.cargo \