Skip to content

Commit e54b1e8

Browse files
committed
Straighten out build process
1 parent 27a27bf commit e54b1e8

5 files changed

Lines changed: 15 additions & 19 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
# topkg (https://github.com/dbuenzli/topkg) is a small native packager for your lib
12
build:
23
cp pkg/META.in pkg/META
34
ocamlbuild -package topkg pkg/build.native
45
./build.native build
56

7+
# some boilerplate to publish a new version to GitHub
68
release:
79
git add package.json opam
810
git commit -m "Version $(version)"
911
git tag -a $(version) -m "Version $(version)."
10-
# Push first the objects, then the tag.
1112
git push "git@github.com:reasonml/ReasonNativeProject.git"
1213
git push "git@github.com:reasonml/ReasonNativeProject.git" tag $(version)
1314

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,35 @@ Installation of [`Reason`](http://facebook.github.io/reason/) project for native
66

77
**Requirements**: [OPAM](https://opam.ocaml.org), the OCaml package manager.
88

9-
`ReasonNativeProject` installs the `Reason` toolchain into your global opam directory
10-
using `opam`. `ReasonNativeProject` can therefore be used as a template for new
11-
projects, but can also be used to install the toolchain [into the global
12-
environment](#reasonNativeproject-editor-support). `ReasonNativeProject` includes: the
13-
compiler toolchain, the source formatter, REPL, and IDE support for popular
14-
editors.
15-
169
[![Build Status](https://travis-ci.org/reasonml/ReasonNativeProject.svg?branch=master)](https://travis-ci.org/reasonml/ReasonNativeProject)
1710

1811
## Install
1912

20-
Install by cloning the repo and running the following commands. These commands
21-
install all dependencies.
13+
Clone the repo and install the dependencies:
2214

2315
```sh
2416
git clone https://github.com/reasonml/ReasonNativeProject.git
2517
cd ReasonNativeProject
18+
# opam will read into the `opam` file and add the other dependencies
2619
opam pin add -y ReasonNativeProject .
2720
```
2821

29-
### Run, Change, Rebuild
22+
### Build
3023

3124
There are a couple of built-in commands in the `Makefile`.
3225

3326
```sh
34-
make build # Rebuilds after changing
35-
make clean # Clean if you need to!
27+
make build # build/rebuild your files
28+
make clean # clean the compiled artifacts
3629
```
3730

38-
A single test file `./src/Test.re` is included. Make a simple change to it and
31+
A single test file `./src/test.re` is included. Make a simple change to it and
3932
then run the commands above to see it effect the output.
4033

34+
The built output is in `/_build`.
35+
4136
The binary output will be in the project root directory -- to run it, type
42-
`./Test.byte`!
37+
`./test.byte`!
4338

4439
## Developing Your Project
4540

pkg/build.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ let () =
1010
%% of_list files)
1111
in
1212
let build = Pkg.build ~cmd () in
13-
Pkg.describe "ReasonNativeProject" ~build ~change_logs:[] ~licenses:[] ~readmes:[] @@ fun c ->
13+
Pkg.describe "ReasonNativeProject"~build ~change_logs:[] ~licenses:[] ~readmes:[] (fun c ->
1414
Ok [
1515
Pkg.lib "pkg/META";
16-
Pkg.bin ~auto:true ~dst:"test" "src/Test";
17-
]
16+
Pkg.bin ~auto:true ~dst:"test" "src/test";
17+
])
File renamed without changes.

test-with-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ eval `opam config env`
1010
opam update
1111
opam pin add -y ReasonNativeProject .
1212
make
13-
./Test.native
13+
./test.native
1414
git diff --exit-code

0 commit comments

Comments
 (0)