diff options
| author | Christian Hesse <mail@eworm.de> | 2020-02-01 21:38:55 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-03 16:03:25 +0100 |
| commit | 1790630a168c0071d92d0cde713a8f9eca34d130 (patch) | |
| tree | 4724f64c32df02f4bdc02382007e0aa565ae7378 /Makefile | |
| parent | 9e36e729cee27f2b13c2b72cd600968c2c5e874f (diff) | |
| download | vis-1790630a168c0071d92d0cde713a8f9eca34d130.tar.gz vis-1790630a168c0071d92d0cde713a8f9eca34d130.tar.xz | |
build: properly kill docker container
We keep a running docker container in the background. If the build
process fails this becomes dangling. Make sure the container is properly
killed.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -84,7 +84,10 @@ vis-single: vis-single.c vis-single-payload.inc ${CC} ${CFLAGS} ${CFLAGS_AUTO} ${CFLAGS_STD} ${CFLAGS_EXTRA} $< ${LDFLAGS} ${LDFLAGS_STD} ${LDFLAGS_AUTO} -luntar -llzma -o $@ ${STRIP} $@ -docker: clean +docker-kill: + -$(DOCKER) kill vis && $(DOCKER) wait vis + +docker: docker-kill clean $(DOCKER) build -t vis . $(DOCKER) run --rm -d --name vis vis tail -f /dev/null $(DOCKER) exec vis apk update @@ -98,7 +101,7 @@ docker: clean $(DOCKER) cp vis:/build/vis/vis-single vis $(DOCKER) kill vis -docker-clean: clean +docker-clean: docker-kill clean -$(DOCKER) image rm vis debug: clean @@ -187,4 +190,4 @@ uninstall: @echo removing support files from ${DESTDIR}${SHAREPREFIX}/vis @rm -rf ${DESTDIR}${SHAREPREFIX}/vis -.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all luacheck man docker docker-clean +.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all luacheck man docker-kill docker docker-clean |
