Commit 56f939de authored by Francois Bobot's avatar Francois Bobot

erreur de commit Makefile.in

parent 7cd7f292
......@@ -140,6 +140,7 @@ LIBINCLUDES = $(addprefix -I src/, $(LIBDIRS))
$(LIBCMO) $(LIBCMX): INCLUDES=$(LIBINCLUDES)
$(LIBCMX): OFLAGS+=-for-pack Why
LIBCMI = why.cmi
LIBCMA = why.cma
LIBCMXA = why.cmxa
......@@ -155,6 +156,8 @@ $(LIBCMXA): why.cmx
why.cmo: $(LIBCMO)
$(OCAMLC) $(BFLAGS) -pack -o $@ $(LIBCMO)
$(LIBCMI) : why.cmo
why.cmx: $(LIBCMX)
$(OCAMLOPT) $(INCLUDES) -pack -o $@ $(LIBCMX)
......@@ -172,6 +175,8 @@ depend: .depend.lib
byte: bin/why.byte
opt: bin/why.opt
src/main.cmx : $(LIBCMI)
bin/why.opt: $(LIBCMXA) src/main.cmx
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) -o $@ $(EXTCMXA) $^
$(STRIP) $@
......@@ -188,13 +193,16 @@ clean::
##########
PGM_GENERATED = src/programs/pgm_lexer.ml src/programs/pgm_parser.mli \
src/programs/pgm_parser.output src/programs/pgm_parser.ml
src/programs/pgm_parser.output src/programs/pgm_parser.ml
PGM_CMO := pgm_parser.cmo pgm_lexer.cmo pgm_typing.cmo pgm_main.cmo\
pgm_ttree.cmo pgm_ptree.cmo
PGM_CMO := pgm_parser.cmo pgm_lexer.cmo pgm_typing.cmo pgm_main.cmo
PGM_CMO := $(addprefix src/programs/, $(PGM_CMO))
PGM_CMX = $(PGM_CMO:.cmo=.cmx)
$(PGM_CMO) $(PGM_CMX): INCLUDES=-I src/programs/
$(PGM_CMO) $(PGM_CMX): $(LIBCMI)
opt: bin/whyml.opt
byte: bin/whyml.byte
......@@ -239,6 +247,7 @@ MANAGER_CMO := db.cmo
MANAGER_CMO := $(addprefix src/manager/,$(MANAGER_CMO))
$(MANAGER_CMO): INCLUDES=-I src/manager -I +sqlite3 -I +threads
$(MANAGER_CMO): $(LIBCMI)
bin/manager.byte: $(LIBCMA) $(MANAGER_CMO)
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLC) $(BFLAGS) \
......@@ -483,7 +492,7 @@ apidoc: $(APIDOCSRC)
# generic rules
###############
.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .v .vo .ml4 .cmxs
.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .v .vo .ml4 .cmxs .output
.mli.cmi:
$(if $(QUIET),@echo 'Ocamlc $<' &&) $(OCAMLC) $(APRONLIB) $(ATPLIB) -c $(BFLAGS) $<
......@@ -512,6 +521,10 @@ apidoc: $(APIDOCSRC)
.mly.mli:
$(OCAMLYACC) -v $<
#Pour make -j :
.ml.output:
@echo .output.ml : $<
.ml4.ml:
$(CAMLP4) pr_o.cmo -impl $< > $@
......
......@@ -74,4 +74,37 @@ let open_temp_file ?(debug=false) filesuffix usefile =
raise e
let call_asynchronous f = assert false
type 'a result =
| Result of 'a
| Exception of exn
open Unix
exception Bad_execution of process_status
let call_asynchronous (f : unit -> 'a) =
let cin,cout = pipe () in
let cin = in_channel_of_descr cin in
let cout = out_channel_of_descr cout in
match fork () with
| 0 ->
let result =
try
Result (f ())
with exn -> Exception exn in
Marshal.to_channel cout (result : 'a result) [];
close_out cout;
exit 0
| pid ->
let f () =
let result = (Marshal.from_channel cin: 'a result) in
close_in cin;
let _, ps = waitpid [] pid in
match ps with
| WEXITED 0 ->
begin match result with
| Result res -> res
| Exception exn -> raise exn
end
| _ -> raise (Bad_execution ps) in
f
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment