-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
52 lines (41 loc) · 1.11 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
.PHONY: all compile clean doc docs lib test
all: compile
compile:
mkdir -p ebin
@erl -make
clean:
rm -f *.beam ebin/*.beam
rm -f erl_crash.dump
rm -f `find doc/* -prune -type f`
make -C test clean
distclean: clean
make -C lib distclean
make -C test clean
doc:
cp doc/priv/* doc
./docgen.erl doc src/*.erl
docs: doc
install: soft_install
soft_install:
ln -sf `pwd`/ssacli.erl /usr/local/bin/ssacli
lib:
make -C lib
test:
make -C test
stat:
@all_erls="src/*erl ssacli.erl test/*.erl include/*.hrl" ;\
echo "lines of code (w/o comments):" ;\
cat `echo $$all_erls` |grep -v '^[[:space:]]*$$' |grep -v "^%" |wc -l ;\
echo "functions:" ;\
cat `echo $$all_erls` |grep '^[a-z].*(.*) ->' |wc -l ;\
echo "inline functions (fun()s)" ;\
cat `echo $$all_erls` |grep 'fun(' |wc -l ;\
echo "total comments:" ;\
cat `echo $$all_erls` |grep '%% ' |wc -l ;\
echo "pure comments:" ;\
cat `echo $$all_erls` |grep '^[[:space:]]*%% ' |wc -l ;\
echo "@doc comments:" ;\
cat `echo $$all_erls` |grep '^%% @doc' |wc -l ;\
echo "lines including binaries (<<>>):" ;\
cat `echo $$all_erls` |grep '<<' |wc -l ;\
echo