Permalink
Browse files

modifications for 4.00.0

  • Loading branch information...
1 parent c376545 commit 659691ffe97afe40569ad77c56e0ebd4bc934c5c @lefessan lefessan committed Aug 31, 2012
View
@@ -31,3 +31,4 @@ try-js_of_ocaml/lessons.ml
try-js_of_ocaml/lessons.mli
try-js_of_ocaml/try-js_of_ocaml.js
try-js_of_ocaml/try-ocaml.js
+Makefile.config
View
@@ -1,4 +1,6 @@
-all:
+
+
+all: Makefile.config
$(MAKE) -C js_of_ocaml
$(MAKE) -C js_of_ocaml/compiler compiler.cma
$(MAKE) -C cmicomp
@@ -9,6 +11,9 @@ all:
$(MAKE) -C try-ocaml
$(MAKE) -C try-js_of_ocaml
+Makefile.config:
+ ./configure
+
clean:
$(MAKE) -C js_of_ocaml clean
$(MAKE) -C ocp-jslib clean
View
@@ -1,10 +0,0 @@
-OCAMLC=ocamlc
-OCAMLDEP=ocamldep.opt
-
-JS_DIR=$(ROOT)/js_of_ocaml
-TOPLEVEL_DIR=$(ROOT)/toplevel
-OCAMLNUM_DIR=$(ROOT)/ocaml-num
-TUTORIAL_DIR=$(ROOT)/tutorial
-TOPLEVELLIB_DIR=$(ROOT)/toplevellib
-CMICOMP_DIR=$(ROOT)/cmicomp
-OCPJSLIB_DIR=$(ROOT)/ocp-jslib
View
@@ -18,8 +18,7 @@ CMOS= $(SOURCES:.ml=.cmo)
############### TRYOCAML_NAME=toplevel
# remove this variable to use the default ocaml toplevel
-INCLUDE_TOPLEVELLIB= -I $(TOPLEVELLIB_DIR)/
-TOPLEVELLIB=$(TOPLEVELLIB_DIR)/
+include $(ROOT)/toplevellib-$(OCAMLVNUM)/Makefile.config
COMP=$(JS_DIR)/compiler/js_of_ocaml
@@ -77,7 +76,7 @@ TOPLEVEL_CMIS=$(TOPLEVEL_DIR)/toplevel.cmi
TOPLEVEL_CMOS=$(TOPLEVEL_DIR)/toplevel.cmo $(TOPLEVEL_DIR)/topmain.cmo
TOPLEVEL_CMAS= \
$(CMICOMP_DIR)/js_of_ocaml.cma $(JS_DIR)/compiler/compiler.cma \
- $(TOPLEVELLIB)toplevellib.cma \
+ $(TOPLEVELLIB_CMAS) \
$(OCAMLNUM_DIR)/ocaml-num.cma \
lessons.cmo \
$(TUTORIAL_DIR)/tutorial.cma \
@@ -86,6 +85,7 @@ TOPLEVEL_CMAS= \
INCLUDES= \
-I $(CMICOMP_DIR) \
-I $(JS_DIR)/compiler \
+ -I $(JS_DIR)/lib \
-I $(TUTORIAL_DIR)/ \
$(INCLUDE_TOPLEVELLIB) \
-I $(OCAMLNUM_DIR) \
View
@@ -1,18 +1,20 @@
+# cmicomp is a pure bytecode copy of ocp-cmi-compress, itself a restriction
+# of ocp-cmi, to avoid non dynamic dependencies
JS_CMIS= \
CSS.cmi event_arrows.cmi js.cmi typed_array.cmi \
dom.cmi file.cmi json.cmi url.cmi \
dom_events.cmi firebug.cmi lwt_js.cmi webGL.cmi \
dom_html.cmi form.cmi regexp.cmi xmlHttpRequest.cmi
-all: cmicomp $(JS_CMIS)
+all: $(TOPLEVELLIB_DIR)/cmicomp $(JS_CMIS)
ROOT=..
include $(ROOT)/Makefile.config
-CMICOMP=./cmicomp
+CMICOMP=$(TOPLEVELLIB_DIR)/cmicomp
$(JS_CMIS): $(JS_DIR)/lib/*.cmi
cp -f $(JS_DIR)/lib/*.cmi .
cp -f $(JS_DIR)/lib/js_of_ocaml.cma .
- $(CMICOMP) -without-log $(JS_CMIS)
+ $(CMICOMP) compress $(JS_CMIS)
View
@@ -0,0 +1,16 @@
+#!/bin/sh
+echo Generating Makefile.config
+
+echo OCAMLC=ocamlc > Makefile.config.temp
+echo OCAMLDEP=ocamldep.opt >> Makefile.config.temp
+echo OCAMLVNUM=`ocamlc -version` >> Makefile.config.temp
+echo 'JS_DIR=$(ROOT)/js_of_ocaml' >> Makefile.config.temp
+echo 'TOPLEVEL_DIR=$(ROOT)/toplevel' >> Makefile.config.temp
+echo 'OCAMLNUM_DIR=$(ROOT)/ocaml-num' >> Makefile.config.temp
+echo 'TUTORIAL_DIR=$(ROOT)/tutorial' >> Makefile.config.temp
+echo 'TOPLEVELLIB_DIR=$(ROOT)/toplevellib-$(OCAMLVNUM)' >> Makefile.config.temp
+echo 'CMICOMP_DIR=$(ROOT)/cmicomp' >> Makefile.config.temp
+echo 'OCPJSLIB_DIR=$(ROOT)/ocp-jslib' >> Makefile.config.temp
+
+mv Makefile.config.temp Makefile.config
+echo Makefile.config generated
@@ -0,0 +1,3 @@
+TOPLEVELLIB_CMAS=$(TOPLEVELLIB_DIR)/toplevellib.cma
+INCLUDE_TOPLEVELLIB= -I $(TOPLEVELLIB_DIR)/
+TOPLEVELLIB=$(TOPLEVELLIB_DIR)/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,7 @@
+TOPLEVELLIB_CMAS=\
+ $(TOPLEVELLIB_DIR)/ocamlcommon.cma \
+ $(TOPLEVELLIB_DIR)/ocamlbytecomp.cma \
+ $(TOPLEVELLIB_DIR)/ocamltoplevel.cma \
+
+INCLUDE_TOPLEVELLIB= -I $(TOPLEVELLIB_DIR)/
+TOPLEVELLIB=$(TOPLEVELLIB_DIR)/
Binary file not shown.
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 659691f

Please sign in to comment.