summaryrefslogtreecommitdiff
path: root/Makefile
blob: 84553d49a01d277ee9114fc4b7b717afdf8df890 (plain)
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
# Makefile for catlfish

PREFIX=.
INSTDIR=$(PREFIX)/catlfish

build all:
	./make.erl

clean:
	-rm ebin/*.beam
	$(MAKE) -C doc $@

release: all
	rm -rf $(INSTDIR)
	mkdir $(INSTDIR)
	./makerelease.erl $(INSTDIR)

dist: release
	(VER=$$(./version.erl) && \
	ARCH=$$(uname -sm | sed -e 's/ /-/g') && \
	N=catlfish-$${VER}_$${ARCH} && \
	{ ln -s $(INSTDIR) $${N} && \
	tar c --dereference -f - $${N} | xz > $${N}.tar.xz; }; \
	rm $${N})

tests:
	make -C test tests

dialyze: build
	dialyzer ebin

tags:
	find . -name \*.?rl -o -name \*.py | etags -

doc:
	$(MAKE) -C $@

# Unit testing.
check: all
	test/check.erl