2015-11-10 12:09:45 +01:00
|
|
|
# Plain make targets if not requested inside a container
|
2015-10-07 13:38:55 -07:00
|
|
|
ifneq (,$(findstring test-integration,$(MAKECMDGOALS)))
|
|
|
|
|
include Makefile.inc
|
|
|
|
|
include mk/main.mk
|
2015-12-21 17:19:39 -08:00
|
|
|
else ifneq ($(USE_CONTAINER), true)
|
2015-09-11 14:56:17 -07:00
|
|
|
include Makefile.inc
|
|
|
|
|
include mk/main.mk
|
|
|
|
|
else
|
|
|
|
|
# Otherwise, with docker, swallow all targets and forward into a container
|
2015-11-10 12:09:45 +01:00
|
|
|
DOCKER_BUILD_DONE := ""
|
2015-09-11 14:56:17 -07:00
|
|
|
|
2015-11-10 12:09:45 +01:00
|
|
|
test: .DEFAULT
|
2015-10-20 13:18:02 -07:00
|
|
|
|
2015-11-10 12:09:45 +01:00
|
|
|
.DEFAULT:
|
|
|
|
|
@test ! -z "$(DOCKER_BUILD_DONE)" || ./script/build_in_container.sh $(MAKECMDGOALS)
|
|
|
|
|
$(eval DOCKER_BUILD_DONE := "done")
|
2015-09-11 14:56:17 -07:00
|
|
|
|
|
|
|
|
endif
|