forked from opencontrol/freedonia-compliance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 978 Bytes
/
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
# This makefile provides some shortcuts to generating update documents
# based on any changes in the input files. Typical usage to make a
# PDF complete from all sources:
# `make clean pdf`
# or likewise for serving the content:
# `make clean serve`
#
# FIXME: Add rules so generated files are compared instead of their directories
CM = compliance-masonry
GB = gitbook
# GNU Make trick from
# http://stackoverflow.com/questions/5618615/check-if-a-program-exists-from-a-makefile
EXECUTABLES = $(CM) $(GB)
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
default: pdf
clean:
rm -rf exports/ opencontrols/
pdf: exports
cd exports && gitbook pdf ./ ../assets/example.pdf
serve: exports
cd exports && gitbook serve
exports: opencontrols
${CM} docs gitbook FredRAMP-low
opencontrols: opencontrol.yaml */component.yaml markdowns/*/*md markdowns/*md
-${CM} get
coverage:
${CM} diff FredRAMP-low