Restore support for building in the host environment

This commit is contained in:
Gary Talent 2016-12-22 20:28:48 -06:00
parent bf4e9e6bf6
commit 5d3c02e077

View File

@ -1,5 +1,7 @@
DEVENV=devenv$(shell pwd | sed 's/\//-/g') DEVENV=devenv$(shell pwd | sed 's/\//-/g')
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
ENV_RUN=docker exec --user $(shell id -u ${USER}) ${DEVENV} ENV_RUN=docker exec --user $(shell id -u ${USER}) ${DEVENV}
endif
make: make:
${ENV_RUN} make -j -C build ${ENV_RUN} make -j -C build
@ -17,7 +19,9 @@ debug: make
gdb ./build/current/src/wombat/wombat gdb ./build/current/src/wombat/wombat
devenv: devenv:
docker pull wombatant/devenv docker pull wombatant/devenv
docker run -d -v $(shell pwd):/usr/src/project -e LOCAL_USER_ID=$(shell id -u ${USER}) --name ${DEVENV} -t wombatant/devenv bash docker run -d -v $(shell pwd):/usr/src/project \
-e LOCAL_USER_ID=$(shell id -u ${USER}) \
--name ${DEVENV} -t wombatant/devenv bash
devenv-destroy: devenv-destroy:
docker rm -f ${DEVENV} docker rm -f ${DEVENV}