hop-2012/Makefile

37 lines
879 B
Makefile
Raw Normal View History

2012-05-01 21:36:38 +00:00
APP=hop_server
2012-04-29 23:41:04 +00:00
TEMPLATES=$(wildcard web/bootstrap/templates/*.xml)
HTML=$(subst web/bootstrap/templates/,web/,$(subst .xml,.html,$(TEMPLATES)))
2012-01-08 17:41:04 +00:00
2012-04-29 23:41:04 +00:00
all: message.ml amqp_spec.ml $(APP).native web/bootstrap/css/bootstrap.css webpages
webpages: $(HTML)
2012-04-29 20:31:29 +00:00
web/bootstrap/css/bootstrap.css: web/bootstrap/less/*.less
recess --compile web/bootstrap/less/bootstrap.less > $@
2012-01-08 17:41:04 +00:00
2012-04-29 23:41:04 +00:00
web/%.html: web/bootstrap/templates/%.xml web/bootstrap/template.xsl web/bootstrap/nav.xml
xsltproc web/bootstrap/template.xsl $< > $@
2012-01-08 17:41:04 +00:00
message.ml: messages.json codegen.py
python codegen.py > $@
amqp_spec.ml: amqp0-9-1.stripped.xml amqp_codegen.py
python amqp_codegen.py > $@
2012-04-29 23:41:04 +00:00
webclean:
rm -f $(HTML)
clean: webclean
2012-01-08 17:41:04 +00:00
ocamlbuild -clean
rm -f message.ml
rm -f amqp_spec.ml
2012-01-08 17:41:04 +00:00
2012-04-29 20:31:29 +00:00
veryclean: clean
rm -f web/bootstrap/css/bootstrap.css
2012-01-08 17:41:04 +00:00
$(APP).native: $(wildcard *.ml)
ocamlbuild $@
run: all
./$(APP).native