@@ -77,6 +77,9 @@ make_noop = $(eval $$($1): % : ; @:)
7777ensure_binary = $(if $(shell which $1) ,,\
7878 $(error Could not find '$(strip $1) ' binary) )
7979
80+ # Note: Doesn't work for paths with spaces in them
81+ SRC_DIR =$(patsubst % /,% ,$(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) ) )
82+
8083# ------------ Multiple platforms ------------
8184
8285ifeq ($(shell expr $(words $(PLATFORMS ) ) \> 1) , 1)
@@ -95,7 +98,8 @@ else ifneq ($(NATIVE_PLATFORM),$(PLATFORMS))
9598linux-gcc-% : docker ;
9699docker :
97100 $(call ensure_binary,docker-compose)
98- @docker-compose run --rm $(PLATFORMS ) $(MFLAGS ) $(ACTUAL_GOALS ) DEBUG=$(DEBUG ) ; \
101+ @docker-compose -f $(SRC_DIR ) /docker-compose.yaml run --rm \
102+ $(PLATFORMS ) $(MFLAGS ) $(ACTUAL_GOALS ) DEBUG=$(DEBUG ) ; \
99103 stty sane # Work around docker-compose messing up the terminal
100104
101105$(call make_noop,ACTUAL_GOALS)
@@ -117,8 +121,6 @@ ifeq ($(strip $(ACTUAL_GOALS)),)
117121 $(NATIVE_PLATFORM ) : $(ACTUAL_GOALS )
118122endif
119123
120- # Note: Doesn't work for paths with spaces in them
121- SRC_DIR =$(patsubst % /,% ,$(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) ) )
122124vpath % .cpp $(SRC_DIR ) /src
123125
124126PKG_CONFIG = pkg-config
0 commit comments