forked from dalmatinerdb/dalmatinerdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (58 loc) · 1.59 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
APP=dalmatiner_db
.PHONY: all tree
REBAR=$(shell pwd)/rebar3
ELVIS=$(shell pwd)/elvis
APP=dalmatiner_db
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
uname_V6 := $(shell sh -c 'uname -v 2>/dev/null | cut -c-6 || echo not')
ifeq ($(uname_S),FreeBSD)
PLATFORM = freebsd
WMAKE = gmake
REBARPROFILE = fbsd
export REBARPROFILE
endif
ifeq ($(uname_V6),joyent)
PLATFORM = smartos
WMAKE = make
REBARPROFILE = smartos
export REBARPROFILE
endif
include fifo.mk
clean:
$(REBAR) clean
make -C rel/pkg clean
make -C rel/deb clean
make -C rel/pkgng clean
## LEAVING THIS IN FOR NOW
## TODO CONFORM WITH OTHER BUILD CMDS
deb-clean:
make -C rel/deb clean
deb-prepare:
$(REBAR) as deb compile
$(REBAR) as deb release
make -C rel/deb prepare
deb-package: deb-prepare
make -C rel/deb package
##
version:
@echo "$(shell git symbolic-ref HEAD 2> /dev/null | cut -b 12-)-$(shell git log --pretty=format:'%h, %ad' -1)" > dalmatinerdb.version
version_header: version
true
#@echo "-define(VERSION, <<\"$(shell cat dalmatinerdb.version)\">>)." > apps/dalmatinerdb/include/dalmatinerdb.hrl
long-test:
$(REBAR) as eqc,long eunit
dist: ${PLATFORM} ;
freebsd: update ${PLATFORM}/rel
gmake -C rel/pkgng package
smartos: update ${PLATFORM}/rel
make -C rel/pkg package
clean:
$(REBAR) clean
make -C rel/pkg clean
make -C rel/pkgng clean
freebsd/rel: version_header
$(REBAR) as ${REBARPROFILE} compile
$(REBAR) as ${REBARPROFILE} release
smartos/rel: version_header
$(REBAR) as ${REBARPROFILE} compile
$(REBAR) as ${REBARPROFILE} release