-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathMakefile
59 lines (39 loc) · 1.13 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
## =========
## erlang.mk
## =========
PROJECT = switchboard
PROFILE ?= dev
SITE_DIR = site
SITE_DOCS_DIR = $(SITE_DIR)/doc
ERLC_COMPILE_OPTS = -I include +'{parse_transform, lager_transform}' \
+debug_info +warn_export_all +warn_shadow_vars +warn_obsolete_guard
ERLC_OPTS += $(ERLC_COMPILE_OPTS)
TEST_ERLC_OPTS += $(ERLC_COMPILE_OPTS)
TEST_ERL_OPTS = -s switchboard
EDOC_OPTS = {dir, "$(SITE_DOCS_DIR)"}, no_packages, {subpackages, false}, {preprocess, true}
ifeq ($(PROFILE), dev)
RELX_OPTS = --dev-mode
endif
DEPS = lager gproc cowboy jsx poolboy
include erlang.mk
## ====================
## Switchboard specific
## ====================
.PHONY += markdown-docs site-docs
## ==========
## Site Guide
## ==========
update-docs: DOCS_BRANCH = gh-pages
update-docs: docs
git subtree push --prefix $(SITE_DIR) origin $(DOCS_BRANCH)
## ==============================
## Release tarballing + uploading
## ==============================
S3CMD_CONF = .s3cmd
S3CMD = s3cmd -c $(S3CMD_CONF)
$(PROJECT).tar.gz: _rel
tar -s/_rel// -cvf $@ $<
$(S3CMD_CONF):
$(S3CMD) --configure
push: switchboard.tar.gz $(S3CMD_CONF)
$(S3CMD) push