Commit fc569a06 authored by bguillaum's avatar bguillaum

version 0.36.2:

- remove dependencies against xml-light
- move from camlp4 to cppo

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@9081 7838e531-6607-4d57-9587-6c381814729c
parent b9ad23d1
true: package(xml-light conll dep2pict camomile, cairo2, log)
true: package(conll dep2pict camomile, cairo2, log)
......@@ -9,8 +9,8 @@ let get_version () =
let () =
dispatch begin function
| After_rules ->
let v = get_version () in
let pp_src = S[A"-pp"; A("camlp4o pa_macro.cmo -DVERSION=\\\""^v^"\\\" -DDEP2PICT")] in
let version = get_version () in
let pp_src = S[A"-pp"; A("cppo -D 'VERSION "^version^"'")] in
flag ["ocaml"; "ocamldep"] & pp_src;
flag ["ocaml"; "compile"] & pp_src;
| _ -> ()
......
......@@ -12,8 +12,8 @@ remove: [
]
depends: [
"ANSITerminal"
"xml-light"
"libcaml-log"
"cppo"
"cairo2"
"menhir"
"camomile"
......
ifeq (@DEP2PICT@,no)
PP = -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\"'
else
PP = -pp 'camlp4o pa_macro.cmo -DDATA_DIR=\"$(DATA_DIR)\" -DDEP2PICT'
endif
OCAMLFLAGS= \
str.cma bigarray.cma unix.cma -I +threads threads.cma dynlink.cma\
$(CAIRO_BYTE) $(CAMOMILE_BYTE) $(XML_LIGHT_BYTE) $(ANSITERMINAL_BYTE) $(LOG_BYTE) $(DEP2PICT_BYTE)
OCAMLOPTFLAGS= \
str.cmxa bigarray.cmxa unix.cmxa -I +threads threads.cmxa dynlink.cmxa\
$(CAIRO_OPT) $(CAMOMILE_OPT) $(XML_LIGHT_OPT) $(ANSITERMINAL_OPT) $(LOG_OPT) $(DEP2PICT_OPT)
TARGET = libgrew_types.cmi libgrew.cmi libgrew.cma libgrew.cmxa
BASE = grew_base grew_types grew_ast grew_parser grew_lexer grew_loader grew_fs grew_edge grew_node grew_graph libgrew_types grew_command grew_rule grew_grs grew_html libgrew
CMO = $(BASE:%=%.cmo)
CMX = $(BASE:%=%.cmx)
all: $(TARGET)
libgrew.cmxa : $(CMX)
$(OCAMLOPT) -a -o $@ $(CMX)
libgrew.cma : $(CMO)
$(OCAMLC) -a -o $@ $(CMO)
include ../config/Makefile
# --------------------------------------------------------------------------
# Specific rules
SPECIFIC = grew_parser.ml grew_parser.mli grew_lexer.ml
grew_parser.ml: grew_parser.mly
$(MENHIR) --infer --ocamlc "$(OCAMLC) -c -I ." grew_parser.mly
@make grew_parser.cmi # force the build NOW
grew_parser.cmo: grew_parser.ml
$(OCAMLC) $(OCAMLFLAGS) -c $<
grew_parser.cmx: grew_parser.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
grew_lexer.ml: grew_lexer.mll
$(OCAMLLEX) grew_lexer.mll
grew_lexer.cmo: grew_lexer.ml
$(OCAMLC) $(OCAMLFLAGS) -c $<
grew_lexer.cmx: grew_lexer.ml
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
# --------------------------------------------------------------------------
# Common rules
.SUFFIXES: .ml .mli .cmo .cmi .cmx
.ml.cmo:
$(OCAMLC) $(PP) $(OCAMLFLAGS) -c $<
.mli.cmi:
$(OCAMLC) $(OCAMLFLAGS) -c $<
.ml.cmx:
$(OCAMLOPT) $(PP) $(OCAMLOPTFLAGS) -c $<
# Clean up
clean:
rm -f $(TARGET) $(TEST) $(SPECIFIC)
rm -f *.cm[iox] *.[ao] *.annot
rm -f .depend
purge:
rm -f Makefile
rm -rf doc
# Dependencies
depend: .depend
.depend:
$(OCAMLDEP) $(PP) $(INCLUDES) *.mli *.ml > .depend
-include .depend
......@@ -388,10 +388,6 @@ module G_graph = struct
try Some (List.assoc name atts)
with Not_found -> None
(* -------------------------------------------------------------------------------- *)
(** [of_xml d_xml] loads a graph in the xml format: [d_xml] must be a <D> xml element *)
let of_xml ?domain d_xml = failwith "of_xml not available"
(* -------------------------------------------------------------------------------- *)
let del_edge ?domain ?edge_ident loc graph id_src label id_tar =
let node_src =
......
......@@ -112,7 +112,6 @@ module G_graph: sig
It supposes that "SUC" is defined in current relations *)
val of_brown: ?domain:Domain.t -> ?sentid: string -> string -> t
val of_xml: ?domain:Domain.t -> Xml.xml -> t
(* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
(* Update functions *)
(* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
......
......@@ -11,9 +11,7 @@
open Log
open Printf
IFDEF DEP2PICT THEN
open Dep2pict
ENDIF
open Grew_base
open Grew_types
......@@ -57,7 +55,6 @@ module Instance = struct
let save_dot_png ?domain ?filter ?main_feat base t =
ignore (Dot.to_png_file (G_graph.to_dot ?domain ?main_feat t.graph) (base^".png"))
IFDEF DEP2PICT THEN
let save_dep_png ?domain ?filter ?main_feat base t =
let dep = G_graph.to_dep ?domain ?filter ?main_feat t.graph in
let d2p = Dep2pict.from_dep ~dep in
......@@ -69,11 +66,6 @@ module Instance = struct
let d2p = Dep2pict.from_dep ~dep in
let _ = Dep2pict.save_svg ~filename: (base^".png") d2p in
Dep2pict.highlight_shift ()
ELSE
let save_dep_png _ ?filter ?main_feat base t = None
let save_dep_svg _ ?filter ?main_feat base t = None
ENDIF
end (* module Instance *)
(* ================================================================================ *)
......
......@@ -199,7 +199,6 @@ module Grs = struct
Grew_grs.Grs.sequence_names grs
) ()
IFDEF DEP2PICT THEN
let build_html_doc ?(corpus=false) dir grs =
handle ~name:"Grs.build_doc [with Dep2pict]"
(fun () ->
......@@ -214,10 +213,6 @@ module Grs = struct
Grew_grs.Grs.rule_iter fct grs;
Grew_grs.Grs.filter_iter fct grs
) ()
ELSE
let build_html_doc ?(corpus=false) dir grs =
handle ~name:"Grs.build_doc [without Dep2pict]" (fun () -> Grew_html.Html_doc.build ~corpus ~dep:false dir grs) ()
END
let get_domain grs = Grew_grs.Grs.get_domain grs
end
......
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