Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (41 sloc) 1.22 KB
ERL="@ERL@"
ERLC="@ERLC@"
YTOP="@YTOP@"
YAWS=$(YTOP)/bin/yaws
SUBST=../../scripts/Subst
COMPILER_PA = -pa $(YTOP)/ebin -pa $(YTOP)/test/ibrowse/ebin
%.beam: %.erl
"$(ERLC)" -Ddebug $(COMPILER_PA) $<
none:
echo "Do make clean|all|test"
exit 1
.PHONY: tclean setup start i connect status stop
tclean:
@rm -rf logs *.beam *.log yaws.conf erl_crash.dump 2> /dev/null || true
setup:
@rm -rf logs 2> /dev/null
@mkdir logs
start: quiet_stop setup
set -e ; if [ -f ./yaws.conf ]; then \
$(YTOP)/bin/yaws -sname test --daemon --id testid --conf ./yaws.conf; \
$(YTOP)/bin/yaws --id testid --wait-started; \
fi
## Interactive node
i:
$(YTOP)/bin/yaws -sname test -i --id testid --conf ./yaws.conf
PA = -pa $(YTOP)/test/ibrowse/ebin \
-pa $(YTOP)/test/src \
-pa $(YTOP)/ebin
## connect to existing yaws node
connect:
$(ERL) -sname client $(PA) \
-s test connect `hostname`
status:
$(YTOP)/bin/yaws --id testid --status
stop:
$(YTOP)/bin/yaws --id testid --stop && sleep 5 || true
quiet_stop:
$(YTOP)/bin/yaws --id testid --stop >/dev/null 2>&1 && sleep 5 || true
stdconf authconf revproxyconf deflateconf mimetypes:
cat ../conf/$@.conf | \
$(SUBST) %YTOP% $(YTOP) > yaws.conf
Something went wrong with that request. Please try again.