-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.in
More file actions
1732 lines (1317 loc) · 55 KB
/
Copy pathMakefile.in
File metadata and controls
1732 lines (1317 loc) · 55 KB
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
####################################################################
# #
# The Why3 Verification Platform / The Why3 Development Team #
# Copyright 2010-2025 -- Inria - CNRS - Paris-Saclay University #
# #
# This software is distributed under the terms of the GNU Lesser #
# General Public License version 2.1, with the special exception #
# on linking described in file LICENSE. #
####################################################################
.DELETE_ON_ERROR:
VERBOSEMAKE ?= @enable_verbose_make@
ifeq ($(VERBOSEMAKE),yes)
SHOW = @true
HIDE =
else
SHOW = @echo
HIDE = @
endif
# install the binaries
DESTDIR =
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
ifneq (@OCAML_OS_TYPE@,Win32)
BINDIR = $(DESTDIR)@bindir@
LIBDIR = $(DESTDIR)@libdir@
DATADIR = $(DESTDIR)@datarootdir@
MANDIR = $(DESTDIR)@mandir@
else
# Convert every \ to / in Windows paths so that the \ do not need to be escaped
BINDIR = $(subst \,/,$(DESTDIR)@bindir@)
LIBDIR = $(subst \,/,$(DESTDIR)@libdir@)
DATADIR = $(subst \,/,$(DESTDIR)@datarootdir@)
MANDIR = $(subst \,/,$(DESTDIR)@mandir@)
endif
TOOLDIR = $(LIBDIR)/why3/commands
# OS specific stuff
EXE = @EXE@
# other variables
CC = @CC@
MKDIR_P = @MKDIR_P@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
ifeq (@enable_ocamlfind@,yes)
OCAMLC = @OCAMLFIND@ ocamlc
OCAMLOPT = @OCAMLFIND@ ocamlopt
OCAMLDEP = @OCAMLFIND@ ocamldep
OCAMLDOC = @OCAMLFIND@ ocamldoc
else
OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
OCAMLDEP = @OCAMLDEP@
OCAMLDOC = @OCAMLDOC@
endif
OCAMLFIND = @OCAMLFIND@
OCAMLLEX = @OCAMLLEX@
OCAMLYACC = @OCAMLYACC@
OCAMLLIB = @OCAMLLIB@
OCAMLINSTALLLIB = $(DESTDIR)@OCAMLINSTALLLIB@
OCAMLBEST = @OCAMLBEST@
OCAMLVERSION = @OCAMLVERSION@
COQC = @COQC@
COQDEP = @COQDEP@
COQFLAGS = @COQFLAGS@
FRAMAC_LIBDIR = $(DESTDIR)@FRAMAC_LIBDIR@
MENHIR = @MENHIR@
DEPFLAGS = -slash
ifeq (@enable_why3_lib@,yes)
INCLUDES += -I lib/why3
endif
ifeq (@OCAMLBEST@,opt)
SHAREDBEST=cmxs
else
SHAREDBEST=cma
endif
ifeq (@LATEX@,rubber)
LATEXCOMP=rubber --warn all --pdf
LATEXCLEAN=rubber --pdf --clean
endif
ifeq (@LATEX@,latexmk)
LATEXCOMP=LATEXOPTS= latexmk --pdf
LATEXCLEAN=LATEXOPTS= latexmk --pdf -C
endif
ifeq (@LATEX@,pdflatex)
LATEXCOMP=pdflatex
LATEXCLEAN=true
endif
SPHINX = @SPHINX@
EMACS = @EMACS@
#PSVIEWER = @PSVIEWER@
#PDFVIEWER = @PDFVIEWER@
EXTINCLUDES = @WHY3INCLUDE@ @REINCLUDE@ @ZIPINCLUDE@ @MENHIRINCLUDE@ @BIGINTINCLUDE@ @INFERINCLUDE@
# warnings are enabled and non fatal by default, except:
# - disabled:
# 4 Fragile pattern matching: matching that will remain complete even
# if additional constructors are added to one of the variant types
# matched.
# 9 Missing fields in a record pattern.
# 41 Ambiguous constructor or label name.
# 42 Reliance on type-directed disambiguation
# 44 Open statement shadows an already defined identifier.
# 45 Open statement shadows an already defined label or constructor.
# 52 The argument of this constructor should not be matched against a
# constant pattern; the actual value of the argument could change
# in the future.
# - fatal:
# 5 Partially applied function: expression whose result has function
# type and is ignored.
# 8 Partial match: missing cases in pattern-matching.
# 14 Illegal backslash escape in string
# 48 Implicit elimination of optional arguments.
# 50 Unexpected documentation comment.
WARNINGS = A-4-9-41-42-44-45-52@5@8@14@48@50
FLAGS = -w $(WARNINGS) -safe-string -keep-locs -bin-annot -dtypes -g -thread $(INCLUDES)
OFLAGS = $(FLAGS)
BFLAGS = $(FLAGS)
ifeq (@enable_ocamlfind@,yes)
FLAGS += $(addprefix -package ,$(EXTPKGS))
OLINKFLAGS += -linkpkg -linkall
BLINKFLAGS += -linkpkg -linkall
else
FLAGS += $(EXTINCLUDES)
OLINKFLAGS = -linkall $(EXTCMXA)
BLINKFLAGS = -linkall $(EXTCMA)
endif
# see http://caml.inria.fr/mantis/view.php?id=4991
CMIHACK = -intf-suffix .cmi
CMP_CP = cmp -s $< $@ || cp $< $@
# external libraries common to all binaries
ifeq (@menhirlib_cmo@,yes)
EXTOBJS = menhirLib
EXTLIBS =
else
EXTOBJS =
EXTLIBS = menhirLib
endif
EXTLIBS += @RELIB@ unix zarith dynlink @ZIPLIB@ @WHY3LIB@ @INFERLIB@
EXTPKGS = menhirLib @RELIB@ unix zarith dynlink @ZIPLIB@ @MLMPFR@ @WHY3LIB@ @INFERPKG@ @SEXPLIB@ @SEXPLIBPPX@
EXTCMA = $(addsuffix .cmo,$(EXTOBJS)) $(addsuffix .cma,$(EXTLIBS))
EXTCMXA = $(addsuffix .cmx,$(EXTOBJS)) $(addsuffix .cmxa,$(EXTLIBS))
INSTALLED_LIB_EXTS = a cma cmx cmi cmxa cmxs cmt cmti
COMPILED_LIB_EXTS = $(INSTALLED_LIB_EXTS) o cmo annot dep conflicts
TOTARGET = > "$@" || (RV=$$?; rm -f "$@"; exit $${RV})
# Variables added for checking realizations
GENERATED_PREFIX_COQ="lib/coq"
GENERATED_PREFIX_ISABELLE=lib/isabelle
ifeq (@enable_why3_lib@,yes)
WHY3CMA = lib/why3/why3.cma
WHY3CMXA = lib/why3/why3.cmxa
else
WHY3CMA =
WHY3CMXA =
endif
###############
# main target
###############
all:
ifeq (@enable_why3_lib@,yes)
DUNEALLTARGET += @@OCAMLBEST@
endif
plugins: dune.@OCAMLBEST@
ifeq (@enable_local@,yes)
all: install_local
DUNEALLTARGET += @install_local
endif
.PHONY: byte opt clean depend all install install-lib uninstall
.PHONY: install-bin install-data uninstall-bin uninstall-data
.PHONY: install-bash install-emacs install-framac
.PHONY: uninstall-bash uninstall-emacs uninstall-framac
.PHONY: ide install-ide uninstall-ide
.PHONY: coq install-coq uninstall-coq clean-coq
.PHONY: pvs install-pvs uninstall-pvs clean-pvs
.PHONY: install-isabelle clean-isabelle
.PHONY: plugins
.PHONY: trywhy3 clean-trywhy3
.SUFFIXES:
MAKEINC =
CLEANDIRS =
CLEANLIBS =
GENERATED =
##############
# Dune
##############
.PHONY: dune.lib dune.byte dune.opt
DUNEPKGS =
ifeq (@enable_why3_lib@,yes)
DUNEPKGS += why3
DUNEALLTARGET += why3.install
endif
ifeq (@enable_ide@,yes)
DUNEPKGS += why3-ide
DUNEALLTARGET += bin/why3ide.$(SHAREDBEST)
endif
ifeq (@enable_coq_libs@,yes)
DUNEPKGS += why3-coq
endif
comma:=,
empty:=
# space value
space:= $(empty) $(empty)
DUNE = @DUNE@
DFLAGS = --root . --only-packages=$(subst $(space),$(comma),$(strip $(DUNEPKGS)))
DUNEFLAGS =
DUNEJOBS = auto
DUNEBUILD = $(DUNE) build $(DFLAGS) $(DUNEFLAGS) -j $(DUNEJOBS)
# Files created by this Makefile which must exists before calling dune
DUNEDEPS = src/dune src/util/config.ml src/parser/parser_messages.ml
FORCE:
dune.all: $(DUNEDEPS)
$(DUNEBUILD) $(DUNEALLTARGET)
# why3.install contains nothing but the why3 library for the moment
dune.lib: $(DUNEDEPS)
$(DUNEBUILD) why3.install
dune.byte: $(DUNEDEPS)
$(DUNEBUILD) @byte
dune.opt: $(DUNEDEPS)
$(DUNEBUILD) @opt
byte: dune.byte
opt: dune.opt
all: dune.all
clean::
$(DUNE) clean $(DUNEFLAGS)
##############
# Why3 library
##############
LIBGENERATED = \
src/util/config.ml \
src/parser/parser_messages.ml
.PHONY: initialize_messages update-parsing-error-handling
PARSERS=src/parser/parser_common.mly src/parser/parser.mly
src/parser/parser_messages.ml: src/parser/handcrafted.messages
@rm -f src/parser/parser_messages.ml src/parser/parser_messages.ml.tmp
@$(MENHIR) --strict $(PARSERS) --base src/parser/parser --update-errors \
src/parser/handcrafted.messages > src/parser/handcrafted.messages.temp
@if ! diff -b src/parser/handcrafted.messages src/parser/handcrafted.messages.temp > /dev/null; then \
echo "Parsing error handling must be updated, the file 'src/parser/handcrafted.messages.temp' \
contains an updated version that must be checked before replacing 'src/parser/handcrafted.messages'"; \
exit 1; \
fi
@rm -f src/parser/handcrafted.messages.temp
$(MENHIR) --strict $(PARSERS) --base src/parser/parser --compile-errors \
src/parser/handcrafted.messages > src/parser/parser_messages.ml
clean::
rm -f src/parser/parser_messages.ml.tmp src/parser/handcrafted.messages.temp
byte: dune.lib
opt: dune.lib
# clean and depend
GENERATED += $(LIBGENERATED)
###############
# installation
###############
uninstall-data::
rm -rf $(DATADIR)/why3
install-data::
$(MKDIR_P) $(DATADIR)/why3
$(MKDIR_P) $(DATADIR)/why3/vim
$(MKDIR_P) $(DATADIR)/why3/vim/ftdetect
$(MKDIR_P) $(DATADIR)/why3/vim/syntax
$(MKDIR_P) $(DATADIR)/why3/lang
$(MKDIR_P) $(DATADIR)/why3/stdlib
$(MKDIR_P) $(DATADIR)/why3/stdlib/mach
$(MKDIR_P) $(DATADIR)/why3/stdlib/mach/java
$(MKDIR_P) $(DATADIR)/why3/drivers
$(MKDIR_P) $(DATADIR)/why3/extraction_drivers
$(INSTALL_DATA) stdlib/*.mlw $(DATADIR)/why3/stdlib
$(INSTALL_DATA) stdlib/mach/*.mlw $(DATADIR)/why3/stdlib/mach
$(INSTALL_DATA) stdlib/mach/java/*.mlw $(DATADIR)/why3/stdlib/mach/java
$(INSTALL_DATA) drivers/*.drv drivers/*.gen $(DATADIR)/why3/drivers
$(INSTALL_DATA) extraction_drivers/*.drv $(DATADIR)/why3/extraction_drivers
$(INSTALL_DATA) LICENSE $(DATADIR)/why3/
$(INSTALL_DATA) share/provers-detection-data.conf $(DATADIR)/why3/
$(INSTALL_DATA) share/why3session.dtd $(DATADIR)/why3
$(INSTALL_DATA) share/Makefile.config $(DATADIR)/why3
$(INSTALL_DATA) share/vim/ftdetect/why3.vim $(DATADIR)/why3/vim/ftdetect/why3.vim
$(INSTALL_DATA) share/vim/syntax/why3.vim $(DATADIR)/why3/vim/syntax/why3.vim
$(INSTALL_DATA) share/lang/why3.lang $(DATADIR)/why3/lang/why3.lang
$(INSTALL_DATA) share/lang/why3c.lang $(DATADIR)/why3/lang/why3c.lang
$(INSTALL_DATA) share/lang/why3py.lang $(DATADIR)/why3/lang/why3py.lang
$(INSTALL_DATA) share/lang/coma.lang $(DATADIR)/why3/lang/coma.lang
ifeq (@enable_local@,yes)
else
install:: install-bin install-data
uninstall:: uninstall-bin uninstall-data
rm -rf $(LIBDIR)/why3
endif
uninstall-lib:
if test -d $(OCAMLINSTALLLIB) -a -w $(OCAMLINSTALLLIB); then \
rm -rf $(OCAMLINSTALLLIB)/why3; \
fi
uninstall:: uninstall-lib
install-lib::
$(DUNE) install --root . --prefix $(prefix) \
--libdir $(OCAMLINSTALLLIB) --section lib,libexec why3
##################
# Why3 emacs mode
##################
%.elc: %.el
$(EMACS) --batch --no-init-file -f batch-byte-compile $<
clean::
rm -f share/emacs/why3.elc
uninstall-emacs:
rm -f $(DATADIR)/emacs/site-lisp/why3.el
rm -f $(DATADIR)/emacs/site-lisp/why3.elc
uninstall:: uninstall-emacs
install-emacs:
$(MKDIR_P) $(DATADIR)/emacs/site-lisp/
$(INSTALL_DATA) share/emacs/why3.el $(DATADIR)/emacs/site-lisp/why3.el
ifeq (@enable_emacs_compilation@,yes)
$(INSTALL_DATA) share/emacs/why3.elc $(DATADIR)/emacs/site-lisp/why3.elc
endif
install:: install-emacs
ifeq (@enable_emacs_compilation@,yes)
all: share/emacs/why3.elc
endif
##################
# Why3 plugins
##################
PLUGINS = genequlin dimacs tptp python microc coma cfg forward_propagation
ifeq (@enable_hypothesis_selection@,yes)
PLUGINS += hypothesis_selection
endif
LIBPLUGCMA = $(PLUGINS:%=lib/plugins/%.cma)
LIBPLUGCMXS = $(PLUGINS:%=lib/plugins/%.cmxs)
uninstall-bin::
rm -f $(PLUGINS:%=$(LIBDIR)/why3/plugins/%.cma)
rm -f $(PLUGINS:%=$(LIBDIR)/why3/plugins/%.cmxs)
install-bin::
$(MKDIR_P) $(LIBDIR)/why3/plugins
$(INSTALL_DATA) $(wildcard $(LIBPLUGCMA) $(LIBPLUGCMXS)) $(LIBDIR)/why3/plugins
###############
# Why3 commands
###############
TOOLS_BIN = \
why3config why3execute why3extract why3prove \
why3realize why3replay why3show why3wc why3bench
bin/why3.opt: dune.all
bin/why3.byte: dune.all
$(TOOLS_BIN:%=bin/%.cma): dune.all
$(TOOLS_BIN:%=bin/%.cmxs): dune.all
bin/why3$(EXE): dune.all
uninstall-bin::
rm -f $(BINDIR)/why3$(EXE)
rm -f $(TOOLS_BIN:%=$(TOOLDIR)/%.$(SHAREDBEST))
install-bin::
$(MKDIR_P) $(BINDIR)
$(INSTALL) bin/why3.@OCAMLBEST@ $(BINDIR)/why3$(EXE)
$(MKDIR_P) $(TOOLDIR)
$(INSTALL_DATA) $(TOOLS_BIN:%=bin/%.$(SHAREDBEST)) $(TOOLDIR)
install_local:: bin/why3$(EXE) $(TOOLS_BIN:%=bin/%.$(SHAREDBEST))
install_local:: share/drivers share/extraction_drivers share/stdlib
ifneq (@OCAML_OS_TYPE@,Win32)
share/drivers share/extraction_drivers share/stdlib: share/%:
ln -snf ../$* $@
else
# On Windows with --enable-local, why3 does not find the files inside of
# symbolic link folders. Make copies instead, and since this is not a link
# anymore, make the copies every time the compilation is run.
.PHONY: share/drivers share/extraction_drivers share/stdlib
share/drivers share/extraction_drivers share/stdlib: share/%:
cp -r $* share/
ifeq (@enable_local@,yes)
clean::
rm -rf share/drivers
rm -rf share/extraction_drivers
rm -rf share/stdlib
endif
endif
##############
# Why3server #
##############
SERVER_MODULES := logging arraylist options queue readbuf request \
proc writebuf server-unix server-win
CPULIM_MODULES := cpulimit-unix cpulimit-win
SERVER_O := $(SERVER_MODULES:%=src/server/%.o)
CPULIM_O := $(CPULIM_MODULES:%=src/server/%.o)
TOOLS = lib/why3server$(EXE) lib/why3cpulimit$(EXE)
all: $(TOOLS)
lib/why3server$(EXE): $(SERVER_O)
$(CC) -Wall -o $@ $^
lib/why3cpulimit$(EXE): $(CPULIM_O)
$(CC) -Wall -o $@ $^
%.o: %.c
$(CC) -Wall -O -g -o $@ -c $<
uninstall-bin::
rm -f $(LIBDIR)/why3/why3server$(EXE) $(LIBDIR)/why3/why3cpulimit$(EXE)
rm -f $(LIBDIR)/why3/why3-call-pvs
install-bin::
$(MKDIR_P) $(LIBDIR)/why3
$(INSTALL) lib/why3server$(EXE) $(LIBDIR)/why3/why3server$(EXE)
$(INSTALL) lib/why3cpulimit$(EXE) $(LIBDIR)/why3/why3cpulimit$(EXE)
$(INSTALL) lib/why3-call-pvs $(LIBDIR)/why3/why3-call-pvs
clean::
rm -f $(SERVER_O) $(CPULIM_O) $(TOOLS)
##########
# gallery
##########
# we export exactly the programs that have a why3session.xml file
.PHONY: gallery gallery-simple gallery-subs
gallery: gallery-simple gallery-subs
gallery-simple:
@if test "$(GALLERYDIR)" = ""; then echo "set GALLERYDIR first"; exit 1; fi
@cd examples/; \
for x in `git ls-files */why3session.xml` ; do \
f=`dirname $$x`; \
if echo $$f | grep -q -e '\(_vc_sp\|^bignum\)$$'; then continue; fi; \
echo "exporting $$f"; \
mkdir -p $(GALLERYDIR)/$$f; \
WHY3CONFIG="" ../bin/why3.@OCAMLBEST@ session html $$x -o $(GALLERYDIR)/$$f; \
cp $$f.mlw $(GALLERYDIR)/$$f/; \
rm -f $(GALLERYDIR)/$$f/$$f.zip; \
git archive --format=zip -o $(GALLERYDIR)/$$f/$$f.zip HEAD $$f.mlw $$f; \
done
GALLERYSUBS=WP_revisited verifythis_2016_matrix_multiplication avl double_wp prover multiprecision
gallery-subs:
@if test "$(GALLERYDIR)" = ""; then echo "set GALLERYDIR first"; exit 1; fi
@for d in $(GALLERYSUBS) ; do \
echo "exporting examples/$$d"; \
mkdir -p $(GALLERYDIR)/$$d; \
cd examples/$$d; \
WHY3CONFIG="" ../../bin/why3.@OCAMLBEST@ doc --no-stdlib --no-load-default-plugins -L ../../stdlib -L . --stdlib-url https://www.why3.org/stdlib/ --warn-off=unused_variable *.mlw -o $(GALLERYDIR)/$$d; \
cd ..; \
rm -f $(GALLERYDIR)/$$d/$$d.zip; \
git archive --format=zip -o $(GALLERYDIR)/$$d/$$d.zip HEAD $$d; \
cd ..; \
done
########
# XML DTD validation
########
.PHONY: xml-validate xml-validate-local
xml-validate:
@for x in `find examples/ -name why3session.xml`; do \
xmllint --noout --valid $$x 2>&1 | head -1; \
done
xml-validate-local:
@for x in `find examples/ -name why3session.xml -print`; do \
xmllint --nonet --noout --path share --valid $$x 2>&1 | sed -e '/I.O error/d' | head -1; \
done
###############
# IDE
###############
ifeq (@enable_ide@,yes)
# build targets
bin/why3ide.cmxs: dune.all
bin/why3ide.cma: dune.all
ide: $(DUNEDEPS)
$(DUNEBUILD) bin/why3ide.$(SHAREDBEST)
uninstall-ide:
rm -f $(TOOLDIR)/why3ide.$(SHAREDBEST)
rm -rf $(DATADIR)/why3/images
uninstall:: uninstall-ide
install-ide:
$(MKDIR_P) $(TOOLDIR)
$(INSTALL_DATA) bin/why3ide.$(SHAREDBEST) $(TOOLDIR)
$(MKDIR_P) $(DATADIR)/why3/images
for i in share/images/*.rc; do \
d=`basename $$i .rc`; \
$(INSTALL_DATA) $$i $(DATADIR)/why3/images; \
$(MKDIR_P) $(DATADIR)/why3/images/$$d; \
$(INSTALL_DATA) share/images/$$d/* $(DATADIR)/why3/images/$$d; \
done
$(INSTALL_DATA) share/images/*.png $(DATADIR)/why3/images
install:: install-ide
install_local:: bin/why3ide.$(SHAREDBEST)
endif
###############
# WEBSERV
###############
# build targets
bin/why3webserver.cmxs: dune.all
bin/why3webserver.cma: dune.all
uninstall-bin::
rm -f $(TOOLDIR)/why3webserver.$(SHAREDBEST)
install-bin::
$(MKDIR_P) $(TOOLDIR)
$(INSTALL_DATA) bin/why3webserver.$(SHAREDBEST) $(TOOLDIR)
install_local:: bin/why3webserver.$(SHAREDBEST)
###############
# Session
###############
# build targets
bin/why3session.cmxs: dune.all
bin/why3session.cma: dune.all
uninstall-bin::
rm -f $(TOOLDIR)/why3session.$(SHAREDBEST)
install-bin::
$(MKDIR_P) $(TOOLDIR)
$(INSTALL_DATA) bin/why3session.$(SHAREDBEST) $(TOOLDIR)
install_local:: bin/why3session.$(SHAREDBEST)
###############
# Why3 Shell
###############
# build targets
bin/why3shell.cmxs: dune.all
bin/why3shell.cma: dune.all
uninstall-bin::
rm -f $(TOOLDIR)/why3shell.$(SHAREDBEST)
install-bin::
$(MKDIR_P) $(TOOLDIR)
$(INSTALL_DATA) bin/why3shell.$(SHAREDBEST) $(TOOLDIR)
install_local:: bin/why3shell.$(SHAREDBEST)
####################
# Coq realizations
####################
COQVERSIONSPECIFIC=
COQVERSIONSPECIFICTARGETS=$(addprefix lib/coq/, $(COQVERSIONSPECIFIC))
$(COQVERSIONSPECIFICTARGETS): %: %.@coq_compat_version@
$(CMP_CP)
clean-coq::
rm -f $(COQVERSIONSPECIFICTARGETS)
COQLIBS_INT_FILES = Abs ComputerDivision Div2 EuclideanDivision Int MinMax Power NumOf
COQLIBS_INT_ALL_FILES = Exponentiation $(COQLIBS_INT_FILES)
COQLIBS_BOOL_FILES = Bool
COQLIBS_REAL_FILES = Abs ExpLog FromInt MinMax PowerInt PowerReal Real RealInfix Square
COQLIBS_NUMBER_FILES = Divisibility Gcd Parity Prime Coprime
COQLIBS_SET_FILES = Set Cardinal Fset FsetInduction FsetInt FsetSum SetApp SetAppInt SetImp SetImpInt
COQLIBS_MAP_FILES = Map Const MapExt Occ MapPermut MapInjection
COQLIBS_LIST_FILES = List Length Mem Nth NthLength HdTl NthHdTl Append NthLengthAppend Reverse HdTlNoOpt NthNoOpt RevAppend Combine Distinct NumOcc Permut
COQLIBS_OPTION_FILES = Option
COQLIBS_BV_FILES = Pow2int BV_Gen
ifeq (@enable_coq_fp_libs@,yes)
COQLIBS_FP_FILES = Rounding SingleFormat Single DoubleFormat Double
COQLIBS_FP_ALL_FILES = GenFloat $(COQLIBS_FP_FILES)
COQLIBS_IEEEFLOAT_FILES = RoundingMode GenericFloat Float32 Float64
COQLIBS_REAL_FILES += Truncate
endif
ifeq (@enable_coq_interval@,yes)
COQLIBS_REAL_FILES += Trigonometry
endif
COQLIBS_INT = $(addprefix lib/coq/int/, $(COQLIBS_INT_ALL_FILES))
COQLIBS_BOOL = $(addprefix lib/coq/bool/, $(COQLIBS_BOOL_FILES))
COQLIBS_NUMBER = $(addprefix lib/coq/number/, $(COQLIBS_NUMBER_FILES))
COQLIBS_SET = $(addprefix lib/coq/set/, $(COQLIBS_SET_FILES))
COQLIBS_MAP = $(addprefix lib/coq/map/, $(COQLIBS_MAP_FILES))
COQLIBS_LIST = $(addprefix lib/coq/list/, $(COQLIBS_LIST_FILES))
COQLIBS_OPTION = $(addprefix lib/coq/option/, $(COQLIBS_OPTION_FILES))
COQLIBS_BV = $(addprefix lib/coq/bv/, $(COQLIBS_BV_FILES))
COQLIBS_REAL = $(addprefix lib/coq/real/, $(COQLIBS_REAL_FILES))
COQLIBS_FP = $(addprefix lib/coq/floating_point/, $(COQLIBS_FP_ALL_FILES))
COQLIBS_IEEEFLOAT = $(addprefix lib/coq/ieee_float/, $(COQLIBS_IEEEFLOAT_FILES))
COQLIBS_FOR_DRIVERS_FILES = ComputerOfEuclideanDivision
COQLIBS_FOR_DRIVERS = $(addprefix lib/coq/for_drivers/, $(COQLIBS_FOR_DRIVERS_FILES))
COQLIBS_FILES = lib/coq/BuiltIn lib/coq/HighOrd lib/coq/WellFounded $(COQLIBS_INT) $(COQLIBS_BOOL) $(COQLIBS_REAL) $(COQLIBS_NUMBER) $(COQLIBS_SET) $(COQLIBS_MAP) $(COQLIBS_LIST) $(COQLIBS_OPTION) $(COQLIBS_FP) $(COQLIBS_BV) $(COQLIBS_IEEEFLOAT) $(COQLIBS_FOR_DRIVERS)
%.vo: %.v
$(SHOW) 'Coqc $<'
$(HIDE)$(COQC) $(COQFLAGS) -R lib/coq Why3 $<
%.vd: %.v
$(SHOW) 'Coqdep $<'
$(HIDE)$(COQDEP) -R lib/coq Why3 $< $(TOTARGET)
COQV = $(addsuffix .v, $(COQLIBS_FILES))
COQVO = $(addsuffix .vo, $(COQLIBS_FILES))
COQVD = $(addsuffix .vd, $(COQLIBS_FILES))
coq: $(COQVO) drivers/coq-realizations.aux lib/coq/version
clean-coq::
rm -f $(COQVO) $(COQVD) $(addsuffix .glob, $(COQLIBS_FILES)) lib/coq/version \
$(foreach f,$(COQLIBS_FILES),$(dir $f).$(notdir $f).aux)
drivers/coq-realizations.aux: Makefile
$(SHOW) 'Generate $@'
$(HIDE)(echo "(* generated automatically at compilation time *)"; \
echo 'theory BuiltIn meta "realized_theory" "BuiltIn", "" end'; \
echo 'theory HighOrd meta "realized_theory" "HighOrd", "" end'; \
echo 'theory WellFounded meta "realized_theory" "WellFounded", "" end'; \
for f in $(COQLIBS_INT_FILES); do \
echo 'theory int.'"$$f"' meta "realized_theory" "int.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_BOOL_FILES); do \
echo 'theory bool.'"$$f"' meta "realized_theory" "bool.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_REAL_FILES); do \
echo 'theory real.'"$$f"' meta "realized_theory" "real.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_NUMBER_FILES); do \
echo 'theory number.'"$$f"' meta "realized_theory" "number.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_SET_FILES); do \
echo 'theory set.'"$$f"' meta "realized_theory" "set.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_MAP_FILES); do \
echo 'theory map.'"$$f"' meta "realized_theory" "map.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_LIST_FILES); do \
echo 'theory list.'"$$f"' meta "realized_theory" "list.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_OPTION_FILES); do \
echo 'theory option.'"$$f"' meta "realized_theory" "option.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_BV_FILES); do \
echo 'theory bv.'"$$f"' meta "realized_theory" "bv.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_IEEEFLOAT_FILES); do \
echo 'theory ieee_float.'"$$f"' meta "realized_theory" "ieee_float.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_FP_FILES); do \
echo 'theory floating_point.'"$$f"' meta "realized_theory" "floating_point.'"$$f"'", "" end'; done; \
for f in $(COQLIBS_FOR_DRIVERS_FILES); do \
echo 'theory for_drivers.'"$$f"' meta "realized_theory" "for_drivers.'"$$f"'", "" end'; done; \
) > $@
update-coq: update-coq-int update-coq-bool update-coq-real update-coq-number update-coq-set update-coq-map update-coq-list update-coq-option update-coq-fp update-coq-bv update-coq-ieee_float update-coq-for-drivers
LOCAL_STDLIB=-L stdlib --no-stdlib --no-load-default-plugins
update-coq-int: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/int.mlw
for f in $(COQLIBS_INT_ALL_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T int.$$f -o $(GENERATED_PREFIX_COQ)/int/; done
update-coq-bool: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/bool.mlw
for f in $(COQLIBS_BOOL_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T bool.$$f -o $(GENERATED_PREFIX_COQ)/bool/; done
update-coq-real: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/real.mlw
for f in $(COQLIBS_REAL_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T real.$$f -o $(GENERATED_PREFIX_COQ)/real/; done
update-coq-number: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/number.mlw
for f in $(COQLIBS_NUMBER_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T number.$$f -o $(GENERATED_PREFIX_COQ)/number/; done
update-coq-set: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/set.mlw
for f in $(COQLIBS_SET_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T set.$$f -o $(GENERATED_PREFIX_COQ)/set/; done
update-coq-map: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/map.mlw
for f in $(COQLIBS_MAP_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T map.$$f -o $(GENERATED_PREFIX_COQ)/map/; done
update-coq-list: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/list.mlw
for f in $(COQLIBS_LIST_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T list.$$f -o $(GENERATED_PREFIX_COQ)/list/; done
update-coq-option: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/option.mlw
for f in $(COQLIBS_OPTION_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T option.$$f -o $(GENERATED_PREFIX_COQ)/option/; done
update-coq-bv: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/bv.mlw
for f in $(COQLIBS_BV_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T bv.$$f -o $(GENERATED_PREFIX_COQ)/bv/; done
update-coq-for-drivers: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/for_drivers.mlw
for f in $(COQLIBS_FOR_DRIVERS_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T for_drivers.$$f -o $(GENERATED_PREFIX_COQ)/for_drivers/; done
update-coq-ieee_float: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/ieee_float.mlw
for f in $(COQLIBS_IEEEFLOAT_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T ieee_float.$$f -o $(GENERATED_PREFIX_COQ)/ieee_float/; done
update-coq-fp: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/coq-realizations.aux stdlib/floating_point.mlw
for f in $(COQLIBS_FP_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D coq-realize -T floating_point.$$f -o $(GENERATED_PREFIX_COQ)/floating_point/; done
ifeq (@enable_coq_libs@,yes)
uninstall-coq:
rm -rf $(LIBDIR)/why3/coq
install-coq:
$(MKDIR_P) $(LIBDIR)/why3/coq
$(INSTALL_DATA) lib/coq/version $(LIBDIR)/why3/coq/
$(INSTALL_DATA) lib/coq/BuiltIn.vo lib/coq/HighOrd.vo lib/coq/WellFounded.vo $(LIBDIR)/why3/coq/
$(MKDIR_P) $(LIBDIR)/why3/coq/int
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_INT)) $(LIBDIR)/why3/coq/int/
$(MKDIR_P) $(LIBDIR)/why3/coq/bool
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_BOOL)) $(LIBDIR)/why3/coq/bool/
$(MKDIR_P) $(LIBDIR)/why3/coq/real
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_REAL)) $(LIBDIR)/why3/coq/real/
$(MKDIR_P) $(LIBDIR)/why3/coq/number
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_NUMBER)) $(LIBDIR)/why3/coq/number/
$(MKDIR_P) $(LIBDIR)/why3/coq/set
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_SET)) $(LIBDIR)/why3/coq/set/
$(MKDIR_P) $(LIBDIR)/why3/coq/map
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_MAP)) $(LIBDIR)/why3/coq/map/
$(MKDIR_P) $(LIBDIR)/why3/coq/list
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_LIST)) $(LIBDIR)/why3/coq/list/
$(MKDIR_P) $(LIBDIR)/why3/coq/option
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_OPTION)) $(LIBDIR)/why3/coq/option/
$(MKDIR_P) $(LIBDIR)/why3/coq/bv
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_BV)) $(LIBDIR)/why3/coq/bv/
ifeq (@enable_coq_fp_libs@,yes)
$(MKDIR_P) $(LIBDIR)/why3/coq/floating_point
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_FP)) $(LIBDIR)/why3/coq/floating_point/
$(MKDIR_P) $(LIBDIR)/why3/coq/ieee_float
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_IEEEFLOAT)) $(LIBDIR)/why3/coq/ieee_float/
endif
$(MKDIR_P) $(LIBDIR)/why3/coq/for_drivers
$(INSTALL_DATA) $(addsuffix .vo, $(COQLIBS_FOR_DRIVERS)) $(LIBDIR)/why3/coq/for_drivers/
$(MKDIR_P) $(DATADIR)/why3/drivers
$(INSTALL_DATA) drivers/coq-realizations.aux $(DATADIR)/why3/drivers/
install:: install-coq
all: coq
ifneq "$(MAKECMDGOALS:update-coq%=update-coq)" "update-coq"
MAKEINC += $(COQVD)
endif
endif
install-data::
$(MKDIR_P) $(DATADIR)/why3/drivers
$(INSTALL_DATA) drivers/coq-realizations.aux $(DATADIR)/why3/drivers/
all: drivers/coq-realizations.aux
clean:: clean-coq
rm -f drivers/coq-realizations.aux
####################
# PVS realizations
####################
PVSLIBS_INT_FILES = Int Abs MinMax ComputerDivision EuclideanDivision
PVSLIBS_INT = $(addprefix lib/pvs/int/, $(PVSLIBS_INT_FILES))
PVSLIBS_REAL_FILES = Abs FromInt MinMax Real Square ExpLog Trigonometry \
PowerInt
# RealInfix
PVSLIBS_REAL = $(addprefix lib/pvs/real/, $(PVSLIBS_REAL_FILES))
PVSLIBS_LIST_FILES =
# Nth
PVSLIBS_LIST = $(addprefix lib/pvs/int/, $(PVSLIBS_LIST_FILES))
PVSLIBS_NUMBER_FILES = # Divisibility Gcd Parity Prime
PVSLIBS_NUMBER = $(addprefix lib/pvs/number/, $(PVSLIBS_NUMBER_FILES))
PVSLIBS_FP_FILES = Rounding SingleFormat Single DoubleFormat Double
PVSLIBS_FP_ALL_FILES = $(PVSLIBS_FP_FILES)
PVSLIBS_FP = $(addprefix lib/pvs/floating_point/, $(PVSLIBS_FP_ALL_FILES))
PVSLIBS_FILES = $(PVSLIBS_INT) $(PVSLIBS_REAL) $(PVSLIBS_LIST) \
$(PVSLIBS_NUMBER) $(PVSLIBS_FP)
update-pvs: bin/why3.@OCAMLBEST@ bin/why3realize.$(SHAREDBEST) drivers/pvs-realizations.aux
for f in $(PVSLIBS_INT_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D pvs-realize -T int.$$f -o lib/pvs/int/; done
for f in $(PVSLIBS_REAL_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D pvs-realize -T real.$$f -o lib/pvs/real/; done
for f in $(PVSLIBS_LIST_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D pvs-realize -T list.$$f -o lib/pvs/list/; done
for f in $(PVSLIBS_NUMBER_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D pvs-realize -T number.$$f -o lib/pvs/number/; done
for f in $(PVSLIBS_FP_FILES); do WHY3CONFIG="" bin/why3.@OCAMLBEST@ realize $(LOCAL_STDLIB) -D pvs-realize -T floating_point.$$f -o lib/pvs/floating_point/; done
drivers/pvs-realizations.aux: Makefile
$(SHOW) 'Generate $@'
$(HIDE)(echo "(* generated automatically at compilation time *)"; \
for f in $(PVSLIBS_INT_FILES); do \
echo 'theory int.'"$$f"' meta "realized_theory" "int.'"$$f"'", "" end'; done; \
for f in $(PVSLIBS_REAL_FILES); do \
echo 'theory real.'"$$f"' meta "realized_theory" "real.'"$$f"'", "" end'; done; \
for f in $(PVSLIBS_LIST_FILES); do \
echo 'theory list.'"$$f"' meta "realized_theory" "list.'"$$f"'", "" end'; done; \
for f in $(PVSLIBS_NUMBER_FILES); do \
echo 'theory number.'"$$f"' meta "realized_theory" "number.'"$$f"'", "" end'; done; \
for f in $(PVSLIBS_FP_FILES); do \
echo 'theory floating_point.'"$$f"' meta "realized_theory" "floating_point.'"$$f"'", "" end'; done; \
) > $@
pvs: lib/pvs/version
clean-pvs:
rm -f lib/pvs/version
ifeq (@enable_pvs_libs@,yes)
uninstall-pvs:
rm -rf $(LIBDIR)/why3/pvs
install-pvs:
$(MKDIR_P) $(LIBDIR)/why3/pvs
$(INSTALL_DATA) lib/pvs/version $(LIBDIR)/why3/pvs/
$(MKDIR_P) $(LIBDIR)/why3/pvs/int
$(INSTALL_DATA) $(addsuffix .pvs, $(PVSLIBS_INT)) $(LIBDIR)/why3/pvs/int/
$(INSTALL_DATA) $(addsuffix .prf, $(PVSLIBS_INT)) $(LIBDIR)/why3/pvs/int/
$(MKDIR_P) $(LIBDIR)/why3/pvs/real
$(INSTALL_DATA) $(addsuffix .pvs, $(PVSLIBS_REAL)) $(LIBDIR)/why3/pvs/real/
$(INSTALL_DATA) $(addsuffix .prf, $(PVSLIBS_REAL)) $(LIBDIR)/why3/pvs/real/
$(MKDIR_P) $(LIBDIR)/why3/pvs/floating_point/
$(INSTALL_DATA) $(addsuffix .pvs, $(PVSLIBS_FP)) $(LIBDIR)/why3/pvs/floating_point/
$(MKDIR_P) $(DATADIR)/why3/drivers/
$(INSTALL_DATA) drivers/pvs-realizations.aux $(DATADIR)/why3/drivers/
install:: install-pvs
all: pvs
endif
install-data::
$(MKDIR_P) $(DATADIR)/why3/drivers/
$(INSTALL_DATA) drivers/pvs-realizations.aux $(DATADIR)/why3/drivers/
all: drivers/pvs-realizations.aux
clean:: clean-pvs
rm -f drivers/pvs-realizations.aux
#######################
# Isabelle realizations
#######################
ISABELLEVERSIONSPECIFIC=ROOT why3.ML Why3_BV.thy Why3_Map.thy
ISABELLEVERSIONSPECIFICTARGETS=$(addprefix lib/isabelle/, $(ISABELLEVERSIONSPECIFIC))
ISABELLEREALIZEDRV=isabelle-realize
ISABELLEREALIZEDRVPATH=drivers/$(ISABELLEREALIZEDRV).drv
$(ISABELLEVERSIONSPECIFICTARGETS): %: %.@ISABELLEVERSION@
$(CMP_CP)
clean-isabelle::
rm -f $(ISABELLEVERSIONSPECIFICTARGETS)
ISABELLELIBS_INT_FILES = Abs ComputerDivision Div2 EuclideanDivision Int MinMax Power
ISABELLELIBS_INT = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/int/, $(ISABELLELIBS_INT_FILES)))
ISABELLELIBS_BOOL_FILES = Bool
ISABELLELIBS_BOOL = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/bool/, $(ISABELLELIBS_BOOL_FILES)))
ISABELLELIBS_REAL_FILES = Real RealInfix Abs MinMax FromInt Truncate Square ExpLog Trigonometry PowerInt # not yet realized : PowerReal Hyperbolic Polar
ISABELLELIBS_REAL = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/real/, $(ISABELLELIBS_REAL_FILES)))
ISABELLELIBS_NUMBER_FILES = Divisibility Gcd Parity Prime Coprime
ISABELLELIBS_NUMBER = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/number/, $(ISABELLELIBS_NUMBER_FILES)))
ISABELLELIBS_SET_FILES = Set Fset
ISABELLELIBS_SET = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/set/, $(ISABELLELIBS_SET_FILES)))
ISABELLELIBS_MAP_FILES = Map Const Occ MapPermut MapInjection
ISABELLELIBS_MAP = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/map/, $(ISABELLELIBS_MAP_FILES)))
ISABELLELIBS_LIST_FILES = List Length Mem Nth NthNoOpt NthLength HdTl NthHdTl Append NthLengthAppend Reverse HdTlNoOpt RevAppend Combine Distinct NumOcc Permut
ISABELLELIBS_LIST = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/list/, $(ISABELLELIBS_LIST_FILES)))
ISABELLELIBS_BV_FILES = Pow2int
# BV8 BV16 BV32 BV64 BVConverter_32_64 BVConverter_16_64 BVConverter_8_64 BVConverter_16_32 BVConverter_8_32 BVConverter_8_16
ISABELLELIBS_BV = $(addsuffix .xml, $(addprefix $(GENERATED_PREFIX_ISABELLE)/bv/, $(ISABELLELIBS_BV_FILES)))
ISABELLELIBS = $(ISABELLELIBS_INT) $(ISABELLELIBS_BOOL) $(ISABELLELIBS_REAL) $(ISABELLELIBS_NUMBER) $(ISABELLELIBS_SET) $(ISABELLELIBS_MAP) $(ISABELLELIBS_LIST) $(ISABELLELIBS_OPTION) $(ISABELLELIBS_BV)