mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #3360 from gebart/pr/docker-pass-overrides
Makefile.docker: pass command line make variables on the command line
This commit is contained in:
commit
0f31419f98
@ -70,6 +70,13 @@ DOCKER_ENVIRONMENT_CMDLINE := $(foreach varname,$(DOCKER_ENV_VARS), \
|
||||
-e '$(varname)=$(subst ','\'',$($(varname)))', \
|
||||
))
|
||||
DOCKER_ENVIRONMENT_CMDLINE := $(strip $(DOCKER_ENVIRONMENT_CMDLINE))
|
||||
# The variables set on the command line will also be passed on the command line
|
||||
# in Docker
|
||||
DOCKER_OVERRIDE_CMDLINE := $(foreach varname,$(DOCKER_ENV_VARS), \
|
||||
$(if $(filter command,$(origin $(varname))), \
|
||||
'$(varname)=$($(varname))', \
|
||||
))
|
||||
DOCKER_OVERRIDE_CMDLINE := $(strip $(DOCKER_OVERRIDE_CMDLINE))
|
||||
|
||||
# This will execute `make $(DOCKER_MAKECMDGOALS)` inside a Docker container.
|
||||
# We do not push the regular $(MAKECMDGOALS) to the container's make command in
|
||||
@ -93,4 +100,4 @@ DOCKER_ENVIRONMENT_CMDLINE := $(strip $(DOCKER_ENVIRONMENT_CMDLINE))
|
||||
-e 'RIOTPROJECT=$(DOCKER_BUILD_ROOT)/riotproject' \
|
||||
$(DOCKER_ENVIRONMENT_CMDLINE) \
|
||||
-w '$(DOCKER_BUILD_ROOT)/riotproject/$(BUILDRELPATH)' \
|
||||
'$(DOCKER_IMAGE)' make $(DOCKER_MAKECMDGOALS)
|
||||
'$(DOCKER_IMAGE)' make $(DOCKER_MAKECMDGOALS) $(DOCKER_OVERRIDE_CMDLINE)
|
||||
|
Loading…
Reference in New Issue
Block a user