31 lines
647 B
Makefile
31 lines
647 B
Makefile
|
|
%.ascii.txt: %.txt
|
|
iconv -f utf-8 -t ascii//TRANSLIT $< -o $@
|
|
|
|
ascii: $(shell find textes/ -type f -iname "*.txt" ! -iname "*.ascii.txt" | sed "s/\.txt/\.ascii\.txt/")
|
|
|
|
%.cmx: %.ml
|
|
ocamlopt -c $<
|
|
|
|
%.cmo: %.ml
|
|
ocamlc -c $<
|
|
|
|
|
|
Code.cmo: Code.ml Math.cmo
|
|
mkdir tmp
|
|
cat Code.ml | sed '/^#/d' > tmp/Code.ml
|
|
ocamlc -c tmp/Code.ml Math.cmo
|
|
mv tmp/Code.cmo Code.cmo
|
|
rm -r tmp
|
|
|
|
tipe: tipe.cmx
|
|
ocamlopt -o tipe str.cmxa tipe.cmx
|
|
|
|
%.txt.test: %.ascii.txt tipe
|
|
./tipe $<
|
|
|
|
runall: $(shell find textes/ -type f -iname "*.txt" ! -iname "*.ascii.txt" | sed "s/\.txt/\.txt\.test/")
|
|
|
|
clean:
|
|
rm -rf tipe *.cmx *.cmi *.cmo *.o textes/*.ascii.txt *.ntl.ml
|