forked from openebs/openebs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (38 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Makefile for building Containers for Storage Testing
#
#
# Reference Guide - https://www.gnu.org/software/make/manual/make.html
#
# Internal variables or constants.
# NOTE - These will be executed when any make target is invoked.
#
IS_DOCKER_INSTALLED := $(shell which docker >> /dev/null 2>&1; echo $$?)
help:
@echo ""
@echo "Usage:-"
@echo "\tmake build -- will build openebs components"
@echo "\tmake deps -- will verify build dependencies are installed"
@echo ""
_build_check_docker:
@if [ $(IS_DOCKER_INSTALLED) -eq 1 ]; \
then echo "" \
&& echo "ERROR:\tdocker is not installed. Please install it before build." \
&& echo "" \
&& exit 1; \
fi;
deps: _build_check_docker
@echo ""
@echo "INFO:\tverifying dependencies for OpenEBS ..."
_build_operator_image:
@echo "INFO: Building container image for OpenEBS K8s Operator"
cd k8s/lib/operator && docker build -t openebs/operator .
_push_operator_image:
@echo "INFO: Publish container (openebs/operator)"
cd k8s/lib/operator/buildscripts && ./push
build: deps _build_operator_image _push_operator_image
#
# This is done to avoid conflict with a file of same name as the targets
# mentioned in this makefile.
#
.PHONY: help deps build
.DEFAULT_GOAL := build