Created
March 20, 2015 18:14
-
-
Save sgrove/f9f78c2a4347bb6ea9c7 to your computer and use it in GitHub Desktop.
manual reloadlib target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all clean tower test | |
DIRTY_FLAG=$(shell git diff-index --quiet HEAD || echo "dirty") | |
ifeq ($(DIRTY_FLAG),dirty) | |
DIRTY=true | |
else | |
DIRTY=false | |
endif | |
all: tower | |
tower.native: towerVersion.ml | |
ocamlbuild -use-ocamlfind -cflags -w,@f@p@u@y -Is cli,lib tower.native | |
tower: tower.native | |
mv tower.native tower | |
towerVersion.ml: | |
printf "let git_rev = \"" > towerVersion.ml | |
git rev-parse HEAD | tr -d '\n' >> towerVersion.ml | |
printf "\"\nlet git_dirty = $(DIRTY)\n" >> towerVersion.ml | |
test: | |
$(MAKE) | |
$(MAKE) -C test | |
reloadlib: | |
ocamlfind ocamlc -package xmlm -c -o xmlRope.cmi lib/xmlRope.mli | |
ocamlfind ocamlc -package xmlm -c -o xmlRope.cmo lib/xmlRope.ml | |
ocamlfind ocamlc -package xmlm -c -o blueprint.cmi lib/blueprint.mli | |
ocamlfind ocamlc -package xmlm -c -o blueprint.cmo lib/blueprint.ml | |
clean: | |
ocamlbuild -clean | |
rm -f towerVersion.ml tower | |
$(MAKE) -C test clean | |
rm *.cmi | |
rm *.cmo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment