-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
117 lines (92 loc) · 2.98 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Inputs to this makefile:
#
# DUNE_WORKSPACE
# CONTEXT
#
# DUNE_WORKSPACE takes priority over CONTEXT
PKGS = elpi equations extlib simpleio mathcomp mathcomp-extra quickchick software-foundations \
hahn paco snu-sflib promising fcsl-pcm htt pnp coqoban stdpp iris
CONTEXT = jscoq+32bit
ifeq ($(DUNE_WORKSPACE:%.64=64), 64)
CONTEXT = jscoq+64bit
endif
# needed when invoking `opam install`
OPAMSWITCH = $(CONTEXT)
export OPAMSWITCH
ifeq ($(DUNE_WORKSPACE),)
ifeq ($(CONTEXT), jscoq+64bit)
DUNE_WORKSPACE = $(PWD)/dune-workspace.64
endif
endif
ifneq ($(DUNE_WORKSPACE),)
export DUNE_WORKSPACE
endif
OPAM_ENV = eval `opam env`
BUILT_PKGS = ${filter $(PKGS), ${notdir ${wildcard _build/$(CONTEXT)/*}}}
_V = ${firstword $(VERSION) $(VER) $(V)}
COMMIT_FLAGS = -a
ifneq ($(_V),)
MSG = [deploy] Prepare for $(_V).
else
_V = ${shell jscoq --version}
MSG = ${error MSG= is mandatory}
endif
.PHONY: world-lite
world-lite:
cd mathcomp && make && make install # required by QuickChick, FCSL-PCM, HTT
world:
cd elpi && make && make install # required by mathcomp-extra
cd equations && make
cd extlib && make && make install # required by SimpleIO
cd simpleio && make && make install # required by QuickChick
cd mathcomp && make && make install # required by QuickChick, FCSL-PCM, HTT
cd mathcomp-extra && make
cd quickchick && make
cd paco && make
cd snu-sflib && make
cd fcsl-pcm && make && make install # required by HTT
cd htt && make && make install # required by PnP
cd pnp && make
cd coqoban && make
cd stdpp && make && make install # required by Iris
cd iris && make
ifneq ($(filter software-foundations, $(WITH_PRIVATE)),)
cd software-foundations && make
endif
privates:
ifneq ($(filter software-foundations, $(WITH_PRIVATE)),)
cd software-foundations && make
endif
.PHONY: %
env:
@echo export DUNE_WORKSPACE=$(DUNE_WORKSPACE)
set-ver:
_scripts/set-ver ${addprefix @,$(CONTEXT)} $(_V)
if [ -e _build/$(CONTEXT) ] ; then \
$(OPAM_ENV) && dune build _build/$(CONTEXT)/*/package.json ; fi # update build directory as well
pack:
rm -rf _build/$(CONTEXT)/*.tgz
_scripts/set-ver ${addprefix @,$(CONTEXT)} $(_V) _build/$(CONTEXT)
cd _build/$(CONTEXT) && npm pack ${addprefix ./, $(BUILT_PKGS)}
commit-all:
for d in $(PKGS); do ( cd $$d && git commit $(COMMIT_FLAGS) -m "$(MSG)" ); done
git commit $(COMMIT_FLAGS) -m "$(MSG)"
push-all:
for d in $(PKGS); do ( cd $$d && git push $(PUSH_FLAGS) ); done
commit+push-all:
for d in $(PKGS); do ( cd $$d && \
git commit $(COMMIT_FLAGS) -m "$(MSG)" && \
git push $(PUSH_FLAGS) ); done
git commit $(COMMIT_FLAGS) -m "$(MSG)" && git push $(PUSH_FLAGS)
clean-slate:
rm -rf */workdir
rm -rf _build
ci:
$(MAKE) clean-slate
$(OPAM_ENV) && $(MAKE)
$(MAKE) pack
FORCE:
build-%: FORCE
cd $* && make
install-%: FORCE
cd $* && make && make install