Use Erlang make module to compile.
This commit is contained in:
parent
cc6bf5810a
commit
3c84c8a9fc
23
Makefile
23
Makefile
@ -2,25 +2,26 @@ PROJECT=getopt
|
||||
ERL=erl
|
||||
ERLC=erlc -I include -v -o ebin
|
||||
SOURCES=src/*.erl
|
||||
TEST_SOURCES=src/test/*.erl
|
||||
EPATH=-pa ebin
|
||||
DOC_OPTS={dir, \"doc\"}, {source_path, [\"include\", \"src\"]}
|
||||
|
||||
all:
|
||||
@mkdir -p ebin
|
||||
$(ERLC) $(SOURCES)
|
||||
|
||||
all_test: all
|
||||
@mkdir -p ebin
|
||||
$(ERLC) -DTEST $(TEST_SOURCES)
|
||||
|
||||
$(ERL) $(EPATH) -make
|
||||
|
||||
run:
|
||||
$(ERL) -sname "$(PROJECT)" $(EPATH)
|
||||
|
||||
test: all_test
|
||||
|
||||
test: all
|
||||
$(ERL) -noshell $(EPATH) -s $(PROJECT)_test test -s init stop
|
||||
|
||||
edoc: all
|
||||
$(ERL) -noshell $(EPATH) \
|
||||
-s $(PROJECT)_test test \
|
||||
-eval "edoc:files([string:tokens(\"src/getopt.erl\", \" \")], [$(DOC_OPTS)])" \
|
||||
-s init stop
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -fv ebin/*.beam
|
||||
rm -fv doc/*
|
||||
rm -fv erl_crash.dump ebin/erl_crash.dump
|
||||
|
Loading…
x
Reference in New Issue
Block a user