-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (32 loc) · 1011 Bytes
/
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
# See LICENSE for licensing information.
include vsn.mk
PROJECT = $(notdir $(PWD))
TARBALL = $(PROJECT)-$(VSN)
DIALYZER = dialyzer
REBAR = rebar
all:
@$(REBAR) compile
clean:
@$(REBAR) clean
docs: all clean-docs
@$(REBAR) doc skip_deps=true
clean-docs:
rm -f doc/*.{css,html,png} doc/edoc-info
github-docs:
git checkout gh-pages
git checkout master src include mibs Makefile vsn.mk rebar.*
make docs
make clean
rm -fr ebin src include Makefile mibs priv erl_crash.dump vsn.mk rebar.*
mv doc/* .
rmdir doc
sh -c "ret=0; set +e; \
if git commit -a; then git push origin gh-pages; else ret=1; git reset --hard; fi; \
set -e; git checkout master; exit $$ret"
tar:
@rm -f $(TARBALL).tgz; \
tar zcf $(TARBALL).tgz --transform 's|^|$(TARBALL)/|' --exclude="core*" --exclude="erl_crash.dump" \
--exclude="*.tgz" --exclude="*.swp" --exclude="c_src" \
--exclude="Makefile" --exclude="rebar.*" --exclude="*.mk" \
--exclude="*.o" --exclude=".git*" * && \
echo "Created $(TARBALL).tgz"