Correctly handle the case where there are no duplicates.
[etorrent.git] / Makefile
blob30ce106f84305b02ceb2c1347901411fb949785c
1 ## Etorrent Makefile
2 ## Try to keep it so simple it can be run with BSD-make as well as
3 ## GNU-make
5 -include Makefile.config
7 VER=1.0
9 SHELL=/bin/sh
10 ETORRENT_LIB=./lib/etorrent-1.0
11 all: libs
13 libs:
14 cd lib && $(MAKE)
16 dialyzer: libs
17 $(DIALYZER) $(DIALYZER_OPTS) --verbose -I $(ETORRENT_LIB)/include -r $(ETORRENT_LIB)/ebin
19 dialyzer-succ: libs
20 $(DIALYZER) --verbose --succ_typings -I $(ETORRENT_LIB)/include -r $(ETORRENT_LIB)
22 tags:
23 cd lib && $(MAKE) tags
25 run-create-db: libs
26 erl -noinput $(ERL_FLAGS) -pa $(ETORRENT_LIB)/ebin \
27 -config $(ETORRENT_LIB)/priv/etorrent.config \
28 -sname etorrent -s etorrent db_create_schema
30 run: libs
31 erl $(ERL_FLAGS) -pa $(ETORRENT_LIB)/ebin \
32 -config $(ETORRENT_LIB)/priv/etorrent.config \
33 -sname etorrent -s etorrent start
35 tracer:
36 erl -pa $(ETORRENT_LIB)/ebin -noinput \
37 -sname tracer -s tr client
39 clean:
40 cd lib && $(MAKE) clean
42 install:
43 mkdir -p $(RELEASE_PREFIX)/lib/etorrent-$(VER)
44 for i in src ebin include priv; do \
45 cp -r $(ETORRENT_LIB)/$$i $(RELEASE_PREFIX)/lib/etorrent-$(VER) ; \
46 done
48 mkdir -p $(BIN_PREFIX)
49 sed -e "s|%%%BEAMDIR%%%|$(RELEASE_PREFIX)/lib/etorrent-$(VER)/ebin|;" \
50 -e "s|%%%CONFIGFILE%%%|$(RELEASE_PREFIX)/lib/etorrent-$(VER)/priv/etorrent.config|;" \
51 -e "s|%%%ERL_FLAGS%%%|\"$(ERL_FLAGS)\"|" < ./bin/etorrentctl.in > $(BIN_PREFIX)/etorrentctl
52 chmod +x $(BIN_PREFIX)/etorrentctl