Skip to content

Commit

Permalink
Merge pull request #95 from WebAssembly/directories
Browse files Browse the repository at this point in the history
Move the contents of ml-proto/src into ml-proto.
  • Loading branch information
sunfishcode committed Oct 1, 2015
2 parents be2b6ea + 4aecd07 commit 2ef91ef
Show file tree
Hide file tree
Showing 55 changed files with 12 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions ml-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ The interpreter can also be run as a REPL, allowing to enter pieces of scripts i

You'll need OCaml 4.02. The best way to get this is to download the source tarball from the ocaml website ( http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.2.tar.gz ) and do the configure / make dance. On OSX, with [Homebrew](http://brew.sh/) installed, simply `brew install ocaml`.

Once you have ocaml, go to the `src` directory and simply do
Once you have ocaml, simply do

```
make
```

You'll get an executable named `src/wasm`.
You'll get an executable named `./wasm`.

Alternatively, you can also say (in `src`):
Alternatively, you can also say:

```
ocamlbuild -Is "given, spec, host" -libs "bigarray, str" main.native
```

and get an executable named `src/main.native`.
and get an executable named `./main.native`.


### Building on Windows
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ml-proto/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def find_interpreter(path):
def rebuild_interpreter(path):
print("// building %s" % path)
sys.stdout.flush()
exitCode = subprocess.call(["ocamlbuild", "-libs", "bigarray, str", "-Is", "given, spec, host", "-cflags", "-g", "host/main.native"], cwd=os.path.abspath("src"))
exitCode = subprocess.call(["ocamlbuild", "-libs", "bigarray, str", "-Is", "given, spec, host", "-cflags", "-g", "host/main.native"])
if (exitCode != 0):
raise Exception("ocamlbuild failed with exit code %i" % exitCode)
if not os.path.exists(path):
raise Exception("Interpreter has not been built. Looked for %s" % path)

if __name__ == "__main__":
interpreterPath = os.path.abspath("src/main.native")
interpreterPath = os.path.abspath("./main.native")

try:
os.makedirs("test/output/")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions ml-proto/travis/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ set -x
# from anywhere.
cd $(dirname ${BASH_SOURCE[0]})/..

export PATH=$PWD/ocaml/install/bin:$PATH

cd src
export PATH=$PWD/../ocaml/install/bin:$PATH

ocamlbuild -libs "bigarray, str" -Is "given, spec, host" main.native

cd ..

./runtests.py
7 changes: 5 additions & 2 deletions ml-proto/travis/install-ocaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
set -e

# Move to a location relative to the script so it runs
# from anywhere.
cd $(dirname ${BASH_SOURCE[0]})/..
# from anywhere. Go two levels down to get out of ml-proto
# and into the top-level dir, since we'll run ocamlbuild
# inside of ml-proto and it goes pear-shaped if it
# encounters ocaml's own build directory.
cd $(dirname ${BASH_SOURCE[0]})/../..

rm -rf ocaml
mkdir ocaml
Expand Down

0 comments on commit 2ef91ef

Please sign in to comment.