Commit bf71d8ec authored by François Bobot's avatar François Bobot
Browse files

tptp2why becomes a plugin

parent c27ee110
...@@ -504,7 +504,7 @@ clean:: ...@@ -504,7 +504,7 @@ clean::
TPTPGENERATED = src/tptp2why/tptpLexer.ml \ TPTPGENERATED = src/tptp2why/tptpLexer.ml \
src/tptp2why/tptpParser.ml src/tptp2why/tptpParser.mli src/tptp2why/tptpParser.ml src/tptp2why/tptpParser.mli
TPTP_FILES = tptpTree tptpParser tptpLexer tptpTranslate tptp2why TPTP_FILES = tptpTree tptpParser tptpLexer tptpTranslate tptp2whymain
TPTPMODULES = $(addprefix src/tptp2why/, $(TPTP_FILES)) TPTPMODULES = $(addprefix src/tptp2why/, $(TPTP_FILES))
...@@ -519,21 +519,29 @@ $(TPTPCMO) $(TPTPCMX): INCLUDES += -I src/tptp2why ...@@ -519,21 +519,29 @@ $(TPTPCMO) $(TPTPCMX): INCLUDES += -I src/tptp2why
# build targets # build targets
ifeq (@enable_whytptp@,yes) ifeq (@enable_whytptp@,yes)
byte: bin/whytptp.byte byte: plugins/whytptp.cmo
opt: bin/whytptp.opt opt: plugins/whytptp.cmxs
endif endif
bin/whytptp.opt bin/whytptp.byte: EXTOBJS += $(MENHIRLIB) plugins/whytptp.cmxs plugins/whytptp.cmo: EXTOBJS += $(MENHIRLIB)
bin/whytptp.opt bin/whytptp.byte: INCLUDES += $(MENHIRINC) plugins/whytptp.cmxs plugins/whytptp.cmo: INCLUDES += $(MENHIRINC)
bin/whytptp.opt: src/why.cmxa $(TPTPCMX) src/main.cmx plugins:
@mkdir plugins
src/tptp2why/whytptp.cmxs: $(TPTPCMX)
$(if $(QUIET), @echo 'Linking $@' &&) \ $(if $(QUIET), @echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -o $@ $(EXTCMXA) $^ $(OCAMLOPT) $(OFLAGS) -shared -o $@ $^
$(STRIP) $@
bin/whytptp.byte: src/why.cma $(TPTPCMO) src/main.cmo src/tptp2why/whytptp.cmo: $(TPTPCMO)
$(if $(QUIET),@echo 'Linking $@' &&) \ $(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -o $@ $(EXTCMA) $^ $(OCAMLC) $(BFLAGS) -pack -o $@ $^
plugins/whytptp.cmxs: plugins src/tptp2why/whytptp.cmxs
@cp src/tptp2why/whytptp.cmxs $@
plugins/whytptp.cmo: plugins src/tptp2why/whytptp.cmo
@cp src/tptp2why/whytptp.cmo $@
# depend and clean targets # depend and clean targets
......
...@@ -67,7 +67,7 @@ let install_plugin main p = ...@@ -67,7 +67,7 @@ let install_plugin main p =
raise Exit raise Exit
| Plugin.Pluother -> | Plugin.Pluother ->
eprintf "The plugin %s will not be used with this kind of compilation \ eprintf "The plugin %s will not be used with this kind of compilation \
and it has not be tested@." and it has not been tested@."
p p
| Plugin.Plugood -> () | Plugin.Plugood -> ()
| Plugin.Plufail exn -> eprintf "The plugin %s dynlink failed :@.%a@." | Plugin.Plufail exn -> eprintf "The plugin %s dynlink failed :@.%a@."
......
Supports Markdown
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