File: Remakefile.in

package info (click to toggle)
coq-interval 4.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,144 kB
  • sloc: cpp: 2,077; ansic: 285; python: 54; makefile: 19; sh: 5
file content (195 lines) | stat: -rw-r--r-- 6,019 bytes parent folder | download
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
FILES = \
	Tactic \
	Eval/Eval \
	Eval/Prog \
	Eval/Reify \
	Eval/Tree \
	Float/Basic \
	Float/Generic \
	Float/Generic_ops \
	Float/Generic_proof \
	Float/Specific_bigint \
	Float/Specific_ops \
	Float/Specific_sig \
	Float/Specific_stdz \
	Float/Sig \
	Integral/Bertrand \
	Integral/Integral \
	Integral/Priority \
	Integral/Refine \
	Interval/Interval \
	Interval/Interval_compl \
	Interval/Float \
	Interval/Float_full \
	Interval/Transcend \
	Interval/Univariate_sig \
	@LANG_FILES@ \
	Missing/Coquelicot \
	Missing/MathComp@MATHCOMP_1_OR_2@ \
	Missing/MathComp1or2 \
	Missing/MathComp \
	Missing/Stdlib \
	Poly/Basic_rec \
	Poly/Bound \
	Poly/Bound_quad \
	Poly/Datatypes \
	Poly/Taylor_model \
	Poly/Taylor_model_sharp \
	Poly/Taylor_poly \
	Real/Taylor \
	Real/Xreal \
	Real/Xreal_derive \
	Tactics/Integral_helper \
	Tactics/Interval_helper \
	Tactics/Plot_helper \
	Tactics/Root_helper \
	Tactic_float \
	@PLOT@ \
	@PRIM_FLOAT@

VFILES  = $(addprefix src/,$(addsuffix .v,$(FILES)))
VOFILES = $(addprefix src/,$(addsuffix .vo,$(FILES)))
GLOBS   = $(addprefix src/,$(addsuffix .glob,$(FILES)))

.PHONY: all check clean dist install

all: $(VOFILES)

clean: src/clean testsuite/clean

CONFIGURED_FILES = Remakefile src/Plot.v src/Missing/Int63Compat.v src/Missing/MathComp1or2.v

$(CONFIGURED_FILES): %: %.in config.status
	./config.status $@

configure config.status: configure.in
	autoconf
	./config.status --recheck

src/Tactic_float.v: @PRIM_FLOAT_TAC@ Remakefile
	cp @PRIM_FLOAT_TAC@ src/Tactic_float.v

%.vo: %.v | src/Tactic_float.v src/Plot.v src/Missing/Int63Compat.v src/Missing/MathComp1or2.v
	@COQDEP@ -R src Interval $< | @REMAKE@ -r $@
	@COQC@ @COQEXTRAFLAGS@ -R src Interval $<

COQPKGS = clib engine kernel interp lib library parsing pretyping printing proofs tactics toplevel vernac plugins.ltac
PACKAGES = $(addprefix -package @COQROOT@., $(COQPKGS)) -package zarith

src/Plot/interval_plot.ml: src/Plot/plot.c Remakefile
	@CPP@ -DCOQVERSION=@COQVERSION@ -DPLOTPLUGIN=\"@PLOTPLUGIN@\" $< -o $@

src/Plot/interval_plot.cmo: src/Plot/interval_plot.ml
	@OCAMLFIND@ ocamlc -rectypes -thread $(PACKAGES) -c $< -o $@

src/Plot/interval_plot.cmxs: src/Plot/interval_plot.ml
	@OCAMLFIND@ ocamlopt -rectypes -thread $(PACKAGES) -shared $< -o $@

MLTARGETS = $(addprefix src/Plot/, @TACTIC_TARGETS@)

src/Plot.vo: src/Plot.v $(MLTARGETS)
	@COQC@ @COQEXTRAFLAGS@ @TACTIC_PARAM@ -R src Interval -I src/Plot $<

src/clean:
	rm -f $(VOFILES) $(GLOBS)
	cd src
	rm -f *.vo* */*.vo*
	for d in */; do \
	  rm -f $d/.coq-native/*.o $d/.coq-native/*.cm*; done
	find . -type d -name ".coq-native" -empty -prune -exec rmdir "{}" \;
	rm -f Missing/Int63Compat.v Plot/interval_plot.ml Plot/interval_plot.cm* Plot/interval_plot.o Plot.v

check: src/Tactic.vo src/Plot.vo
	set +e
	cd testsuite
	logfile="failures-`date '+%Y-%m-%d'`.log"
	cat /dev/null > log.tmp
	cat /dev/null > "$logfile"
	rm -f check_tmp.v
	for f in *.v; do
	  cp "$f" check_tmp.v
	  @COQC@ -R ../src Interval -I ../src/Plot check_tmp.v > output.tmp 2>&1
	  return_code=$?
	  if [ ${return_code} -ne 0 ]; then
	    (echo "*** $f exited with error code ${return_code}"; cat output.tmp; echo) >> "$logfile"
	    echo "$f exited with error code ${return_code}" >> log.tmp
	  fi
	  rm -f picture.gnuplot
	  rm -f check_tmp.v check_tmp.vo check_tmp.glob .check_tmp.aux output.tmp
	  rm -f .coq-native/N*check_tmp.o .coq-native/N*check_tmp.cm*
	done
	return_code=0
	if [ -s log.tmp ]; then
	  echo "*** Failures:"
	  cat log.tmp
	  return_code=1
	else
	  rm "$logfile"
	fi
	rm log.tmp
	exit ${return_code}

testsuite/clean:
	rm -f testsuite/failures-*.log

deps.dot: $(VFILES)
	(echo "digraph interval_deps {" ;
	echo "node [shape=ellipse, style=filled, URL=\"html/Interval.\N.html\", color=black];";
	(cd src ; @COQDEP@ -m Plot/META.coq-interval -R . Interval $(addsuffix .v,$(FILES))) |
	  sed -n -e 's,/,.,g;s/[.]vo.*: [^ ]*[.]v//p' |
	  grep -v META |
	  while read src dst; do
	    color=$$(echo "$src" | sed -e 's,Real.*,turquoise,;s,Interval[.].*,plum,;s,Integral.*,lightcoral,;s,Poly.*,yellow,;s,Float.*,lightskyblue,;s,Eval.*,lawngreen,;s,Language.*,khaki,;s,Tactics.*,lightcyan,;s,Missing.*,lightgrey,;s,[A-Z].*,white,')
	    echo "\"$src\" [fillcolor=$color];"
	    for d in $dst; do
	      echo "\"$src\" -> \"${d%.vo}\" ;"
	    done
	  done;
	echo "}") | tred > $@

deps.png: deps.dot
	dot -T png deps.dot > deps.png

deps.map: deps.dot
	dot -T cmap deps.dot | sed -e 's,>$,/>,' > deps.map

html/index.html: $(VOFILES)
	rm -rf html
	mkdir -p html
	@COQDOC@ -toc -interpolate -utf8 -html -g -R src Interval -d html \
	  --coqlib_url https://coq.inria.fr/distrib/current/stdlib \
	  --external https://math-comp.github.io/htmldoc mathcomp \
	  --external https://flocq.gitlabpages.inria.fr/flocq/html Flocq \
	  --external https://coquelicot.gitlabpages.inria.fr/coquelicot Coquelicot \
	  $(VFILES)
	for f in html/*.html; do
	  sed -e 's;<a href="index.html">Index</a>;Go back to the <a href="../index.html">Main page</a> or <a href="index.html">Index</a>.;' -i $f
	done

doc: html/index.html

public: deps.png deps.map html/index.html
	mkdir -p public
	sed -e '/#include deps.map/r deps.map' misc/template.html > public/index.html
	cp -r html deps.png public/

install:
	dir="${DESTDIR}@COQUSERCONTRIB@/Interval"
	mkdir -p $dir
	for d in Eval Float Integral Interval Language Missing Poly Real Tactics; do mkdir -p $dir/$d; done
	for f in $(FILES); do cp src/$f.vo $dir/$f.vo; done
	( cd src && find . -type d -name ".coq-native" -exec cp -RT "{}" "$dir/{}" \; )
	dir="${DESTDIR}@COQINTERVALLIB@"
	mkdir -p $dir
	test -n "$(MLTARGETS)" && cp $(MLTARGETS) $dir/
	cat src/Plot/META.coq-interval | grep -v 'directory *=' > $dir/META

EXTRA_DIST = \
	configure

dist: $(EXTRA_DIST)
	PACK=@PACKAGE_TARNAME@-@PACKAGE_VERSION@
	rm -f $PACK.tar.gz
	git archive --format=tar --prefix=$PACK/ -o $PACK.tar HEAD
	tar rf $PACK.tar --transform="s,^,$PACK/," --mtime="`git show -s --format=%ci`" --owner=0 --group=0 $(EXTRA_DIST)
	gzip -n -f --best $PACK.tar