forked from samsung-cnct/jsonsvalidator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (49 loc) · 1.69 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
52
53
54
55
56
.PHONY: repo-warning
#
# This makefile assumes that docker is installed
#
# 3/14/2016 mln
#
# golog compile via docker container:
# https://hub.docker.com/_/golang/
#
### this needs to be evaluated. See make.golang
VERSION := 1.0.0
DOCKER_IMAGE := jsonsvalidator
#
# do some repo evals... want everyone to use their own, unless building for the team
#
DEFAULT_REPO := "quay.io/samsung_cnct"
# will need to be changed to samsung-cnct for prod version
DOCKER_REPO ?= DEFAULT_REPO
REPO := $(DOCKER_REPO)
#
#
#
# MAKE SUTE TO FILTER OUT THE CONTAINTER START...just in case
#
ARGLIST := $(filter-out golang-build-container,$(MAKECMDGOALS))
LOCALARGLIST := $(filter golang-build-container, $(MAKECMDGOALS))
MAKECMDGOALS := $(LOCALARGLIST)
repo-warning:
@if [ $(DOCKER_REPO) = $(DEFAULT_REPO) ]; then \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"; \
echo " You have not changed DOCKER_REPO from: $(DOCKER_REPO)"; \
echo " You MUST set DOCKER_REPO in your environment"; \
echo " or directly in this Makefile unless you are"; \
echo " building for the group"; \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"; \
false; \
else \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"; \
echo " Your DOCKER_REPO is set to: $(DOCKER_REPO)"; \
echo " Please execute 'make all' to build"; \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"; \
fi
@echo "vars:$(MAKE):$(MAKECMDGOALS):$(MAKEFLAGS):$(ARGLIST)"
#
# attempt to pass everything through to build script
#
%::
@echo "vars:$(MAKE):$(MAKECMDGOALS):$(MAKEFLAGS):$(ARGLIST)"
./bin/build.sh -- $(MAKECMDGOALS) $(MAKEFLAGS) $(ARGLIST)