This repository has been archived on 2022-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
compilateurMIPS/Makefile
2022-12-27 17:17:56 +01:00

35 lines
682 B
Makefile

MAIN = main
TESTS_DIR = tests
OUTPUT = output
TESTS = $(wildcard $(TESTS_DIR)/*.test)
INDENT = 38
main:
ocamlbuild -use-menhir -no-hygiene $(MAIN).byte
test: main
test: $(TESTS)
@for f in $(TESTS); do \
./$(MAIN).byte $$f 1> /dev/null 2> $(OUTPUT); \
if [ -s $(OUTPUT) ]; then \
printf "%$(INDENT)s : ❌ => " $$f; \
cat $(OUTPUT); \
else \
printf "%$(INDENT)s : 🎉\n" $$f; \
fi; \
done; \
rm $(OUTPUT)
clean:
rm -r *.cmi $(MAIN).byte _build/ *.conflicts parser.ml parser.mli
archive:
tar czf "IC.tar.gz" *.ml *.mly *.mll Makefile $(TESTS_DIR) README.md
symlinks:
ln -s _build/*.cmi .
menhir-debug:
menhir parser.mly --explain --infer