mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
73 lines
1.6 KiB
Makefile
73 lines
1.6 KiB
Makefile
# Catala compiler rules
|
|
|
|
install-dependencies-ocaml:
|
|
opam install \
|
|
ANSITerminal \
|
|
sedlex \
|
|
menhir \
|
|
menhirLib \
|
|
dune dune-build-info \
|
|
cmdliner \
|
|
tls cohttp lwt cohttp-lwt-unix yojson\
|
|
re reason
|
|
|
|
install-dependencies: install-dependencies-ocaml
|
|
git submodule update --init
|
|
|
|
format:
|
|
dune build @fmt --auto-promote | true
|
|
|
|
build:
|
|
$(MAKE) -C src/catala/parsing parser_errors.ml
|
|
dune build
|
|
$(MAKE) format
|
|
|
|
install: build
|
|
dune build @install
|
|
|
|
# Pygments syntax highilghting rules
|
|
|
|
PYGMENTS_DIR=${CURDIR}/syntax_highlighting/pygments
|
|
|
|
PYGMENTIZE=$(PYGMENTS_DIR)/pygments/env/bin/pygmentize
|
|
|
|
$(PYGMENTIZE): $(PYGMENTS_DIR)/set_up_pygments.sh $(PYGMENTS_DIR)/catala.py
|
|
chmod +x $<
|
|
$<
|
|
|
|
pygments: $(PYGMENTIZE)
|
|
|
|
# Examples-related rule
|
|
|
|
EXAMPLES_DIR=examples
|
|
ALLOCATIONS_FAMILIALES_DIR=$(EXAMPLES_DIR)/allocations_familiales
|
|
ENGLISH_DUMMY_DIR=$(EXAMPLES_DIR)/dummy_english
|
|
|
|
allocations_familiales: $(PYGMENTIZE) build
|
|
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) allocations_familiales.pdf
|
|
|
|
allocations_familiales_expired: build
|
|
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) allocations_familiales.expired
|
|
|
|
english: $(PYGMENTIZE) build
|
|
$(MAKE) -C $(ENGLISH_DUMMY_DIR) english.pdf
|
|
|
|
all_examples: allocations_familiales english
|
|
|
|
# Misceallenous
|
|
|
|
all: install-dependencies install all_examples
|
|
|
|
clean:
|
|
dune clean
|
|
$(MAKE) -C $(ALLOCATIONS_FAMILIALES_DIR) clean
|
|
$(MAKE) -C $(ENGLISH_DUMMY_DIR) clean
|
|
|
|
inspect:
|
|
gitinspector -f ml,mli,mly,iro,tex,catala,md,ir --grading
|
|
|
|
# Special targets
|
|
|
|
.PHONY: inspect clean all all_examples english allocations_familiales pygments \
|
|
install build format install-dependencies install-dependencies-ocaml
|