From: Kim Nguyễn Date: Fri, 4 Mar 2016 16:29:16 +0000 (+0100) Subject: Merge branch 'ocamlbuild-port' of ssh://git.nguyen.vg/tatoo into ocamlbuild-port X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=commitdiff_plain;h=3fadb034bfc0075d420bdd1383214014500501b8;hp=a718c76f2cf07c28fcf8a272e9ad699889049d3b Merge branch 'ocamlbuild-port' of ssh://git.nguyen.vg/tatoo into ocamlbuild-port --- diff --git a/Makefile.in b/Makefile.in index 5d29eb8..f2df8d4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,5 @@ CAMLP4FLAGS=@CAMLP4FLAGS@ -PPOPTSFLAGS= $($CAMLP4FLAGS:%=ppopt(%)) -OCAMLBUILDFLAGS=-j 0 -use-ocamlfind @OCAMLBUILDFLAGS@ +OCAMLBUILDFLAGS=-j 0 -use-ocamlfind @OCAMLBUILDFLAGS@ $(CAMLP4FLAGS:%=-tag %) OCAMLBUILD=@OCAMLBUILD@ PACKAGE = @PACKAGE_TARNAME@ NATIVE=$(PACKAGE).native @@ -21,7 +20,7 @@ all: @ %: - @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $(TAGS) $(PPOPTFLAGS:%=-tag %) $@ + @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) $@ clean: @ $(OCAMLBUILD) $(OCAMLBUILDFLAGS) -clean diff --git a/TODO b/TODO new file mode 100644 index 0000000..b6f51d3 --- /dev/null +++ b/TODO @@ -0,0 +1,12 @@ +Pour éviter les phases et le Ranking : +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +partir de l'état initial. + +Exclure tous les états qui ne sont pas trivialement satisfiables. + +Requêtes N-aires. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~: + +Garder pour chaque variable un ensemble de candidats. +et propager. \ No newline at end of file diff --git a/configure.in b/configure.in index d9a9133..0adc970 100644 --- a/configure.in +++ b/configure.in @@ -179,7 +179,7 @@ AC_ARG_ENABLE([debug], if test "x$DEBUG" = "xyes"; then OCAMLBUILDFLAGS="$OCAMLBUILDFLAGS -tag debug" - CAMLP4FLAGS="$CAMLP4FLAGS -D DEBUG" + CAMLP4FLAGS="$CAMLP4FLAGS ppopt\(-D\) ppopt\(DEBUG\)" fi #profiling @@ -200,7 +200,7 @@ AC_ARG_ENABLE([trace], [TRACE=no]) if test "x$TRACE" = "xyes"; then - CAMLP4FLAGS="$CAMLP4FLAGS -D HTMLTRACE" + CAMLP4FLAGS="$CAMLP4FLAGS ppopt\(-D\) ppopt\(HTMLTRACE\)" fi #inlining @@ -217,7 +217,7 @@ AC_ARG_ENABLE([unsafe], [UNSAFE=0]) if test "x$UNSAFE" = "xyes"; then - CAMLP4FLAGS="$CAMLP4FLAGS -unsafe" + CAMLP4FLAGS="$CAMLP4FLAGS ppopt\(-unsafe\)" fi diff --git a/myocamlbuild.ml b/myocamlbuild.ml index 3b3e516..dbc0a45 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -5,12 +5,24 @@ let includes = List.map (concat "include") d +let ml_str_rule () = + rule ".ml.str" ~dep:"%.ml.str" ~prod:"%.ml" + (fun env _ -> + let mlstr = env "%.ml.str" and ml = env "%.ml" in + let cmd = Printf.sprintf "echo -n 'let content = \"' > %s ;\ + sed -e 's/\\([\"\\\\]\\)/\\\\\\1/g' %s | sed -e 's/^\\(.*\\)$/\\1\\\\n\\\\/g' >> %s ;\ + echo '' >> %s ;\ + echo '\"' >> %s" ml mlstr ml ml ml + in + Cmd ( Sh cmd )) + let () = dispatch (function | After_rules -> dep ["ocaml";"compile";] includes; dep ["ocaml";"ocamldep"; ] includes; - pflag ["ocaml";"compile";] "ppopt" (fun s -> S [A"-ppopt"; A (s)]); + pflag ["ocaml";"compile";] "ppopt" (fun s -> S [A"-ppopt"; A (s)]); pflag ["ocaml";"ocamldep";] "ppopt" (fun s -> S [A"-ppopt"; A (s)]); + ml_str_rule () | _ -> () )