Commit f5c692e7 authored by Andrei Paskevich's avatar Andrei Paskevich

continue

parent b3d1d542
......@@ -52,18 +52,17 @@ OCAMLVERSION = @OCAMLVERSION@
#CAMLP4 = @CAMLP4O@
#PSVIEWER = @PSVIEWER@
#PDFVIEWER = @PDFVIEWER@
DYNLINK = @DYNLINK@
ifeq ($(DYNLINK),Dynlink)
ifeq (@enable_plugins@,yes)
DYNLINKCMA = dynlink.cma
DYNLINKCMXA = dynlink.cmxa
else
DYNLINKCMA =
DYNLINKCMA =
DYNLINKCMXA =
endif
BFLAGS = -w Aelz -dtypes -g $(INCLUDES) @INCLUDEGTK2@
OFLAGS = -w Aelz -dtypes $(INCLUDES) @INCLUDEGTK2@
BFLAGS = -w Aelz -dtypes -g $(INCLUDES)
OFLAGS = -w Aelz -dtypes $(INCLUDES)
# external libraries common to all binaries
......@@ -175,11 +174,13 @@ opt: bin/why.opt
src/main.cmx : $(LIBCMI)
bin/why.opt: $(LIBCMXA) src/main.cmx
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) -o $@ $(EXTCMXA) $^
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -o $@ $(EXTCMXA) $^
$(STRIP) $@
bin/why.byte: $(LIBCMA) src/main.cmo
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLC) $(BFLAGS) -o $@ $(EXTCMA) $^
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -o $@ $(EXTCMA) $^
clean::
rm -f src/main.cm[iox] src/main.annot
......@@ -255,7 +256,7 @@ IDE_CMO := ide_main.cmo
IDE_CMO := $(addprefix src/ide/,$(IDE_CMO))
IDE_CMX = $(IDE_CMO:.cmo=.cmx)
$(IDE_CMO) $(IDE_CMX): INCLUDES=-I src/ide/
$(IDE_CMO) $(IDE_CMX): INCLUDES=-I src/ide/ -I +lablgtk2 -I +threads
ifeq (@enable_ide@,yes)
byte: bin/whyide.byte
......@@ -263,11 +264,15 @@ opt: bin/whyide.opt
endif
bin/whyide.opt: $(LIBCMXA) $(IDE_CMX)
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) -I +threads -o $@ $(EXTCMXA) threads.cmxa lablgtk.cmxa lablgtksourceview2.cmxa gtkThread.cmx $^
$(STRIP) $@
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLOPT) $(OFLAGS) -o $@ $(EXTCMXA) threads.cmxa \
lablgtk.cmxa lablgtksourceview2.cmxa gtkThread.cmx $^
$(STRIP) $@
bin/whyide.byte: $(GCMO)
$(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLC) $(BFLAGS) -I +threads -o $@ $(EXTCMA) lablgtk.cma lablgtksourceview2.cma threads.cma gtkThread.cmo $^
$(if $(QUIET),@echo 'Linking $@' &&) \
$(OCAMLC) $(BFLAGS) -o $@ $(EXTCMA) threads.cma \
lablgtk.cma lablgtksourceview2.cma gtkThread.cmo $^
include .depend.ide
......
......@@ -211,9 +211,6 @@ AC_CHECK_FILE($OCAMLLIB/lablgtk2/lablgtk.cma,,enable_ide=no)
AC_CHECK_FILE($OCAMLLIB/lablgtk2/lablgtksourceview2.cma,,enable_ide=no)
fi
dnl AC_CHECK_PROG(enable_ide,lablgtk2,yes,no) not always available (Win32)
if test "$enable_ide" = yes ; then
INCLUDEGTK2="-I +lablgtk2"
fi
dnl AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,true)
......@@ -273,14 +270,15 @@ AC_SUBST(OCAMLYACC)
AC_SUBST(OCAMLDOC)
AC_SUBST(OCAMLBEST)
AC_SUBST(OCAMLVERSION)
AC_SUBST(OCAMLV)
AC_SUBST(OCAMLLIB)
dnl AC_SUBST(OCAMLV)
dnl AC_SUBST(FORPACK)
dnl AC_SUBST(OCAMLGRAPHLIB)
AC_SUBST(enable_ide)
AC_SUBST(INCLUDEGTK2)
dnl AC_SUBST(OCAMLWEB)
AC_SUBST(enable_ide)
AC_SUBST(enable_plugins)
AC_SUBST(DYNLINK)
dnl AC_SUBST(FORPACK)
AC_SUBST(enable_coq_support)
AC_SUBST(COQC)
......
......@@ -19,11 +19,9 @@
let why_version = "@VERSION@"
let why_builddate = "@BUILDDATE@"
let coq_version = "@COQVERSION@"
let why_plugins = ("@enable_plugins@" = "yes")
module Dynlink_ = struct
let is_native_not_defined = true
let is_native = true
let loadfile_private _ = assert false
......@@ -33,8 +31,6 @@ module Dynlink_ = struct
end
module Dynlink = struct
let is_native_not_defined = false
include @DYNLINK@
end
......@@ -183,8 +183,7 @@ let () =
*)
let load_plugin dir (byte,nat) =
if Config.Dynlink.is_native_not_defined then
errorm "Plugins are not supported";
if not Config.why_plugins then errorm "Plugins not supported";
let file = if Config.Dynlink.is_native then nat else byte in
let file = Filename.concat dir file in
Config.Dynlink.loadfile_private file
......
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