summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2018-12-27 09:28:07 +0000
committerPaul Bütow <pbuetow@mimecast.com>2018-12-27 09:28:07 +0000
commitba7c846a90a368c46915078f20da2426539318f9 (patch)
treeb2202208694c534f66681c6f80662094dd72c1a0 /Makefile
parent160cdff37109bbc58a1b02a6e6d54b55afad5130 (diff)
parentc70afeb9d36d3582e97b20650df2320b19249095 (diff)
Merge branch 'next-release' into 'master'0.5
Merge candidate for release 0.5 to master See merge request Storage/ioriot!1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7e7099d..fb75703 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
+KERNEL ?= $(shell uname -r)
DESTDIR=/opt/ioriot
+PWD=$(shell pwd)
all:
$(MAKE) -C systemtap
$(MAKE) -C ioriot
@@ -19,3 +21,13 @@ doxygen:
doxygen ./docs/doxygen.conf
test:
$(MAKE) -C ioriot test
+dockerbuild:
+ bash -c 'test ! -d $(PWD)/docker/opt/ && mkdir -p $(PWD)/docker/opt/; exit 0'
+ bash -c 'test -f /etc/fedora-release && sudo chcon -Rt svirt_sandbox_file_t $(PWD)/docker/opt; exit 0'
+ bash -c 'test -f /etc/centos-release && sudo chcon -Rt svirt_sandbox_file_t $(PWD)/docker/opt; exit 0'
+ bash -c 'test -f /etc/redhat-release && sudo chcon -Rt svirt_sandbox_file_t $(PWD)/docker/opt; exit 0'
+ sed s/KERNEL/$(KERNEL)/ Dockerfile.in > Dockerfile
+ docker build . -t ioriot:$(KERNEL)
+ docker run -v $(PWD)/docker/opt:/opt -e 'KERNEL=$(KERNEL)' -it ioriot:$(KERNEL) make all test install
+dockerclean:
+ bash -c 'test -d $(PWD)/docker && rm -Rfv $(PWD)/docker; exit 0'