-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
86 lines (68 loc) · 2.9 KB
/
Makefile.in
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
# Makefile for ValidSDP
COQ_PROJ := _CoqProject
COQ_MAKEFILE := Makefile.coq
COQ_MAKE := +$(MAKE) -f $(COQ_MAKEFILE)
ifneq "$(COQBIN)" ""
COQBIN := $(COQBIN)/
else
COQBIN := $(dir $(shell which coqc))
endif
export COQBIN
PLUGDIR := plugins/soswitness
MODULE_SDPA := $(PLUGDIR)/test-suite/soswitnesstac_sdpa.v
ifeq (@SDPA_AVAILABLE@,true)
MODULES := $(MODULE_SDPA)
else
MODULES :=
endif
all plugin test install html gallinahtml doc deps.dot deps.png: $(COQ_MAKEFILE) Makefile
$(COQ_MAKE) $@
%.vo: %.v
$(COQ_MAKE) $@
# This rule could be moved to Makefile.coq.local
$(PLUGDIR)/src/soswitness.mlg: $(PLUGDIR)/src/soswitness_@[email protected]
$(RM) $@
cp -f -- $< $@
chmod a-w $@
$(COQ_MAKEFILE): $(COQ_PROJ) $(MODULES) $(PLUGDIR)/src/soswitness.mlg
$(COQBIN)coq_makefile -f $< $(MODULES) -o $@
# FIXME: This sed hack is fragile (if we do "make -B" for example)
sed -e 's/-shared -o $$@ $$</-shared -o $$@ logs.cmxa OcplibSimplex.cmxa osdp.cmxa $$</' -i $@
clean:
-$(COQ_MAKE) clean
$(RM) depend depend.dot depend.png depend.map
$(RM) $(PLUGDIR)/src/soswitness.mlg
$(RM) test-suite/*.vo test-suite/*.glob
distclean: clean
$(RM) -r autom4te.cache
$(RM) config.log config.status configure
$(RM) _CoqProject Makefile
$(RM) $(COQ_MAKEFILE) $(COQ_MAKEFILE).conf
$(RM) $(PLUGDIR)/theories/soswitness.v
FILES = AUTHORS LICENSE Makefile.in Makefile.coq.local.in _CoqProject.in\
README.md coq-validsdp.opam install_sdpa_on_debian_10.sh
# This must be disabled to cope with the distributed (stable) tarballs
# configure: configure.ac
# ./autogen.sh
Makefile: Makefile.in configure
./configure
_CoqProject: _CoqProject.in configure | Makefile
# ./configure
# Create a tarball dist.YYYY-MM-DD.XXX/validsdp-a.b.c.tar.gz
# containing validsdp-a.b.c/ with $(FILES), configure, and the
# git-archive export of dirs {theories,test-suite,$(PLUGDIR)}
dist: configure
@echo Exporting files from: $$(git describe --all --long --abbrev=40 --always --dirty)
export T=$$(readlink -f $$(mktemp -d dist.$$(date -I).XXX)) && export S=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ && mkdir -p $$T/$$S && rsync -rlpgoDvR $(FILES) $^ $$T/$$S && for dir in theories test-suite $(PLUGDIR); do git archive --format=tar HEAD -- $$dir | (mkdir -p $$T/$$S/$$dir && cd $$T/$$S && tar xf -); done && (cd $$T && sed -i -e 's,./autogen.sh &&,,' $$S/coq-validsdp.opam && tar cvzf $$S.tar.gz $$S); echo '\n'See $$T/'\n'
help:
@echo $(SOSWITNESS_DIR)
@echo "You can run:"
@echo " 'make' to build ValidSDP"
@echo " 'make plugin' to only build the soswitness plugin"
@echo " 'make install' to install ValidSDP"
@echo " 'make test' to run several tests"
@echo " 'make doc' to build the documentation of the library"
@echo " 'make clean' to remove generated files"
@echo " 'make distclean' to remove all generated files"
@echo " 'make dist' to prepare a tarball release"
.PHONY: all plugin test install html gallinahtml doc help clean distclean dist