Skip to content

Instantly share code, notes, and snippets.

@hcarty
Last active October 19, 2017 17:33
Show Gist options
  • Save hcarty/ef84dc898883b5cd14aeaa4fe5ab76f0 to your computer and use it in GitHub Desktop.
Save hcarty/ef84dc898883b5cd14aeaa4fe5ab76f0 to your computer and use it in GitHub Desktop.
Makefile template for a jbuilder-backed OCaml/Reason library project
.PHONY: all test benchmark doc repl clean gh-pages
all:
jbuilder build --dev
test:
jbuilder runtest --dev
benchmark:
jbuilder build benchmark/bench.exe
_build/default/benchmark/bench.exe
doc:
jbuilder build @doc
repl:
jbuilder utop src
clean:
jbuilder clean
gh-pages: doc
git clone `git config --get remote.origin.url` .gh-pages --reference .
git -C .gh-pages checkout --orphan gh-pages
git -C .gh-pages reset
git -C .gh-pages clean -dxf
cp -r _build/default/_doc/* .gh-pages
git -C .gh-pages add .
git -C .gh-pages config user.email 'docs@project'
git -C .gh-pages commit -m "Update Pages"
git -C .gh-pages push origin gh-pages -f
rm -rf .gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment