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
|
#######################################################################
# v # The Coq Proof Assistant / The Coq Development Team #
# <O___,, # INRIA-Rocquencourt & LRI-CNRS-Orsay #
# \VV/ #############################################################
# // # This file is distributed under the terms of the #
# # GNU Lesser General Public License Version 2.1 #
#######################################################################
-include config/Makefile
###########################################################################
# Executables
###########################################################################
COQMKTOPBYTE:=bin/coqmktop.byte$(EXE)
COQMKTOPOPT:=bin/coqmktop.opt$(EXE)
BESTCOQMKTOP:=bin/coqmktop.$(BEST)$(EXE)
COQMKTOP:=bin/coqmktop$(EXE)
COQCBYTE:=bin/coqc.byte$(EXE)
COQCOPT:=bin/coqc.opt$(EXE)
BESTCOQC:=bin/coqc.$(BEST)$(EXE)
COQC:=bin/coqc$(EXE)
COQTOPBYTE:=bin/coqtop.byte$(EXE)
COQTOPOPT:=bin/coqtop.opt$(EXE)
BESTCOQTOP:=bin/coqtop.$(BEST)$(EXE)
COQTOPEXE:=bin/coqtop$(EXE)
CHICKENBYTE:=bin/coqchk.byte$(EXE)
CHICKENOPT:=bin/coqchk.opt$(EXE)
BESTCHICKEN:=bin/coqchk.$(BEST)$(EXE)
CHICKEN:=bin/coqchk$(EXE)
ifneq ($(HASNATDYNLINK),false)
DYNLINKCMXA:=dynlink.cmxa
NATDYNLINKDEF:=-DHasDynlink
DEPNATDYN:=
else
DYNLINKCMXA:=
NATDYNLINKDEF:=
DEPNATDYN:=-natdynlink no
endif
INSTALLBIN:=install
INSTALLLIB:=install -m 644
INSTALLSH:=./install.sh
MKDIR:=install -d
COQIDEBYTE:=bin/coqide.byte$(EXE)
COQIDEOPT:=bin/coqide.opt$(EXE)
COQIDE:=bin/coqide$(EXE)
ifeq ($(BEST),opt)
COQBINARIES:= $(COQMKTOP) $(COQC) \
$(COQTOPBYTE) $(COQTOPOPT) $(COQTOPEXE) $(CHICKENBYTE) $(CHICKENOPT) $(CHICKEN)
else
COQBINARIES:= $(COQMKTOP) $(COQC) \
$(COQTOPBYTE) $(COQTOPEXE) $(CHICKENBYTE) $(CHICKEN)
endif
OTHERBINARIES:=$(COQMKTOPBYTE) $(COQCBYTE)
CSDPCERT:=contrib/micromega/csdpcert$(EXE)
SRCDIRS:=\
config tools tools/coqdoc scripts lib \
kernel kernel/byterun library proofs tactics \
pretyping interp toplevel parsing ide/utils \
ide \
$(addprefix contrib/, \
omega romega micromega quote ring dp \
setoid_ring xml extraction interface fourier \
cc funind firstorder field subtac \
rtauto groebner )
# Order is relevent here because kernel and checker contain files
# with the same name
CHKSRCDIRS:= checker lib config kernel
###########################################################################
# tools
###########################################################################
COQDEP:=bin/coqdep$(EXE)
COQDEPBOOT:=bin/coqdep_boot$(EXE)
COQMAKEFILE:=bin/coq_makefile$(EXE)
GALLINA:=bin/gallina$(EXE)
COQTEX:=bin/coq-tex$(EXE)
COQWC:=bin/coqwc$(EXE)
COQDOC:=bin/coqdoc$(EXE)
TOOLS:=$(COQDEP) $(COQMAKEFILE) $(GALLINA) $(COQTEX) $(COQWC) $(COQDOC)
###########################################################################
# Documentation
###########################################################################
LATEX:=latex
BIBTEX:=BIBINPUTS=.: bibtex -min-crossrefs=10
MAKEINDEX:=makeindex
PDFLATEX:=pdflatex
HEVEA:=hevea
HEVEAOPTS:=-fix -exec xxdate.exe
HEVEALIB:=/usr/local/lib/hevea:/usr/lib/hevea
HTMLSTYLE:=simple
export TEXINPUTS:=$(COQSRC)/doc:$(HEVEALIB):
COQTEXOPTS:=-n 72 -image "$(COQSRC)/$(COQTOPEXE) -boot" -sl -small
DOCCOMMON:=doc/common/version.tex doc/common/title.tex doc/common/macros.tex
REFMANCOQTEXFILES:=$(addprefix doc/refman/, \
RefMan-gal.v.tex RefMan-ext.v.tex \
RefMan-mod.v.tex RefMan-tac.v.tex \
RefMan-cic.v.tex RefMan-lib.v.tex \
RefMan-tacex.v.tex RefMan-syn.v.tex \
RefMan-oth.v.tex RefMan-ltac.v.tex \
RefMan-decl.v.tex \
Cases.v.tex Coercion.v.tex Extraction.v.tex \
Program.v.tex Omega.v.tex Micromega.v.tex Polynom.v.tex \
Setoid.v.tex Helm.tex Classes.v.tex )
REFMANTEXFILES:=$(addprefix doc/refman/, \
headers.sty Reference-Manual.tex \
RefMan-pre.tex RefMan-int.tex RefMan-pro.tex RefMan-com.tex \
RefMan-uti.tex RefMan-ide.tex RefMan-add.tex RefMan-modr.tex \
ExternalProvers.tex ) \
$(REFMANCOQTEXFILES) \
REFMANEPSFILES:=doc/refman/coqide.eps doc/refman/coqide-queries.eps
REFMANFILES:=$(REFMANTEXFILES) $(DOCCOMMON) $(REFMANEPSFILES) doc/refman/biblio.bib
REFMANPNGFILES:=$(REFMANEPSFILES:.eps=.png)
###########################################################################
# Object and Source files
###########################################################################
COQRUN := coqrun
LIBCOQRUN:=kernel/byterun/lib$(COQRUN).a
DLLCOQRUN:=$(dir $(LIBCOQRUN))dll$(COQRUN)$(DLLEXT)
CLIBS:=unix.cma
CAMLP4OBJS:=gramlib.cma
CONFIG:=\
config/coq_config.cmo
LIBREP:=$(addprefix lib/, \
pp_control.cmo pp.cmo compat.cmo flags.cmo \
util.cmo bigint.cmo hashcons.cmo dyn.cmo \
system.cmo envars.cmo bstack.cmo edit.cmo \
gset.cmo gmap.cmo tlm.cmo gmapl.cmo \
profile.cmo explore.cmo predicate.cmo rtree.cmo \
heap.cmo option.cmo dnet.cmo )
# Rem: Cygwin already uses variable LIB
BYTERUN:=$(addprefix kernel/byterun/, \
coq_fix_code.o coq_memory.o coq_values.o coq_interp.o )
KERNEL0:=$(addprefix kernel/, \
names.cmo univ.cmo esubst.cmo term.cmo \
mod_subst.cmo sign.cmo cbytecodes.cmo copcodes.cmo \
cemitcodes.cmo declarations.cmo \
retroknowledge.cmo pre_env.cmo cbytegen.cmo environ.cmo \
conv_oracle.cmo closure.cmo reduction.cmo \
type_errors.cmo entries.cmo modops.cmo inductive.cmo \
typeops.cmo indtypes.cmo cooking.cmo \
term_typing.cmo subtyping.cmo mod_typing.cmo safe_typing.cmo )
KERNEL1:=$(addprefix kernel/, vm.cmo csymtable.cmo vconv.cmo )
KERNEL:=$(KERNEL0) $(KERNEL1)
LIBRARY:=$(addprefix library/, \
nameops.cmo libnames.cmo libobject.cmo summary.cmo \
nametab.cmo global.cmo lib.cmo declaremods.cmo \
library.cmo states.cmo decl_kinds.cmo dischargedhypsmap.cmo \
goptions.cmo decls.cmo heads.cmo )
PRETYPING:=$(addprefix pretyping/, \
termops.cmo evd.cmo reductionops.cmo vnorm.cmo \
inductiveops.cmo retyping.cmo cbv.cmo pretype_errors.cmo \
typing.cmo evarutil.cmo term_dnet.cmo recordops.cmo \
tacred.cmo evarconv.cmo typeclasses_errors.cmo \
typeclasses.cmo classops.cmo coercion.cmo unification.cmo \
clenv.cmo rawterm.cmo pattern.cmo detyping.cmo \
indrec.cmo cases.cmo pretyping.cmo matching.cmo )
INTERP:=\
parsing/lexer.cmo interp/topconstr.cmo interp/ppextend.cmo \
interp/notation.cmo interp/dumpglob.cmo \
interp/genarg.cmo interp/syntax_def.cmo interp/reserve.cmo \
library/impargs.cmo interp/implicit_quantifiers.cmo interp/constrintern.cmo \
interp/modintern.cmo interp/constrextern.cmo interp/coqlib.cmo \
toplevel/discharge.cmo library/declare.cmo
PROOFS:=$(addprefix proofs/, \
tacexpr.cmo proof_type.cmo redexpr.cmo proof_trees.cmo \
logic.cmo refiner.cmo evar_refiner.cmo tacmach.cmo \
pfedit.cmo tactic_debug.cmo clenvtac.cmo decl_mode.cmo )
PARSING:=$(addprefix parsing/, \
extend.cmo pcoq.cmo egrammar.cmo g_xml.cmo \
ppconstr.cmo printer.cmo pptactic.cmo ppdecl_proof.cmo \
tactic_printer.cmo printmod.cmo prettyp.cmo )
HIGHPARSING:=$(addprefix parsing/, \
g_constr.cmo g_vernac.cmo g_prim.cmo g_proofs.cmo \
g_tactic.cmo g_ltac.cmo g_natsyntax.cmo g_zsyntax.cmo \
g_rsyntax.cmo g_ascii_syntax.cmo g_string_syntax.cmo \
g_decl_mode.cmo g_intsyntax.cmo )
TACTICS:=\
tactics/dn.cmo tactics/termdn.cmo tactics/btermdn.cmo \
tactics/nbtermdn.cmo tactics/tacticals.cmo \
tactics/hipattern.cmo tactics/tactics.cmo \
tactics/evar_tactics.cmo \
tactics/hiddentac.cmo tactics/elim.cmo \
tactics/dhyp.cmo tactics/auto.cmo \
toplevel/ind_tables.cmo tactics/equality.cmo \
tactics/contradiction.cmo tactics/inv.cmo tactics/leminv.cmo \
tactics/tacinterp.cmo tactics/autorewrite.cmo \
tactics/decl_interp.cmo tactics/decl_proof_instr.cmo
TOPLEVEL:=\
toplevel/himsg.cmo toplevel/cerrors.cmo \
toplevel/class.cmo toplevel/vernacexpr.cmo toplevel/metasyntax.cmo \
toplevel/auto_ind_decl.cmo toplevel/libtypes.cmo toplevel/search.cmo \
toplevel/autoinstance.cmo toplevel/command.cmo toplevel/record.cmo \
parsing/ppvernac.cmo toplevel/classes.cmo \
toplevel/vernacinterp.cmo toplevel/mltop.cmo \
toplevel/vernacentries.cmo toplevel/whelp.cmo toplevel/vernac.cmo \
toplevel/line_oriented_parser.cmo toplevel/protectedtoplevel.cmo \
toplevel/toplevel.cmo toplevel/usage.cmo \
toplevel/coqinit.cmo toplevel/coqtop.cmo
HIGHTACTICS:=$(addprefix tactics/, \
refine.cmo extraargs.cmo extratactics.cmo \
eauto.cmo class_tactics.cmo tauto.cmo \
eqdecide.cmo )
# NB: Dependencies of contribs are now in separate files
# contrib/*/*_plugin.mllib
# Format of these files are compatible with ocamlbuild,
# Even if we don't use it (yet ?)
OMEGACMA:=contrib/omega/omega_plugin.cma
ROMEGACMA:=contrib/romega/romega_plugin.cma
MICROMEGACMA:=contrib/micromega/micromega_plugin.cma
QUOTECMA:=contrib/quote/quote_plugin.cma
RINGCMA:=contrib/ring/ring_plugin.cma
NEWRINGCMA:=contrib/setoid_ring/newring_plugin.cma
GBCMA:=contrib/groebner/groebner_plugin.cma
DPCMA:=contrib/dp/dp_plugin.cma
FIELDCMA:=contrib/field/field_plugin.cma
XMLCMA:=contrib/xml/xml_plugin.cma
FOURIERCMA:=contrib/fourier/fourier_plugin.cma
EXTRACTIONCMA:=contrib/extraction/extraction_plugin.cma
FUNINDCMA:=contrib/funind/recdef_plugin.cma
FOCMA:=contrib/firstorder/ground_plugin.cma
CCCMA:=contrib/cc/cc_plugin.cma
SUBTACCMA:=contrib/subtac/subtac_plugin.cma
RTAUTOCMA:=contrib/rtauto/rtauto_plugin.cma
CONTRIBS:=$(OMEGACMA) $(ROMEGACMA) $(MICROMEGACMA) \
$(QUOTECMA) $(RINGCMA) $(NEWRINGCMA) $(DPCMA) $(FIELDCMA) \
$(FOURIERCMA) $(EXTRACTIONCMA) $(XMLCMA) \
$(CCCMA) $(FOCMA) $(SUBTACCMA) $(RTAUTOCMA) \
$(FUNINDCMA) $(GBCMA)
ifneq ($(HASNATDYNLINK),false)
CONTRIBSTATIC:=
INITPLUGINS:=$(EXTRACTIONCMA) $(FOCMA) $(CCCMA) $(DPCMA) \
$(XMLCMA) $(FUNINDCMA) $(SUBTACCMA)
INITPLUGINSOPT:=$(INITPLUGINS:.cma=.cmxs)
PLUGINS:=$(CONTRIBS)
PLUGINSOPT:=$(PLUGINS:.cma=.cmxs)
else
CONTRIBSTATIC:=$(CONTRIBS)
INITPLUGINS:=
INITPLUGINSOPT:=
PLUGINS:=
PLUGINSOPT:=
endif
CMA:=$(CLIBS) $(CAMLP4OBJS)
CMXA:=$(CMA:.cma=.cmxa)
# LINK ORDER:
# Beware that highparsing.cma should appear before hightactics.cma
# respecting this order is useful for developers that want to load or link
# the libraries directly
LINKCMO:=$(CONFIG) lib/lib.cma kernel/kernel.cma library/library.cma \
pretyping/pretyping.cma interp/interp.cma proofs/proofs.cma \
parsing/parsing.cma tactics/tactics.cma toplevel/toplevel.cma \
parsing/highparsing.cma tactics/hightactics.cma $(CONTRIBSTATIC)
LINKCMX:=$(patsubst %.cma,%.cmxa,$(patsubst %.cmo,%.cmx,$(LINKCMO)))
# objects known by the toplevel of Coq
OBJSCMO:=$(CONFIG) $(LIBREP) $(KERNEL) $(LIBRARY) $(PRETYPING) $(INTERP) \
$(PROOFS) $(PARSING) $(TACTICS) $(TOPLEVEL) $(HIGHPARSING) \
$(HIGHTACTICS)
COQIDECMO:=\
$(addprefix ide/utils/, \
okey.cmo config_file.cmo configwin_keys.cmo \
configwin_types.cmo configwin_messages.cmo configwin_ihm.cmo \
configwin.cmo editable_cells.cmo ) \
$(addprefix ide/, \
config_parser.cmo typed_notebook.cmo config_lexer.cmo \
utf8_convert.cmo preferences.cmo ideutils.cmo \
gtk_parsing.cmo undo.cmo highlight.cmo \
coq.cmo coq_commands.cmo coq_tactics.cmo \
command_windows.cmo coqide.cmo )
COQIDECMX:=$(COQIDECMO:.cmo=.cmx)
COQENVCMO:=$(CONFIG) \
lib/pp_control.cmo lib/pp.cmo lib/compat.cmo lib/flags.cmo \
lib/util.cmo lib/system.cmo lib/envars.cmo
COQMKTOPCMO:=$(COQENVCMO) scripts/tolink.cmo scripts/coqmktop.cmo
COQMKTOPCMX:=$(COQMKTOPCMO:.cmo=.cmx)
COQCCMO:=$(COQENVCMO) toplevel/usage.cmo scripts/coqc.cmo
COQCCMX:=$(COQCCMO:.cmo=.cmx)
## Pcoq tools : coq-interface, coq-parser
COQINTERFACE:=bin/coq-interface$(EXE) bin/coq-parser$(EXE)
INTERFACECMA:=contrib/interface/coqinterface_plugin.cma
PARSERCMA:=contrib/interface/coqparser_plugin.cma
ifeq ($(HASNATDYNLINK),false)
ifeq ($(BEST),opt)
COQINTERFACE:=$(COQINTERFACE) bin/coq-interface.opt$(EXE) bin/coq-parser.opt$(EXE)
endif
INTERFACERC:= contrib/interface/vernacrc
PCOQPLUGINS:=
else
INTERFACERC:= contrib/interface/vernacrc contrib/interface/CoqParser.v
PCOQPLUGINS:=$(INTERFACECMA) $(PARSERCMA)
endif
PARSERREQUIRES:=$(LINKCMO) $(LIBCOQRUN) $(PARSERCMA) # Solution de facilité...
PARSERREQUIRESCMX:=$(LINKCMX) $(PARSERCMA:.cma=.cmxa)
## Misc
CSDPCERTCMO:=$(addprefix contrib/micromega/, \
mutils.cmo micromega.cmo mfourier.cmo certificate.cmo \
sos.cmo csdpcert.cmo )
CSDPCERTCMX:= $(CSDPCERTCMO:.cmo=.cmx)
DEBUGPRINTERS:=dev/top_printers.cmo dev/vm_printers.cmo dev/printers.cma
COQDEPBOOTML:=tools/coqdep_lexer.ml tools/coqdep_common.ml tools/coqdep_boot.ml
COQDEPML:=tools/coqdep_lexer.ml tools/coqdep_common.ml tools/coqdep.ml
COQDEPCMO:=$(COQENVCMO) $(COQDEPML:.ml=.cmo)
COQDEPCMX:=$(COQDEPCMO:.cmo=.cmx)
GALLINACMO:=tools/gallina_lexer.cmo tools/gallina.cmo
GALLINACMX:=$(GALLINACMO:.cmo=.cmx)
COQDOCCMO:=$(CONFIG) $(addprefix tools/coqdoc/, \
cdglobals.cmo alpha.cmo index.cmo output.cmo pretty.cmo main.cmo )
COQDOCCMX:=$(COQDOCCMO:.cmo=.cmx)
# checker
MCHECKER:=\
$(CONFIG) \
lib/pp_control.cmo lib/pp.cmo lib/compat.cmo \
lib/flags.cmo lib/util.cmo lib/option.cmo lib/hashcons.cmo \
lib/system.cmo lib/envars.cmo \
lib/predicate.cmo lib/rtree.cmo \
kernel/names.cmo kernel/univ.cmo kernel/esubst.cmo \
checker/validate.cmo \
checker/term.cmo \
checker/declarations.cmo checker/environ.cmo \
checker/closure.cmo checker/reduction.cmo \
checker/type_errors.cmo \
checker/modops.cmo \
checker/inductive.cmo checker/typeops.cmo \
checker/indtypes.cmo checker/subtyping.cmo checker/mod_checking.cmo \
checker/safe_typing.cmo checker/check.cmo \
checker/check_stat.cmo checker/checker.cmo
# grammar modules with camlp4
GRAMMARNEEDEDCMO:=\
$(addprefix lib/, \
pp_control.cmo pp.cmo compat.cmo flags.cmo util.cmo \
bigint.cmo dyn.cmo hashcons.cmo predicate.cmo rtree.cmo option.cmo ) \
$(KERNEL0) \
$(addprefix library/, \
nameops.cmo libnames.cmo summary.cmo nametab.cmo libobject.cmo \
lib.cmo goptions.cmo decl_kinds.cmo global.cmo ) \
$(addprefix pretyping/, \
termops.cmo evd.cmo reductionops.cmo inductiveops.cmo rawterm.cmo \
detyping.cmo pattern.cmo ) \
interp/topconstr.cmo interp/genarg.cmo interp/ppextend.cmo \
proofs/tacexpr.cmo \
parsing/lexer.cmo parsing/extend.cmo \
toplevel/vernacexpr.cmo parsing/pcoq.cmo parsing/q_util.cmo \
parsing/q_coqast.cmo
CAMLP4EXTENSIONSCMO:=\
parsing/argextend.cmo parsing/tacextend.cmo parsing/vernacextend.cmo
GRAMMARSCMO:=$(addprefix parsing/, \
g_prim.cmo g_tactic.cmo g_ltac.cmo g_constr.cmo )
GRAMMARCMO:=$(CONFIG) $(GRAMMARNEEDEDCMO) $(CAMLP4EXTENSIONSCMO) $(GRAMMARSCMO)
GRAMMARCMA:=parsing/grammar.cma
GRAMMARML4:=lib/compat.ml4 lib/pp.ml4 parsing/q_util.ml4 parsing/pcoq.ml4 \
parsing/argextend.ml4 parsing/tacextend.ml4 parsing/vernacextend.ml4 \
parsing/g_prim.ml4 parsing/g_tactic.ml4 \
parsing/g_ltac.ml4 parsing/g_constr.ml4 \
parsing/lexer.ml4 parsing/q_coqast.ml4
STAGE1_ML4:=$(GRAMMARML4) parsing/q_constr.ml4
STAGE1_CMO:=$(GRAMMARCMO) parsing/q_constr.cmo
STAGE1:=parsing/grammar.cma parsing/q_constr.cmo
PRINTERSCMO:=\
$(CONFIG) lib/lib.cma \
$(KERNEL0) \
$(addprefix library/, \
summary.cmo global.cmo nameops.cmo libnames.cmo nametab.cmo \
libobject.cmo lib.cmo goptions.cmo decls.cmo heads.cmo ) \
$(addprefix pretyping/, \
termops.cmo evd.cmo rawterm.cmo reductionops.cmo inductiveops.cmo \
retyping.cmo cbv.cmo pretype_errors.cmo typing.cmo evarutil.cmo \
term_dnet.cmo recordops.cmo evarconv.cmo tacred.cmo \
classops.cmo typeclasses_errors.cmo typeclasses.cmo \
detyping.cmo indrec.cmo coercion.cmo unification.cmo cases.cmo \
pretyping.cmo clenv.cmo pattern.cmo ) \
parsing/lexer.cmo interp/ppextend.cmo interp/genarg.cmo \
interp/topconstr.cmo interp/notation.cmo interp/dumpglob.cmo interp/reserve.cmo \
library/impargs.cmo interp/constrextern.cmo \
interp/syntax_def.cmo interp/implicit_quantifiers.cmo \
interp/constrintern.cmo proofs/proof_trees.cmo proofs/tacexpr.cmo \
proofs/proof_type.cmo proofs/logic.cmo proofs/refiner.cmo \
proofs/evar_refiner.cmo proofs/pfedit.cmo proofs/tactic_debug.cmo \
proofs/decl_mode.cmo \
parsing/ppconstr.cmo parsing/extend.cmo parsing/pcoq.cmo \
parsing/printer.cmo parsing/pptactic.cmo \
parsing/ppdecl_proof.cmo \
parsing/tactic_printer.cmo \
parsing/egrammar.cmo toplevel/himsg.cmo toplevel/cerrors.cmo \
toplevel/vernacexpr.cmo toplevel/vernacinterp.cmo \
dev/top_printers.cmo
###########################################################################
# vo files
###########################################################################
## Theories
INITVO:=$(addprefix theories/Init/, \
Notations.vo Datatypes.vo Peano.vo Logic.vo \
Specif.vo Logic_Type.vo Wf.vo Tactics.vo \
Prelude.vo )
LOGICVO:=$(addprefix theories/Logic/, \
Hurkens.vo ProofIrrelevance.vo Classical.vo \
Classical_Type.vo Classical_Pred_Set.vo Eqdep.vo \
Classical_Prop.vo Classical_Pred_Type.vo ClassicalFacts.vo \
ChoiceFacts.vo Berardi.vo Eqdep_dec.vo \
Decidable.vo JMeq.vo ClassicalChoice.vo \
ClassicalDescription.vo RelationalChoice.vo Diaconescu.vo \
EqdepFacts.vo ProofIrrelevanceFacts.vo ClassicalEpsilon.vo \
ClassicalUniqueChoice.vo DecidableType.vo DecidableTypeEx.vo \
Epsilon.vo ConstructiveEpsilon.vo Description.vo \
IndefiniteDescription.vo SetIsType.vo FunctionalExtensionality.vo )
ARITHVO:=$(addprefix theories/Arith/, \
Arith.vo Gt.vo Between.vo Le.vo \
Compare.vo Lt.vo Compare_dec.vo Min.vo \
Div2.vo Minus.vo Mult.vo Even.vo \
EqNat.vo Peano_dec.vo Euclid.vo Plus.vo \
Wf_nat.vo Max.vo Bool_nat.vo Factorial.vo \
Arith_base.vo )
SORTINGVO:=$(addprefix theories/Sorting/, \
Heap.vo Permutation.vo Sorting.vo PermutSetoid.vo \
PermutEq.vo )
BOOLVO:=$(addprefix theories/Bool/, \
Bool.vo IfProp.vo Zerob.vo DecBool.vo \
Sumbool.vo BoolEq.vo Bvector.vo )
NARITHVO:=$(addprefix theories/NArith/, \
BinPos.vo Pnat.vo BinNat.vo NArith.vo \
Nnat.vo Ndigits.vo Ndec.vo Ndist.vo )
ZARITHVO:=$(addprefix theories/ZArith/, \
BinInt.vo Wf_Z.vo ZArith.vo ZArith_dec.vo \
auxiliary.vo Zmisc.vo Zcompare.vo Znat.vo \
Zorder.vo Zabs.vo Zmin.vo Zmax.vo \
Zminmax.vo Zeven.vo Zhints.vo Zlogarithm.vo \
Zpower.vo Zcomplements.vo Zdiv.vo Zsqrt.vo \
Zwf.vo ZArith_base.vo Zbool.vo Zbinary.vo \
Znumtheory.vo Int.vo Zpow_def.vo Zpow_facts.vo \
ZOdiv_def.vo ZOdiv.vo Zgcd_alt.vo )
QARITHVO:=$(addprefix theories/QArith/, \
QArith_base.vo Qreduction.vo Qring.vo Qreals.vo \
QArith.vo Qcanon.vo Qfield.vo Qpower.vo \
Qabs.vo Qround.vo )
LISTSVO:=$(addprefix theories/Lists/, \
MonoList.vo ListSet.vo Streams.vo StreamMemo.vo \
TheoryList.vo List.vo SetoidList.vo ListTactics.vo )
STRINGSVO:=$(addprefix theories/Strings/, \
Ascii.vo String.vo )
SETSVO:=$(addprefix theories/Sets/, \
Classical_sets.vo Permut.vo \
Constructive_sets.vo Powerset.vo \
Cpo.vo Powerset_Classical_facts.vo \
Ensembles.vo Powerset_facts.vo \
Finite_sets.vo Relations_1.vo \
Finite_sets_facts.vo Relations_1_facts.vo \
Image.vo Relations_2.vo \
Infinite_sets.vo Relations_2_facts.vo \
Integers.vo Relations_3.vo \
Multiset.vo Relations_3_facts.vo \
Partial_Order.vo Uniset.vo )
FSETSBASEVO:=$(addprefix theories/FSets/, \
OrderedType.vo OrderedTypeEx.vo OrderedTypeAlt.vo \
FSetInterface.vo FSetList.vo FSetBridge.vo \
FSetFacts.vo FSetProperties.vo FSetEqProperties.vo \
FSetWeakList.vo FSetAVL.vo FSetDecide.vo \
FSets.vo \
FMapInterface.vo FMapList.vo FMapFacts.vo \
FMapWeakList.vo FMapPositive.vo FSetToFiniteSet.vo \
FMaps.vo )
FSETS_basic:=
FSETS_all:=$(addprefix theories/FSets/, \
FSetFullAVL.vo FMapAVL.vo FMapFullAVL.vo )
FSETSVO:=$(FSETSBASEVO) $(FSETS_$(FSETS))
ALLFSETS:=$(FSETSBASEVO) $(FSETS_all)
RELATIONSVO:=$(addprefix theories/Relations/, \
Operators_Properties.vo Relation_Definitions.vo \
Relation_Operators.vo Relations.vo )
WELLFOUNDEDVO:=$(addprefix theories/Wellfounded/, \
Disjoint_Union.vo Inclusion.vo Inverse_Image.vo \
Transitive_Closure.vo Union.vo Wellfounded.vo \
Well_Ordering.vo Lexicographic_Product.vo \
Lexicographic_Exponentiation.vo )
REALSBASEVO:=$(addprefix theories/Reals/, \
Rdefinitions.vo Raxioms.vo RIneq.vo DiscrR.vo \
Rbase.vo LegacyRfield.vo Rpow_def.vo )
REALS_basic:=
REALS_all:=$(addprefix theories/Reals/, \
R_Ifp.vo Rbasic_fun.vo R_sqr.vo SplitAbsolu.vo \
SplitRmult.vo ArithProp.vo Rfunctions.vo Rseries.vo \
SeqProp.vo Rcomplete.vo PartSum.vo AltSeries.vo \
Binomial.vo Rsigma.vo Rprod.vo Cauchy_prod.vo \
Alembert.vo SeqSeries.vo Rtrigo_fun.vo Rtrigo_def.vo \
Rtrigo_alt.vo Cos_rel.vo Cos_plus.vo Rtrigo.vo \
Rlimit.vo Rderiv.vo RList.vo Ranalysis1.vo \
Ranalysis2.vo Ranalysis3.vo Rtopology.vo MVT.vo \
PSeries_reg.vo Exp_prop.vo Rtrigo_reg.vo Rsqrt_def.vo \
R_sqrt.vo Rtrigo_calc.vo Rgeom.vo Sqrt_reg.vo \
Ranalysis4.vo Rpower.vo Ranalysis.vo NewtonInt.vo \
RiemannInt_SF.vo RiemannInt.vo Integration.vo \
Rlogic.vo Reals.vo )
REALSVO:=$(REALSBASEVO) $(REALS_$(REALS))
ALLREALS:=$(REALSBASEVO) $(REALS_all)
NUMBERSCOMMONVO:=$(addprefix theories/Numbers/, \
NaryFunctions.vo NumPrelude.vo BigNumPrelude.vo )
CYCLICABSTRACTVO:=$(addprefix theories/Numbers/Cyclic/Abstract/, \
CyclicAxioms.vo NZCyclic.vo )
CYCLICINT31VO:=$(addprefix theories/Numbers/Cyclic/Int31/, \
Int31.vo Cyclic31.vo )
CYCLICDOUBLECYCLICVO:=$(addprefix theories/Numbers/Cyclic/DoubleCyclic/, \
DoubleType.vo DoubleBase.vo DoubleAdd.vo DoubleSub.vo \
DoubleMul.vo DoubleDivn1.vo DoubleDiv.vo DoubleSqrt.vo \
DoubleLift.vo DoubleCyclic.vo )
CYCLICZMODULOVO := $(addprefix theories/Numbers/Cyclic/ZModulo/, \
ZModulo.vo )
CYCLICVO:=$(CYCLICABSTRACTVO) $(CYCLICINT31VO) $(CYCLICDOUBLECYCLICVO) \
$(CYCLICZMODULOVO)
NATINTVO:=$(addprefix theories/Numbers/NatInt/, \
NZAxioms.vo NZBase.vo NZAdd.vo NZMul.vo \
NZOrder.vo NZAddOrder.vo NZMulOrder.vo )
NATURALABSTRACTVO:=$(addprefix theories/Numbers/Natural/Abstract/, \
NAxioms.vo NBase.vo NAdd.vo NMul.vo \
NOrder.vo NAddOrder.vo NMulOrder.vo NSub.vo \
NIso.vo )
NATURALPEANOVO:=$(addprefix theories/Numbers/Natural/Peano/, \
NPeano.vo )
NATURALBINARYVO:=$(addprefix theories/Numbers/Natural/Binary/, \
NBinDefs.vo NBinary.vo )
NATURALSPECVIAZVO:=$(addprefix theories/Numbers/Natural/SpecViaZ/, \
NSig.vo NSigNAxioms.vo )
NATURALBIGNVO:=$(addprefix theories/Numbers/Natural/BigN/, \
Nbasic.vo NMake.vo BigN.vo )
NATURALVO:=$(NATURALABSTRACTVO) $(NATURALPEANOVO) $(NATURALBINARYVO) \
$(NATURALSPECVIAZVO) $(NATURALBIGNVO)
INTEGERABSTRACTVO:=$(addprefix theories/Numbers/Integer/Abstract/, \
ZAxioms.vo ZBase.vo ZAdd.vo ZMul.vo \
ZLt.vo ZAddOrder.vo ZMulOrder.vo )
INTEGERBINARYVO:=$(addprefix theories/Numbers/Integer/Binary/, \
ZBinary.vo )
INTEGERNATPAIRSVO:=$(addprefix theories/Numbers/Integer/NatPairs/, \
ZNatPairs.vo )
INTEGERSPECVIAZVO:=$(addprefix theories/Numbers/Integer/SpecViaZ/, \
ZSig.vo ZSigZAxioms.vo )
INTEGERBIGZVO:=$(addprefix theories/Numbers/Integer/BigZ/, \
ZMake.vo BigZ.vo )
INTEGERVO:=$(INTEGERABSTRACTVO) $(INTEGERBINARYVO) $(INTEGERNATPAIRSVO) \
$(INTEGERSPECVIAZVO) $(INTEGERBIGZVO)
RATIONALSPECVIAQVO:=$(addprefix theories/Numbers/Rational/SpecViaQ/, \
QSig.vo )
RATIONALBIGQVO:=$(addprefix theories/Numbers/Rational/BigQ/, \
QMake.vo BigQ.vo )
RATIONALVO:=$(RATIONALSPECVIAQVO) $(RATIONALBIGQVO)
NUMBERSVO:= $(NUMBERSCOMMONVO) $(NATURALVO) $(INTEGERVO) $(NATINTVO) $(CYCLICVO) $(RATIONALVO)
SETOIDSVO:=$(addprefix theories/Setoids/, \
Setoid.vo )
UNICODEVO:=$(addprefix theories/Unicode/, \
Utf8.vo )
CLASSESVO:=$(addprefix theories/Classes/, \
Init.vo RelationClasses.vo Morphisms.vo Morphisms_Prop.vo \
Morphisms_Relations.vo Functions.vo Equivalence.vo SetoidTactics.vo \
SetoidClass.vo SetoidAxioms.vo EquivDec.vo SetoidDec.vo )
PROGRAMVO:=$(addprefix theories/Program/, \
Tactics.vo Equality.vo Subset.vo Utils.vo \
Wf.vo Basics.vo Combinators.vo Syntax.vo Program.vo )
THEORIESVO:=\
$(INITVO) $(LOGICVO) $(ARITHVO) $(BOOLVO) $(NARITHVO) $(ZARITHVO) \
$(SETOIDSVO) $(LISTSVO) $(STRINGSVO) $(SETSVO) $(FSETSVO) \
$(RELATIONSVO) $(WELLFOUNDEDVO) $(REALSVO) $(SORTINGVO) $(QARITHVO) \
$(NUMBERSVO) $(UNICODEVO) $(CLASSESVO) $(PROGRAMVO)
THEORIESLIGHTVO:= $(INITVO) $(LOGICVO) $(ARITHVO)
## Contribs
OMEGAVO:=$(addprefix contrib/omega/, \
PreOmega.vo OmegaLemmas.vo OmegaPlugin.vo Omega.vo )
ROMEGAVO:=$(addprefix contrib/romega/, \
ReflOmegaCore.vo ROmega.vo )
MICROMEGAVO:=$(addprefix contrib/micromega/, \
CheckerMaker.vo Refl.vo \
Env.vo RingMicromega.vo \
EnvRing.vo VarMap.vo \
OrderedRing.vo ZCoeff.vo \
Psatz.vo ZMicromega.vo \
QMicromega.vo RMicromega.vo \
Tauto.vo )
QUOTEVO:=$(addprefix contrib/quote/, \
Quote.vo )
RINGVO:=$(addprefix contrib/ring/, \
LegacyArithRing.vo Ring_normalize.vo \
LegacyRing_theory.vo LegacyRing.vo \
LegacyNArithRing.vo \
LegacyZArithRing.vo Ring_abstract.vo \
Setoid_ring_normalize.vo \
Setoid_ring.vo Setoid_ring_theory.vo )
FIELDVO:=$(addprefix contrib/field/, \
LegacyField_Compl.vo LegacyField_Theory.vo \
LegacyField_Tactic.vo LegacyField.vo )
NEWRINGVO:=$(addprefix contrib/setoid_ring/, \
BinList.vo Ring_theory.vo \
Ring_polynom.vo Ring_tac.vo \
Ring_base.vo InitialRing.vo \
Ring_equiv.vo Ring.vo \
ArithRing.vo NArithRing.vo \
ZArithRing.vo \
Field_theory.vo Field_tac.vo \
Field.vo RealField.vo )
GBVO:=$(addprefix contrib/groebner/, \
GroebnerR.vo GroebnerZ.vo )
XMLVO:=
FOURIERVO:=$(addprefix contrib/fourier/, \
Fourier_util.vo Fourier.vo )
FUNINDVO:=
RECDEFVO:=$(addprefix contrib/funind/, \
Recdef.vo )
CCVO:=
DPVO:=$(addprefix contrib/dp/, \
Dp.vo )
RTAUTOVO:=$(addprefix contrib/rtauto/, \
Bintree.vo Rtauto.vo )
ifneq ($(HASNATDYNLINK),false)
INTERFACEVO:=contrib/interface/CoqInterface.vo
else
INTERFACEVO:=
endif
CONTRIBVO:= $(OMEGAVO) $(ROMEGAVO) $(MICROMEGAVO) $(RINGVO) $(FIELDVO) \
$(XMLVO) $(FOURIERVO) $(CCVO) $(FUNINDVO) \
$(RTAUTOVO) $(RECDEFVO) $(NEWRINGVO) $(DPVO) $(QUOTEVO) \
$(INTERFACEVO) $(GBVO)
ALLVO:= $(INITVO) $(THEORIESVO) $(CONTRIBVO)
VFILES:= $(ALLVO:.vo=.v)
# convert a (stdlib) filename into a module name:
# remove .vo, replace theories and contrib by Coq, and replace slashes by dots
vo_to_mod = $(subst /,.,$(patsubst theories/%,Coq.%,$(patsubst contrib/%,Coq.%,$(1:.vo=))))
ALLMODS:=$(call vo_to_mod,$(ALLVO))
LIBFILES:=$(THEORIESVO) $(CONTRIBVO)
LIBFILESLIGHT:=$(THEORIESLIGHTVO)
## Specials
MANPAGES:=man/coq-tex.1 man/coqdep.1 man/gallina.1 \
man/coqc.1 man/coqtop.1 man/coqtop.byte.1 man/coqtop.opt.1 \
man/coqwc.1 man/coqdoc.1 man/coqide.1 \
man/coq_makefile.1 man/coqmktop.1
PCOQMANPAGES:=man/coq-interface.1 man/coq-parser.1
#########################################################
# .mli files by directory (used for dependencies graphs #
#########################################################
# We use wildcard to get rid of .cmo that do not have a .mli
KERNELMLI:=$(wildcard $(KERNEL:.cmo=.mli))
INTERPMLI:=$(wildcard $(INTERP:.cmo=.mli))
PRETYPINGMLI:=$(wildcard $(PRETYPING:.cmo=.mli))
TOPLEVELMLI:=$(wildcard $(TOPLEVEL:.cmo=.mli))
PROOFSMLI:=$(wildcard $(PROOFS:.cmo=.mli))
LIBRARYMLI:=$(wildcard $(LIBRARY:.cmo=.mli))
PARSINGMLI:=$(wildcard $(PARSING:.cmo=.mli) $(HIGHPARSING:.cmo=.mli))
TACTICSMLI:=$(wildcard $(TACTICS:.cmo=.mli) $(HIGHTACTICS:.cmo=.mli))
COQMLI:=$(KERNELMLI) $(INTERPMLI) $(PRETYPINGMLI) $(TOPLEVELMLI) $(PROOFSMLI) \
$(LIBRARYMLI) $(PARSINGMLI) $(TACTICSMLI)
###########################################################################
# Miscellaneous
###########################################################################
DATE=$(shell LANG=C date +"%B %Y")
SOURCEDOCDIR=dev/source-doc
CAML_OBJECT_PATTERNS:=%.cmo %.cmx %.cmi %.cma %.cmxa %.cmxs %.dep.ps %.dot
### Targets forwarded by Makefile to a specific stage:
## Enumeration of targets that require being done at stage1
STAGE1_TARGETS:= $(STAGE1) $(COQDEPBOOT) \
$(filter-out parsing/q_constr.cmo,$(STAGE1_CMO)) \
$(STAGE1_CMO:.cmo=.cmi) $(STAGE1_CMO:.cmo=.cmx) $(GENFILES) \
source-doc revision toplevel/mltop.byteml toplevel/mltop.optml \
$(STAGE1_ML4:.ml4=.ml4-preprocessed) %.o
ifdef CM_STAGE1
STAGE1_TARGETS+=$(CAML_OBJECT_PATTERNS)
endif
## Enumeration of targets that require being done at stage2
VO_TARGETS:=logic arith bool narith zarith qarith lists strings sets \
fsets allfsets relations wellfounded ints reals allreals \
setoids sorting natural integer rational numbers noreal \
omega micromega ring setoid_ring dp xml extraction field fourier \
funind cc subtac rtauto
DOC_TARGETS:=doc doc-html doc-ps doc-pdf stdlib refman tutorial faq \
rectutorial refman-quick refman-nodep stdlib-nodep
STAGE2_TARGETS:=$(COQBINARIES) lib kernel byterun library proofs tactics \
interp parsing pretyping highparsing toplevel hightactics \
coqide-binaries coqide-byte coqide-opt $(COQIDEOPT) $(COQIDEBYTE) $(COQIDE) \
pcoq-binaries $(COQINTERFACE) $(CSDPCERT) coqbinaries pcoq $(TOOLS) tools \
printers debug initplugins plugins \
world install coqide coqide-files coq coqlib \
coqlight states pcoq-files check init theories theories-light contrib \
$(DOC_TARGETS) $(VO_TARGETS) validate \
%.vo %.glob states/% install-% %.ml4-preprocessed
ifndef CM_STAGE1
STAGE2_TARGETS+=$(CAML_OBJECT_PATTERNS)
endif
# For emacs:
# Local Variables:
# mode: makefile
# End:
|