This repository was archived by the owner on Nov 13, 2021. It is now read-only.
File tree 10 files changed +41
-24
lines changed
10 files changed +41
-24
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ states/initial.coq: states/MakeInitial.v $(INITVO) $(VO_TOOLS_STRICT) | states/M
563
563
theories/Init/%.vo theories/Init/%.glob: theories/Init/%.v $(VO_TOOLS_STRICT) | theories/Init/%.v.d $(VO_TOOLS_ORDER_ONLY)
564
564
$(SHOW)'COQC -nois $<'
565
565
$(HIDE)rm -f theories/Init/$*.glob
566
- $(HIDE)$(BOOTCOQTOP) -dump-glob theories/Init/$*.glob - nois -compile theories/Init/$*
566
+ $(HIDE)$(BOOTCOQTOP) -nois -compile theories/Init/$*
567
567
568
568
theories/Numbers/Natural/BigN/NMake.v: theories/Numbers/Natural/BigN/NMake_gen.ml
569
569
$(OCAML) $< > $@
@@ -875,7 +875,7 @@ endif
875
875
%.vo %.glob: %.v states/initial.coq $(VO_TOOLS_STRICT) | %.v.d $(VO_TOOLS_ORDER_ONLY)
876
876
$(SHOW)'COQC $<'
877
877
$(HIDE)rm -f $*.glob
878
- $(HIDE)$(BOOTCOQTOP) -dump-glob $*.glob - compile $*
878
+ $(HIDE)$(BOOTCOQTOP) -compile $*
879
879
ifdef VALIDATE
880
880
$(SHOW)'COQCHK $(shell basename $*)'
881
881
$(HIDE)$(BESTCHICKEN) -silent -norec $(shell basename $*) \
Original file line number Diff line number Diff line change @@ -357,8 +357,8 @@ COQIDECMX:=$(COQIDECMO:.cmo=.cmx)
357
357
COQMKTOPCMO:=$(CONFIG) scripts/tolink.cmo scripts/coqmktop.cmo
358
358
359
359
COQMKTOPCMX:=config/coq_config.cmx scripts/tolink.cmx scripts/coqmktop.cmx
360
- COQCCMO:=$(CONFIG) toplevel/usage.cmo scripts/coqc.cmo
361
- COQCCMX:=config/coq_config.cmx toplevel/usage.cmx scripts/coqc.cmx
360
+ COQCCMO:=$(CONFIG) toplevel/usage.cmo lib/pp_control.cmo lib/pp.cmo scripts/coqc.cmo
361
+ COQCCMX:=config/coq_config.cmx toplevel/usage.cmx lib/pp_control.cmx lib/pp.cmx scripts/coqc.cmx
362
362
363
363
INTERFACE:=\
364
364
contrib/interface/vtp.cmo contrib/interface/xlate.cmo \
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ let is_unsafe s = Stringset.mem s !unsafe_set
84
84
85
85
(* Dump of globalization (to be used by coqdoc) *)
86
86
87
+ let noglob = ref false
87
88
let dump = ref false
88
89
let dump_file = ref " "
89
90
let dump_into_file f = dump := true ; dump_file := f
@@ -94,9 +95,10 @@ let dump_string = Buffer.add_string dump_buffer
94
95
95
96
let dump_it () =
96
97
if ! dump then begin
97
- let mode = [Open_wronly ; Open_append ; Open_creat ] in
98
+ let mode = [Open_wronly ; Open_creat ] in
98
99
let c = open_out_gen mode 0o666 ! dump_file in
99
100
output_string c (Buffer. contents dump_buffer);
101
+ Buffer. clear dump_buffer;
100
102
close_out c
101
103
end
102
104
Original file line number Diff line number Diff line change @@ -59,9 +59,11 @@ val is_unsafe : string -> bool
59
59
60
60
(* Dump of globalization (to be used by coqdoc) *)
61
61
62
+ val noglob : bool ref
62
63
val dump : bool ref
63
64
val dump_into_file : string -> unit
64
65
val dump_string : string -> unit
66
+ val dump_it : unit -> unit
65
67
66
68
(* Options for the virtual machine *)
67
69
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ let parse_args () =
141
141
| (" -I" | " -include" | " -outputstate"
142
142
| " -inputstate" | " -is" | " -load-vernac-source" | " -l" | " -load-vernac-object"
143
143
| " -load-ml-source" | " -require" | " -load-ml-object" | " -user"
144
- | " -init-file" | " -dump-glob " as o) :: rem ->
144
+ | " -init-file" as o) :: rem ->
145
145
begin
146
146
match rem with
147
147
| s :: rem' -> parse (cfiles,s::o::args) rem'
@@ -151,13 +151,16 @@ let parse_args () =
151
151
152
152
| (" -notactics" | " -debug" | " -nolib"
153
153
| " -debugVM" | " -alltransp" | " -VMno"
154
- | " -batch" | " -nois"
154
+ | " -batch" | " -nois" | " -noglob " | " -no-glob "
155
155
| " -q" | " -full" | " -profile" | " -just-parsing" | " -echo" | " -unsafe" | " -quiet"
156
156
| " -silent" | " -m" | " -xml" | " -v7" | " -v8" | " -translate" | " -strict-implicit"
157
157
| " -dont-load-proofs" | " -impredicative-set" | " -vm"
158
158
| " -unboxed-values" | " -unboxed-definitions" | " -draw-vm-instr"
159
159
as o) :: rem ->
160
160
parse (cfiles,o::args) rem
161
+
162
+ | "-dump-glob" :: _ :: rem -> Pp. msg_warning (Pp. str " option -dumpglob is obsolete" ); parse (cfiles,args) rem
163
+
161
164
| "-where" :: _ ->
162
165
let coqlib =
163
166
try Sys. getenv " COQLIB" with Not_found -> Coq_config. coqlib
Original file line number Diff line number Diff line change @@ -136,15 +136,15 @@ let implicit () =
136
136
print " %.ml.d: %.ml\n " ;
137
137
print " \t $(CAMLBIN)ocamldep -slash $(ZFLAGS) $(PP) \" $<\" > \" $@\"\n\n "
138
138
and v_rule () =
139
- print " %.vo %.glob: %.v\n\t $(COQC) -dump-glob $*.glob $(COQDEBUG) $(COQFLAGS) $*\n\n " ;
139
+ print " %.vo %.glob: %.v\n\t $(COQC) $(COQDEBUG) $(COQFLAGS) $*\n\n " ;
140
140
print " %.vi: %.v\n\t $(COQC) -i $(COQDEBUG) $(COQFLAGS) $*\n\n " ;
141
141
print " %.g: %.v\n\t $(GALLINA) $<\n\n " ;
142
142
print " %.tex: %.v\n\t $(COQDOC) -latex $< -o $@\n\n " ;
143
- print " %.html: %.v %.glob\n\t $(COQDOC) -glob-from $*.glob - html $< -o $@\n\n " ;
143
+ print " %.html: %.v %.glob\n\t $(COQDOC) -html $< -o $@\n\n " ;
144
144
print " %.g.tex: %.v\n\t $(COQDOC) -latex -g $< -o $@\n\n " ;
145
- print " %.g.html: %.v %.glob\n\t $(COQDOC) -glob-from $*.glob - html -g $< -o $@\n\n " ;
145
+ print " %.g.html: %.v %.glob\n\t $(COQDOC) -html -g $< -o $@\n\n " ;
146
146
print " %.v.d: %.v\n " ;
147
- print " \t $(COQDEP) -glob - slash $(COQLIBS) \" $<\" > \" $@\" || ( RV=$$?; rm -f \" $@\" ; exit $${RV} )\n\n "
147
+ print " \t $(COQDEP) -slash $(COQLIBS) \" $<\" > \" $@\" || ( RV=$$?; rm -f \" $@\" ; exit $${RV} )\n\n "
148
148
in
149
149
if ! some_mlfile then ml_rules () ;
150
150
if ! some_vfile then v_rule ()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ let option_D = ref false
22
22
let option_w = ref false
23
23
let option_i = ref false
24
24
let option_sort = ref false
25
- let option_glob = ref false
25
+ let option_noglob = ref false
26
26
let option_slash = ref false
27
27
let option_boot = ref false
28
28
@@ -375,7 +375,7 @@ let mL_dependencies () =
375
375
let coq_dependencies () =
376
376
List. iter
377
377
(fun (name ,_ ) ->
378
- let glob = if ! option_glob then " " ^ name^ " .glob" else " " in
378
+ let glob = if ! option_noglob then " " else " " ^ name^ " .glob" in
379
379
printf " %s%s%s: %s.v" name ! suffixe glob name;
380
380
traite_fichier_Coq true (name ^ " .v" );
381
381
printf " \n " ;
@@ -503,7 +503,7 @@ let rec parse = function
503
503
| "-i" :: ll -> option_i := true ; parse ll
504
504
| "-boot" :: ll -> option_boot := true ; parse ll
505
505
| "-sort" :: ll -> option_sort := true ; parse ll
506
- | "-glob" :: ll -> option_glob := true ; parse ll
506
+ | "-noglob" :: ll | "-no- glob" :: ll -> option_noglob := true ; parse ll
507
507
| "-I" :: r :: ll -> add_dir add_known r [] ; parse ll
508
508
| "-I" :: [] -> usage ()
509
509
| "-R" :: r :: ln :: ll -> add_rec_dir add_known r [ln]; parse ll
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ let compile_files () =
113
113
(fun (v ,f ) ->
114
114
States. unfreeze init_state;
115
115
Constrintern. coqdoc_unfreeze coqdoc_init_state;
116
+ if ! Flags. noglob then
117
+ Flags. dump := false
118
+ else
119
+ Flags. dump_into_file (f^ " .glob" );
116
120
if Flags. do_translate () then
117
121
with_option translate_file (Vernac. compile v) f
118
122
else
@@ -231,8 +235,8 @@ let parse_args is_ide =
231
235
| "-load-vernac-object" :: f :: rem -> add_vernac_obj f; parse rem
232
236
| "-load-vernac-object" :: [] -> usage ()
233
237
234
- | "-dump-glob" :: f :: rem -> dump_into_file f ; parse rem
235
- | "-dump -glob" :: [] -> usage ()
238
+ | "-dump-glob" :: _ :: rem -> warning " option -dumpglob is obsolete " ; parse rem
239
+ | ( "-no -glob" | "-noglob" ) :: rem -> Flags. noglob := true ; parse rem
236
240
237
241
| "-require" :: f :: rem -> add_require f; parse rem
238
242
| "-require" :: [] -> usage ()
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ let print_usage_channel co command =
53
53
-batch batch mode (exits just after arguments parsing)
54
54
-boot boot mode (implies -q and -batch)
55
55
-emacs tells Coq it is executed under Emacs
56
- -dump -glob f dump globalizations in file f (to be used by coqdoc)
56
+ -no -glob f do not dump globalizations
57
57
-with-geoproof (yes|no) to (de)activate special functions for Geoproof within Coqide (default is yes)
58
58
-impredicative-set set sort Set impredicative
59
59
-dont-load-proofs don't load opaque proofs in memory
Original file line number Diff line number Diff line change @@ -226,11 +226,17 @@ let load_vernac verb file =
226
226
(* Compile a vernac file (f is assumed without .v suffix) *)
227
227
let compile verbosely f =
228
228
let ldir,long_f_dot_v = Library. start_library f in
229
- if ! dump then dump_string (" F" ^ Names. string_of_dirpath ldir ^ " \n " );
230
- if ! Flags. xml_export then ! xml_start_library () ;
231
- let _ = load_vernac verbosely long_f_dot_v in
232
- if Pfedit. get_all_proof_names () <> [] then
233
- (message " Error: There are pending proofs" ; exit 1 );
234
- if ! Flags. xml_export then ! xml_end_library () ;
235
- Library. save_library_to ldir (long_f_dot_v ^ " o" )
229
+ let dumpstate = ! Flags. dump in
230
+ if not ! Flags. noglob then
231
+ (Flags. dump_into_file (f ^ " .glob" );
232
+ Flags. dump_string (" F" ^ Names. string_of_dirpath ldir ^ " \n " ));
233
+ if ! Flags. xml_export then ! xml_start_library () ;
234
+ let _ = load_vernac verbosely long_f_dot_v in
235
+ if Pfedit. get_all_proof_names () <> [] then
236
+ (message " Error: There are pending proofs" ; exit 1 );
237
+ if ! Flags. xml_export then ! xml_end_library () ;
238
+ if ! Flags. dump then Flags. dump_it () ;
239
+ Flags. dump := dumpstate;
240
+ Library. save_library_to ldir (long_f_dot_v ^ " o" )
241
+
236
242
You can’t perform that action at this time.
0 commit comments