-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
66 lines (53 loc) · 2.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
##
# Quint
#
# @file
# @version 0.1
.PHONY: vscode quint local tutorials docs all apalache examples ./examples/README.md
all: vscode
# Build quint locally and make the executable `quint` available in shell
quint:
cd quint; npm install; npm run compile; npm link;
# Build the vscode plugin by pulling quint as a dependency from npm
# (not the sources!)
vscode: quint
cd vscode/quint-vscode; npm install; npm run compile
@echo ""
@echo "To install the compiled extension in VSCode, run this once:"
@echo "ln -s $(PWD)/vscode/quint-vscode/ $(HOME)/.vscode/extensions/informal.quint-vscode"
# Build quint and vscode from the sources without publishing them with npm
local: quint
cd quint; yalc publish
cd vscode/quint-vscode/server; npm uninstall @informalsystems/quint; yalc add @informalsystems/quint
cd vscode/quint-vscode; npm install; npm run compile
@echo ""
@echo "To install the compiled extension in VSCode, run this once:"
@echo "ln -s $(PWD)/vscode/quint-vscode/ $(HOME)/.vscode/extensions/informal.quint-vscode"
# Generate the tutorials
tutorials:
$(MAKE) -C tutorials
# Generate the docs
docs:
$(MAKE) -C doc
BUILD_DIR := quint/_build
quint/_build:
mkdir $@
# Download the latest Apalache for quint integration tests
apalache: | $(BUILD_DIR)
# remove the previously downloaded archive in case it exists (required by gh)
rm -f $(BUILD_DIR)/apalache.tgz
gh release download --repo apalache-mc/apalache --pattern apalache.tgz --dir $(BUILD_DIR)
tar -xvzf $(BUILD_DIR)/apalache.tgz --directory $(BUILD_DIR) > /dev/null
# Alias to update examples readme
examples: ./examples/README.md
EX_SCRIPTS:=./examples/.scripts
# The scripts for updating the ./examples/README.md and all the quint files needed
EXAMPLES_DEPS:=$(EX_SCRIPTS)/run-example.sh $(EX_SCRIPTS)/run-examples.sh $(shell find examples/ -type f -name "*.qnt")
./examples/README.md: $(EX_SCRIPTS)/README-text.md $(EXAMPLES_DEPS)
# Add a header
echo "<!-- DO NOT EDIT: THIS FILE IS GENERATED FROM $< VIA 'make examples' -->" > $@
# Append the human written README.md.txt
cat $< >> $@
# Generate the dashboard and append it
$(EX_SCRIPTS)/run-examples.sh >> $@
# end