Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] compilation: fixed compilation after rebase

  • Loading branch information...
commit cab608a1ae74fcb9fbe81cf5e969f22d21b33455 1 parent aa2e053
@Aqua-Ye Aqua-Ye authored
View
6 Makefile
@@ -131,10 +131,10 @@ endef
define install-plugin
@printf "Installing into $(STDLIB_DIR)/$*.opp^[[K\r"
@mkdir -p "$(STDLIB_DIR)/$*.opp"
-@$(INSTALL) $(BUILD_DIR)/$*.opp/*.bypass "$(STDLIB_DIR)/$*.opp/";
-@for f in `find "$(BUILD_DIR)/$*.opp" -mindepth 2 -iname \*.\*js`; do \
+@$(INSTALL) $(BUILD_DIR)/lib/$*.opp/*.bypass "$(STDLIB_DIR)/$*.opp/";
+@for f in `find "$(BUILD_DIR)/lib/$*.opp" -mindepth 2 -iname \*.\*js`; do \
nf=`basename $$f | sed 's/[^_]*_\(.*\)/\1/'`; $(INSTALL) $$f "$(STDLIB_DIR)/$*.opp/$$nf"; done
-@$(if $(wildcard $(BUILD_DIR)/$*.opp/*MLRuntime.*), $(INSTALL) $(BUILD_DIR)/$*.opp/*MLRuntime.* "$(STDLIB_DIR)/$*.opp/")
+@$(if $(wildcard $(BUILD_DIR)/lib/$*.opp/*MLRuntime.*), $(INSTALL) $(BUILD_DIR)/lib/$*.opp/*MLRuntime.* "$(STDLIB_DIR)/$*.opp/")
endef
View
58 compiler/libbsl/bslRegisterLib.ml
@@ -1104,35 +1104,35 @@ let finalize s =
let command_not_found = 127
-let js_validator finalized_t =
- let name = finalized_t.f_options.BI.basename in
- match finalized_t.f_options.BI.js_validator with
- | Some ((executable, extern_files),cmd_options) when finalized_t.f_js_code <> [] ->
- let pp_str_list = Format.pp_list " " Format.pp_print_string in
- let pp_extern_files_list = Format.pp_list " " (
- if executable = "java" then (fun fmt v -> Format.fprintf fmt "--externs %s" v) (* probably google compiler *)
- else Format.pp_print_string (* probably js command *)
- )
- in
- let pp_file_list = Format.pp_list " " (
- if executable = "java" then (fun fmt v -> Format.fprintf fmt "--js %s" v)
- else Format.pp_print_string
- )
- in
- let command = Format.sprintf "%s %a %a %a --js_output_file output.js"
- executable
- pp_str_list cmd_options
- pp_extern_files_list extern_files
- pp_file_list (List.map (fun (f,_,_)-> Printf.sprintf "%s.opp/%s/%s_%s" name (Filename.dirname f) name (Filename.basename f)) finalized_t.f_js_code)
- in
- Printf.printf "%s\n" command;
- let r = Sys.command command in
- if r<>0 && not(finalized_t.f_options.BI.unsafe_js) then (
- if r = command_not_found
- then warning "%s not found. Cannot validate js part of the plugin. Please install it or deactivate validation (use --help)" executable
- else OManager.error "code %d:%s: fail to validate js part of the plugin\n" r command
- ) else ()
- | _ -> ()
+let js_validator _finalized_t = ()
+ (* let name = finalized_t.f_options.BI.basename in *)
+ (* match finalized_t.f_options.BI.js_validator with *)
+ (* | Some ((executable, extern_files),cmd_options) when finalized_t.f_js_code <> [] -> *)
+ (* let pp_str_list = Format.pp_list " " Format.pp_print_string in *)
+ (* let pp_extern_files_list = Format.pp_list " " ( *)
+ (* if executable = "java" then (fun fmt v -> Format.fprintf fmt "--externs %s" v) (\* probably google compiler *\) *)
+ (* else Format.pp_print_string (\* probably js command *\) *)
+ (* ) *)
+ (* in *)
+ (* let pp_file_list = Format.pp_list " " ( *)
+ (* if executable = "java" then (fun fmt v -> Format.fprintf fmt "--js %s" v) *)
+ (* else Format.pp_print_string *)
+ (* ) *)
+ (* in *)
+ (* let command = Format.sprintf "%s %a %a %a --js_output_file output.js" *)
+ (* executable *)
+ (* pp_str_list cmd_options *)
+ (* pp_extern_files_list extern_files *)
+ (* pp_file_list (List.map (fun (f,_,_)-> Printf.sprintf "%s.opp/%s/%s_%s" name (Filename.dirname f) name (Filename.basename f)) finalized_t.f_js_code) *)
+ (* in *)
+ (* Printf.printf "%s\n" command; *)
+ (* let r = Sys.command command in *)
+ (* if r<>0 && not(finalized_t.f_options.BI.unsafe_js) then ( *)
+ (* if r = command_not_found *)
+ (* then warning "%s not found. Cannot validate js part of the plugin. Please install it or deactivate validation (use --help)" executable *)
+ (* else OManager.error "code %d:%s: fail to validate js part of the plugin\n" r command *)
+ (* ) else () *)
+ (* | _ -> () *)
;;
View
2  lib/_tags
@@ -3,4 +3,4 @@
# LIB TAGS
#
-<{experimental,opabsl,plugins,stdlib}>: traverse
+<{experimental,plugins,stdlib}>: traverse
View
6 lib/opabsl.itarget
@@ -1,6 +0,0 @@
-lib/opabsl_for_compiler.cmxa
-lib/opabsl_for_compiler.cma
-lib/opabsl_for_server.cmxa
-lib/opabsl_for_server.cma
-lib/opabsl_for_interpreter.cmxa
-lib/opabsl_for_interpreter.cma
View
2  lib/opabsl_for_compiler.mllib
@@ -1 +1 @@
-lib/opabsl/OpabslgenPlugin
+lib/opabsl.opp/OpabslPlugin
View
2  lib/opabsl_for_interpreter.mllib
@@ -1 +1 @@
-lib/opabsl/OpabslgenLoader
+lib/opabsl.opp/OpabslLoader
View
2  lib/opabsl_for_server.mllib
@@ -1 +1 @@
-lib/opabsl/OpabslgenMLRuntime
+lib/opabsl.opp/OpabslMLRuntime
View
6 lib/plugins/opabsl.itarget
@@ -0,0 +1,6 @@
+lib/plugins/opabsl_for_compiler.cmxa
+lib/plugins/opabsl_for_compiler.cma
+lib/plugins/opabsl_for_server.cmxa
+lib/plugins/opabsl_for_server.cma
+lib/plugins/opabsl_for_interpreter.cmxa
+lib/plugins/opabsl_for_interpreter.cma
View
1  lib/plugins/opabsl_for_compiler.mllib
@@ -0,0 +1 @@
+lib/plugins/opabsl/OpabslgenPlugin
View
1  lib/plugins/opabsl_for_interpreter.mllib
@@ -0,0 +1 @@
+lib/plugins/opabsl/OpabslgenLoader
View
1  lib/plugins/opabsl_for_server.mllib
@@ -0,0 +1 @@
+lib/plugins/opabsl/OpabslgenMLRuntime
View
42 tools/build/build_libs
@@ -10,44 +10,44 @@
# contains the shared interfaces.
# if omitted, [directory] is the same as lib_name.
-internal libbase ocamllib/libbase
internal appruntime ocamllib/appruntime
internal database ocamllib/database
+internal libbase ocamllib/libbase
internal libirc ocamllib/libirc
-internal libnet ocamllib/libnet
internal libnattraversal ocamllib/libnet/nattraversal
+internal libnet ocamllib/libnet
internal libruntime ocamllib/libruntime
internal libsecurity ocamllib/libsecurity
-internal libtools ocamllib/libtools
internal libsession ocamllib/libsession
+internal libtools ocamllib/libtools
internal oparuntime ocamllib/oparuntime
-internal pplib compiler/pplib
internal buildinfos compiler/buildinfos
internal compilerlib compiler/compilerlib
-internal passlib compiler/passlib
-internal libtrx compiler/libtrx
-internal ocamllang compiler/ocamllang
-internal libqmlcompil compiler/libqmlcompil
-internal qmlpasses compiler/qmlpasses
internal jslang compiler/jslang
internal libbsl compiler/libbsl
-internal qmlslicer compiler/qmlslicer
+internal libqmlcompil compiler/libqmlcompil
+internal libtrx compiler/libtrx
+internal ocamllang compiler/ocamllang
+internal opacapi compiler/opacapi
+internal opalang compiler/opalang
+internal opalib compiler/opalib
+internal opapasses compiler/passes
internal opatoplib compiler/opatoplib
-internal qml2ocaml compiler/qml2ocaml
+internal passlib compiler/passlib
+internal pplib compiler/pplib
+internal protocols compiler/protocols
internal qml2js compiler/qml2js
+internal qml2ocaml compiler/qml2ocaml
internal qmlcpsrewriter compiler/qmlcps
-internal qmlflatserver compiler/qmlflat
-internal qmlflatcompiler compiler/qmlflat
internal qmlcpsserver compiler/qmlcps
+internal qmlflatcompiler compiler/qmlflat
+internal qmlflatserver compiler/qmlflat
internal qmljsimp compiler/qmljsimp
-internal opalib compiler/opalib
-internal protocols compiler/protocols
-internal opapasses compiler/passes
-internal opalang compiler/opalang
-internal opacapi compiler/opacapi
+internal qmlpasses compiler/qmlpasses
+internal qmlslicer compiler/qmlslicer
# internal libopa compiler/opa
-internal opabsl_for_compiler opabsl.opp
-internal opabsl_for_server opabsl.opp
-internal opabsl_for_interpreter opabsl.opp
+internal opabsl_for_compiler lib/opabsl.opp
+internal opabsl_for_server lib/opabsl.opp
+internal opabsl_for_interpreter lib/opabsl.opp
View
43 tools/build/build_rules.ml
@@ -91,12 +91,12 @@ flag_and_dep ["ocaml"; "doc"] (S[A"-g";P"tools/utils/ocamldoc_plugin.cmxs"]);
cheat by copying the opabsl generated files so that they can be seen as
local by opatop. *)
let magic_import_from_opabsl dest f =
- rule ("import from opabsl: "^f) ~deps:["opabsl.opp/"^f] ~prod:(dest / f)
+ rule ("import from opabsl: "^f) ~deps:["lib"/"opabsl.opp/"^f] ~prod:(dest / f)
(fun env build ->
Seq[Cmd(S[Sh"mkdir";A"-p";P dest]);
- if Pathname.exists "opabsl.opp"
- then (build_list build ["opabsl.opp" / f]; cp ("opabsl.opp"/ f) dest)
- else cp (mlstatelibs/"opabsl.opp"/ f) dest
+ if Pathname.exists ("lib"/"opabsl.opp")
+ then (build_list build ["lib"/"opabsl.opp" / f]; cp ("lib"/"opabsl.opp"/f) dest)
+ else cp (mlstatelibs/"lib"/"opabsl.opp"/ f) dest
])
in
List.iter
@@ -207,7 +207,7 @@ rule "Opa Compiler Interface Validation (opacapi)"
A "-o" ;
P opacapi_validation ;
] @ (List.rev_map (fun file -> P file) opa_opacapi_files)
- @ (List.map (fun x -> P (x ^ ".opp")) opa_opacapi_plugins))
+ @ (List.map (fun x -> P ("lib"/(x ^ ".opp"))) opa_opacapi_plugins))
)
);
@@ -368,7 +368,7 @@ let gen_tag prefix s =
in
let use_tag s =
if s = "use_opabsl" then
- Some "opabsl.opp"
+ Some ("lib"/"opabsl.opp")
else
gen_tag "use" s
in
@@ -417,7 +417,7 @@ let opp_build opa_plugin opp oppf env build =
(* HACK:
For some reason, I couldn't get the dep ocamlbuild function
to pull this dependency... *)
- build_list build ["opabsl.opp"/"opabslMLRuntime.cmx"]
+ build_list build ["lib"/"opabsl.opp"/"opabslMLRuntime.cmx"]
else
();
let files_js = List.filter (fun f-> Pathname.check_extension f "js") files in
@@ -453,9 +453,12 @@ let opp_build opa_plugin opp oppf env build =
files *)
[A"--static"; A"--no-build"],
mv ((Pathname.basename (env opp)) -.- "opp")
- ((Pathname.basename (env opp)) -.- "save")
+ ("lib"/((Pathname.basename (env opp)) -.- "save"))
else
- [], Cmd(S[A"true"])
+ [],
+ mv ((Pathname.basename (env opp)) -.- "opp")
+ ("lib"/((Pathname.basename (env opp)) -.- "opp"))
+
in
let options = [A"-o" ; P((Pathname.basename (env opp)))] @ preprocess_js @
preprocess_ml @ include_dirs @ include_libs @ js_validation @ files_lib @
@@ -484,7 +487,7 @@ rule "opa_plugin_dir: opa_plugin -> oppf"
dep ["plugin_opabsl"] ["lib"/"plugins"/"opabsl"/"opabsl.oppf"];
let opabsl_files =
- (List.map (fun file -> "opabsl.opp"/file) [
+ (List.map (fun file -> "lib"/"opabsl.opp"/file) [
"opabslPlugin.ml"; "opabslMLRuntime.ml";
"opabslLoader.ml"; "serverLib.mli"
])
@@ -492,27 +495,27 @@ in
List.iter (
fun file ->
- let tags = Tags.elements (tags_of_pathname ("plugins"/"opabsl"/file)) in
- tag_file ("opabsl.opp"/file) tags
+ let tags = Tags.elements (tags_of_pathname ("lib"/"plugins"/"opabsl"/file)) in
+ tag_file ("lib"/"opabsl.opp"/file) tags
) ["opabslPlugin.ml"; "opabslMLRuntime.ml";
"opabslLoader.ml"; "serverLib.mli"]
;
rule "opabsl files"
~deps:[
- "plugins"/"opabsl"/"opabsl.oppf";
- "plugins"/"opabsl"/"serverLib.mli"
+ "lib"/"plugins"/"opabsl"/"opabsl.oppf";
+ "lib"/"plugins"/"opabsl"/"serverLib.mli"
]
~prods:opabsl_files
(fun _ _ ->
Seq[
- mv "opabsl.save" "opabsl.opp";
- cp ("plugins"/"opabsl"/"serverLib.mli") ("opabsl.opp"/"serverLib.mli");
+ mv ("lib"/"opabsl.save") ("lib"/"opabsl.opp");
+ cp ("lib"/"plugins"/"opabsl"/"serverLib.mli") ("lib"/"opabsl.opp"/"serverLib.mli");
(* The .mli file is meant to be linked with actual opa
applications. Thus, it doesn't expose all the symbols
defined in the .ml file. We remove this file so that ocamlc
export all symbols defined there. *)
- rm_f ("opabsl.opp"/"opabslMLRuntime.mli")
+ rm_f ("lib"/"opabsl.opp"/"opabslMLRuntime.mli")
]
)
;
@@ -820,7 +823,7 @@ let dir_rec_all_files dir =
in
rule "opa application creator"
- ~deps:("opabsl_for_server.cmxa" :: (dir_rec_all_files "tools/opa-create"))
+ ~deps:("lib/opabsl_for_server.cmxa" :: (dir_rec_all_files "tools/opa-create"))
~prods: [opa_create_dst]
(fun env build ->
Cmd(S[
@@ -829,6 +832,7 @@ rule "opa application creator"
A"-o"; P opa_create_dst; P opa_create_src;
A"--opx-dir";A "stdlib.qmlflat";
A"--back-end";A "qmlflat";
+ A"-I"; A "lib";
A"-I"; A opa_prefix
]));
@@ -840,7 +844,7 @@ let package_building ?(nodebackend=false) ~name ~stamp ~stdlib_only ~rebuild ()
(fun env build ->
try
let plugins = "opabsl" :: string_list_of_file all_plugins_file in
- let plugins = List.map (fun f -> "lib/plugins" / f / f -.- "oppf") plugins in
+ let plugins = List.map (fun f -> "lib"/"plugins"/f/f -.- "oppf") plugins in
build_list build plugins;
let packages = string_list_of_file (all_packages_file nodebackend) in
let packages =
@@ -913,6 +917,7 @@ let package_building ?(nodebackend=false) ~name ~stamp ~stdlib_only ~rebuild ()
A"--project-root"; P Pathname.pwd; (* because the @static_resource in the stdlib expect this *)
A"--no-stdlib";
A"--parser"; A"classic";
+ A"-I"; A"lib";
opaopt;
S all_files;
] @ extra_opt));
View
2  tools/build/build_tools
@@ -57,7 +57,7 @@ internal opa-bin compiler/opa/main.native lib/opa/bin
internal opa_bash_completion tools/bash/bash_completion share/opa
# for now, these can't be built cleanly from opageneral
-internal opabsl.bypass opabsl.opp/opabsl.bypass lib/opa/static
+internal opabsl.bypass lib/opabsl.opp/opabsl.bypass lib/opa/static
internal serverLib.cmi lib/plugins/opabsl/serverLib.cmi lib/opa/static
# for helping developpers of plugins we can distribute the source of the interface
View
2  tools/build/opa-compile-libs.itarget
@@ -10,4 +10,4 @@ compiler/libtrx.cmxa
compiler/qml2ocaml.cmxa
compiler/qmlflatcompiler.cmxa
compiler/opalib.cmxa
-lib/opabsl_for_compiler.cmxa
+lib/plugins/opabsl_for_compiler.cmxa
View
3  tools/build/opa-run-libs.itarget
@@ -13,7 +13,6 @@ ocamllib/libbase.cmxa
compiler/libtrx.cmxa
compiler/qmlflatserver.cmxa
compiler/qmlcpsserver.cmxa
-lib/opabsl_for_server.cmxa
ocamllib/libruntime.cmxa
ocamllib/appruntime.cmxa
ocamllib/oparuntime.cmxa
@@ -25,3 +24,5 @@ ocamllib/libsession.cmxa
ocamllib/libnet/runtimeMain.cmx
ocamllib/libnet/runtimeMain.o
ocamllib/libirc.cmxa
+
+lib/opabsl_for_server.cmxa
Please sign in to comment.
Something went wrong with that request. Please try again.