catala/Makefile

67 lines
1.4 KiB
Makefile
Raw Normal View History

2020-04-20 09:35:22 +03:00
# Catala compiler rules
2020-04-17 14:02:15 +03:00
install-dependencies:
opam install \
ANSITerminal \
sedlex \
menhir \
menhirLib \
dune \
cmdliner \
tls cohttp lwt cohttp-lwt-unix yojson\
re
2020-04-17 14:02:15 +03:00
git submodule update --init
2020-04-20 09:35:22 +03:00
format:
2020-04-24 20:16:50 +03:00
dune build @fmt --auto-promote | true
2020-04-20 09:35:22 +03:00
2020-04-19 17:30:18 +03:00
build: format
dune build
2020-04-20 09:35:22 +03:00
install: build
2020-04-16 18:47:35 +03:00
dune build @install
2020-04-20 09:35:22 +03:00
# Pygments syntax highilghting rules
2020-03-08 05:30:37 +03:00
2020-04-17 16:53:23 +03:00
PYGMENTS_DIR=${CURDIR}/syntax_highlighting/pygments
PYGMENTIZE=$(PYGMENTS_DIR)/pygments/env/bin/pygmentize
2020-04-19 17:30:18 +03:00
$(PYGMENTIZE): $(PYGMENTS_DIR)/set_up_pygments.sh $(PYGMENTS_DIR)/catala.py
chmod +x $<
$<
2020-04-20 09:35:22 +03:00
pygments: $(PYGMENTIZE)
# Examples-related rule
EXAMPLES_DIR=examples
ALLOCATIONS_FAMILIALES_DIR=$(EXAMPLES_DIR)/allocations_familiales
2020-04-20 10:07:12 +03:00
ENGLISH_DUMMY_DIR=$(EXAMPLES_DIR)/dummy_english
2020-04-20 09:35:22 +03:00
allocations_familiales: $(PYGMENTIZE) build
2020-04-22 13:50:33 +03:00
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) allocations_familiales.expired
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) allocations_familiales.pdf
2020-04-20 09:35:22 +03:00
english: $(PYGMENTIZE) build
$(MAKE) -C $(ENGLISH_DUMMY_DIR) english.pdf
2020-04-19 17:30:18 +03:00
2020-04-20 09:35:22 +03:00
all_examples: allocations_familiales english
2020-04-20 09:35:22 +03:00
# Misceallenous
2020-04-20 09:35:22 +03:00
all: install-dependencies install all_examples
2020-04-20 09:35:22 +03:00
clean:
dune clean
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) clean
$(MAKE) -C $(ENGLISH_DUMMY_DIR) clean
2020-04-19 17:30:18 +03:00
2020-04-13 19:57:24 +03:00
inspect:
2020-04-16 18:47:35 +03:00
gitinspector -f ml,mli,mly,iro,tex,catala,md,ir --grading
2020-04-20 20:37:16 +03:00
# Special targets
.PHONY: inspect clean all all_examples english allocations_familiales pygments \
install build format install-dependencies