summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2010-08-02 14:37:22 +0000
committerDamien Doligez <damien.doligez-inria.fr>2010-08-02 14:37:22 +0000
commit575555eecd11fcc745e0f1e88d090764b3291b63 (patch)
tree980663cc4b47a8e706079143a22403de6eda968a /build
parent7c11c2acf98926b16bfc737dadc64ee3d8eff352 (diff)
downloadocaml-575555eecd11fcc745e0f1e88d090764b3291b63.tar.gz
merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'build')
-rw-r--r--build/camlp4-bootstrap-recipe.txt19
-rwxr-xr-xbuild/camlp4-bootstrap.sh3
-rwxr-xr-xbuild/camlp4-mkCamlp4Ast.sh24
3 files changed, 38 insertions, 8 deletions
diff --git a/build/camlp4-bootstrap-recipe.txt b/build/camlp4-bootstrap-recipe.txt
index 5fa5092c63..9f1417a2fa 100644
--- a/build/camlp4-bootstrap-recipe.txt
+++ b/build/camlp4-bootstrap-recipe.txt
@@ -2,16 +2,11 @@
make clean
./build/distclean.sh
./configure -prefix `pwd`/_install
- ./build/world.sh byte
+ ./build/fastworld.sh
# Go to "Bootstrap camlp4"
=== Install the bootstrapping camlp4 processor ===
./build/install.sh
- # Either extend your PATH with _install
- export PATH=`pwd`/_install:$PATH
- # Or copy just the needed files (for better understanding)
- cp _build/camlp4/camlp4boot.byte <somewhereinPATH>/bin/camlp4boot
- cp _build/camlp4/camlp4o.byte <somewhereinPATH>/bin/camlp4o
=== Build camlp4 ===
# This step is not needed right after a "./build/world.sh byte"
@@ -20,6 +15,8 @@
=== Bootstrap camlp4 ===
# First "Build camlp4"
# Then "Install the bootstrapping camlp4 processor"
+ # Indeed the following bootstrapping script
+ # does use the installed version!
./build/camlp4-bootstrap.sh
# If the fixpoint not is reached yet
# Go to "Bootstrap camlp4"
@@ -27,6 +24,12 @@
# Have a look at the changes in
# camlp4/boot it may be a good idea to commit them
+=== Generate Camlp4Ast.ml ===
+ # First "Install the bootstrapping camlp4 processor"
+ # Indeed the following bootstrapping script
+ # does use the installed version!
+ ./build/camlp4-mkCamlp4Ast.sh
+
=== Case study "let open M in e" ===
Open the revised parser
@@ -89,7 +92,7 @@
(* let open i in e *)
| ExOpI of loc and ident and expr
- Then build. Bootstrap once and build again.
+ Then "Generate Camlp4Ast.ml" and build.
We get a single warning in Camlp4/Struct/Camlp4Ast2OCamlAst.ml but
don't fix it now.
@@ -135,7 +138,7 @@ Add new parsing rules for := but keep the old actions for now.
(* module i := i *)
| WcMoS of loc and ident and ident
-3/ Build and bootstrap once.
+3/ "Generate Camlp4Ast.ml" and build.
4/ Change the generated camlp4/boot/camlp4boot.ml:
Look for ":=" and change occurences of
diff --git a/build/camlp4-bootstrap.sh b/build/camlp4-bootstrap.sh
index c594c80e26..ef9a93c01b 100755
--- a/build/camlp4-bootstrap.sh
+++ b/build/camlp4-bootstrap.sh
@@ -5,6 +5,9 @@
set -e
cd `dirname $0`/..
+. config/config.sh
+export PATH=$BINDIR:$PATH
+
TMPTARGETS="\
camlp4/boot/Lexer.ml"
diff --git a/build/camlp4-mkCamlp4Ast.sh b/build/camlp4-mkCamlp4Ast.sh
new file mode 100755
index 0000000000..2a30b9ab22
--- /dev/null
+++ b/build/camlp4-mkCamlp4Ast.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Id$
+set -e
+cd `dirname $0`/..
+
+. config/config.sh
+export PATH=$BINDIR:$PATH
+
+CAMLP4AST=camlp4/Camlp4/Struct/Camlp4Ast.ml
+BOOTP4AST=camlp4/boot/Camlp4Ast.ml
+
+[ -f "$BOOTP4AST" ] && mv "$BOOTP4AST" "$BOOTP4AST.old"
+rm -f "_build/$BOOTP4AST"
+rm -f "_build/$CAMLP4AST"
+
+if [ -x ./boot/myocamlbuild.native ]; then
+ OCAMLBUILD=./boot/myocamlbuild.native
+else
+ OCAMLBUILD="./boot/ocamlrun boot/myocamlbuild"
+fi
+$OCAMLBUILD $CAMLP4AST
+
+echo promote $CAMLP4AST
+cp _build/$CAMLP4AST camlp4/boot/`basename $CAMLP4AST`