forked from kevsmith/giza
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (41 loc) · 1.26 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
LIBDIR=`erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell`
PKGNAME=giza
VERSION=0.2.0
all: test docs
ebin:
mkdir ebin
include:
mkdir -p include
cp src/giza.hrl include
compile: ebin include
cd src;erl -make
cp src/giza.app ebin
install:
mkdir -p $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/{ebin,include}
for i in ebin/*.beam include/*.hrl; do install $$i $(prefix)/$(LIBDIR)/$(PKGNAME)-$(VERSION)/$$i ; done
test: compile
cd t;erl -make
prove t/*.t
integration: compile
@echo !!! These tests require searchd to be running on localhost !!!
cd t;erl -make
prove t/*.integ
package: clean
mkdir ebin
@mkdir $(PKGNAME)-$(VERSION)/ && cp -rf ebin Makefile README.markdown src t $(PKGNAME)-$(VERSION)
@COPYFILE_DISABLE=true tar zcf $(PKGNAME)-$(VERSION).tgz $(PKGNAME)-$(VERSION)
@rm -rf $(PKGNAME)-$(VERSION)/
doc:
mkdir -p doc
docs: doc doc/*.html
doc/*.html:
erl -eval 'edoc:files(["./src/giza_datetime.erl","./src/giza_query.erl","./src/giza_request.erl","./src/giza_response.erl","./src/giza_protocol.erl"])'\
-noshell -s init stop
mv *.html erlang.png stylesheet.css edoc-info doc
clean:
rm -f *.tgz *.tar.gz edoc-info *.html erlang.png erl_crash.dump
rm -rf $(PKGNAME)-$(VERSION)
rm -rf ebin
rm -rf doc
rm -f t/*.beam
rm -rf include