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

33 lines
587 B
Makefile
Raw Normal View History

2022-12-06 20:38:09 +01:00
MAIN = main
TESTS_DIR = tests
OUTPUT = output
TESTS = $(wildcard $(TESTS_DIR)/*.test)
2022-12-08 00:17:54 +01:00
INDENT = 21
2022-12-06 20:38:09 +01:00
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 \
2022-12-08 00:17:54 +01:00
printf "%$(INDENT)s : ❌ => " $$f; \
2022-12-06 20:38:09 +01:00
cat $(OUTPUT); \
else \
2022-12-08 00:17:54 +01:00
printf "%$(INDENT)s : 🎉\n" $$f; \
2022-12-06 20:38:09 +01:00
fi; \
done; \
rm $(OUTPUT)
clean:
rm -r *.cmi $(MAIN).byte _build/
archive:
2022-12-06 20:42:53 +01:00
tar czf "IC.tar.gz" *.ml *.mly *.mll Makefile $(TESTS_DIR)
2022-12-06 20:38:09 +01:00
symlinks:
ln -s _build/*.cmi .