Skip to content
Newer
Older
100644 55 lines (41 sloc) 1.43 KB
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 2, 2010
1 REPO ?= bitcask
2 BITCASK_TAG = $(shell git describe --tags)
3 REVISION ?= $(shell echo $(BITCASK_TAG) | sed -e 's/^$(REPO)-//')
4 PKG_VERSION ?= $(shell echo $(REVISION) | tr - .)
bce1f3f @rtilder bz://906 Packaging import
rtilder authored Dec 1, 2010
5
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 3, 2010
6 .PHONY: rel deps package pkgclean
4e381d0 @dizzyd Basic skeletal work
dizzyd authored Mar 26, 2010
7
1cf9c52 add dep for ebloom
justin authored Apr 1, 2010
8 all: deps compile
4e381d0 @dizzyd Basic skeletal work
dizzyd authored Mar 26, 2010
9
10 compile:
11 ./rebar compile eunit
12
1cf9c52 add dep for ebloom
justin authored Apr 2, 2010
13 deps:
14 ./rebar get-deps
15
4e381d0 @dizzyd Basic skeletal work
dizzyd authored Mar 26, 2010
16 clean:
1cf9c52 add dep for ebloom
justin authored Apr 2, 2010
17 ./rebar clean
ad363ce dist tarball creation targets
Ryan Tilder authored Jun 15, 2010
18
19 # Release tarball creation
20 # Generates a tarball that includes all the deps sources so no checkouts are necessary
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 3, 2010
21 archivegit = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)
22 archivehg = hg archive $(2)/$(1)
23 archive = if [ -d ".git" ]; then \
24 $(call archivegit,$(1),$(2)); \
25 else \
26 $(call archivehg,$(1),$(2)); \
27 fi
28
29 buildtar = mkdir distdir && \
30 git clone . distdir/$(REPO)-clone && \
31 cd distdir/$(REPO)-clone && \
32 git checkout $(BITCASK_TAG) && \
33 $(call archive,$(BITCASK_TAG),..) && \
34 mkdir ../$(BITCASK_TAG)/deps && \
35 make deps; \
36 for dep in deps/*; do cd $${dep} && $(call archive,$${dep},../../../$(BITCASK_TAG)); cd ../..; done
37
ad363ce dist tarball creation targets
Ryan Tilder authored Jun 15, 2010
38 distdir:
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 3, 2010
39 $(if $(BITCASK_TAG), $(call buildtar), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
ad363ce dist tarball creation targets
Ryan Tilder authored Jun 15, 2010
40
41 dist $(BITCASK_TAG).tar.gz: distdir
42 cd distdir; \
43 tar czf ../$(BITCASK_TAG).tar.gz $(BITCASK_TAG)
44
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 3, 2010
45 ballclean:
ad363ce dist tarball creation targets
Ryan Tilder authored Jun 15, 2010
46 rm -rf $(BITCASK_TAG).tar.gz distdir
47
e0c1cc3 @slfritchie Undo the undo commit 39b3554 {sigh}
slfritchie authored Dec 3, 2010
48 package: dist
49 $(MAKE) -C package package
50
51 pkgclean:
52 $(MAKE) -C package pkgclean
53
54 export BITCASK_TAG PKG_VERSION REPO REVISION
Something went wrong with that request. Please try again.