]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
[json-rpc] The json_conv and rpc generator are compiled to bytecode so that
authorPrashanth Mundkur <prashanth.mundkur@citrix.com>
Tue, 23 Jun 2009 16:40:50 +0000 (09:40 -0700)
committerPrashanth Mundkur <prashanth.mundkur@citrix.com>
Tue, 23 Jun 2009 16:40:50 +0000 (09:40 -0700)
   they may be invoked in the 2 environments (buildroot + host).
   We could potentially move this to the toolchain directory once
   it stabilizes. For the moment, having everything in toolstack.git
   compiled with the toolchain compiler is perhaps simpler.

[Makefile.rules] The bytecode dependencies have been added as prg_BYTE_LIBS in
 Makefile.rules.

Conflicts:

gen/rpc/Makefile

Makefile.rules
gen/json_conv/Makefile
gen/rpc/Makefile

index de840672da8c9b054110982884e8edf4bb8f1023..ee06b736749920f63ec5c57383220b45d39c4c03 100644 (file)
@@ -77,7 +77,7 @@ define OCAML_PROGRAM_template
  $(1): $(foreach obj,$($(1)_OBJS),$(obj).cmx) $($(1)_EXTRA_DEPS)
        $(call quiet-command, $(OCAMLOPT) $(OCAMLOPTFLAGS) -o $$@ $($(1)_LIBS) $$+,MLBIN,$$@)
  $(1).byte: $(foreach obj,$($(1)_OBJS),$(obj).cmo)
-       $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -o $$@ $$+,MLBIN,$$@)
+       $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -o $$@ $($(1)_BYTE_LIBS) $$+,MLBIN,$$@)
 endef
 
 define C_PROGRAM_template
index 5fa6ed52179bbf24fdb425b361000d58edb10627..6f022f9bbc3f029d7dea0dfe3509dc5de1192d52 100644 (file)
@@ -1,19 +1,19 @@
 TOPLEVEL=../..
 include $(TOPLEVEL)/common.make
 
-GENERATED_FILES = lexer.ml parser.mli parser.ml
-
 gen_json_conv_OBJS = syntax lexer parser codegen gen_json_conv
 gen_json_conv_LIBS = unix.cmxa
+gen_json_conv_BYTE_LIBS = unix.cma
 
 ALL_OCAML_OBJS = $(gen_json_conv_OBJS)
 
 OCAML_PROGRAM = gen_json_conv
 PROGRAMS = $(OCAML_PROGRAM)
+GENERATED_FILES = lexer.ml parser.mli parser.ml
 
-all: $(PROGRAMS)
+all: $(PROGRAMS) gen_json_conv.byte
 
-bins: $(PROGRAMS)
+bins: gen_json_conv
 
 include $(TOPLEVEL)/Makefile.rules
 
index 5ef3192a74942a3dbc046835641de7bcd07df36f..8cfc548e491106724604c75e4935bfc577110446 100644 (file)
@@ -11,15 +11,16 @@ OCAMLINCLUDE += -I $(TOPLEVEL)/libs/json
 
 gen_rpc_OBJS = syntax syntax_json_conv rpc_decl codegen gen_rpc
 gen_rpc_LIBS = unix.cmxa $(TOPLEVEL)/libs/json/json.cmxa
+gen_rpc_BYTE_LIBS = unix.cma $(TOPLEVEL)/libs/json/json.cma
 
 ALL_OCAML_OBJS = $(gen_rpc_OBJS)
 
 OCAML_PROGRAM = gen_rpc
-PROGRAMS = $(OCAML_PROGRAM)
+PROGRAMS = $(OCAML_PROGRAM) gen_rpc.byte
 
 all: $(PROGRAMS)
 
-bins: $(PROGRAMS)
+bins: gen_rpc
 
 include $(TOPLEVEL)/Makefile.rules