-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
99 lines (75 loc) · 1.99 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Makefile to manage build scripts
# vim: ts=4
export SHELL := /bin/bash
export PATH := ./bin:$(PATH)
# this will select the root dir of the makefile as build root
export BUILD_ROOT:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: all config build clean clean_env clean_box clean_cloud cloud_version \
distfiles finalize init startup test test_ansible parent_version \
upload vagrant_cloud_token version help readme download
## show help
help:
@printf "Usage: \033[1mmake <target>\033[0m \n\n"
@printf "The following targets are available: \n"
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t
@printf "\nEnvironment settings:\nBUILD_ROOT: \033[1m$$BUILD_ROOT\033[0m\n"
@printf "\nPlease consult \033[1mmake readme\033[0m for additional notes.\n"
## show readme file
readme:
@pandoc -f markdown -t asciidoc "./README.md"
## clean environment and build a new box
all: clean_env build
## show current configuration
config:
@config.sh
## build a raw box
build:
@build.sh
## clean temporary created files
clean:
@clean.sh
## clean vm environment
clean_env:
@clean_env.sh
## clean current box
clean_box:
@clean_box.sh
## clean cloud boxes
clean_cloud:
@clean_cloud.sh
## show cloud box versions
cloud_version:
@cloud_version.sh
## download and verify distfiles (from distfiles.list)
distfiles:
@distfiles.sh
## finalize a raw box
finalize:
@finalize.sh
## init a built box
init:
@init.sh
## startup an initialized box
startup:
@startup.sh
## test a built box
test:
@test.sh
## run ansible on built box
test_ansible:
@test_ansible.sh
## print parent version from vagrant cloud
parent_version:
@parent_version.sh
## download box from vagrant cloud
download:
@download.sh
## upload a built box to vagrant cloud
upload:
@upload.sh
## load token or request a new one
vagrant_cloud_token:
@vagrant_cloud_token.sh
## determine and print box version
version:
@version.sh