-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 760 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (22 loc) · 760 Bytes
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
LIBDIR=$(shell erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell)
VERSION=0.1.0
PKGNAME=emysql
all: app
mkdir -p ebin
(cd src;$(MAKE))
app:
sh ebin/$(PKGNAME).app.in $(VERSION)
clean:
(cd src;$(MAKE) clean)
(cd t;$(MAKE) clean)
rm -rf ebin/*.app cover erl_crash.dump
package: clean
@mkdir emysql-$(VERSION)/ && cp -rf ebin include Makefile README src support t $(PKGNAME)-$(VERSION)
@COPYFILE_DISABLE=true tar zcf $(PKGNAME)-$(VERSION).tgz $(PKGNAME)-$(VERSION)
@rm -rf $(PKGNAME)-$(VERSION)/
install:
mkdir -p $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/{ebin,include}
for i in ebin/*.beam ebin/*.app include/*.hrl; do install $$i $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/$$i ; done
test: all
(cd t;$(MAKE))
prove t/*.t