git clone --recursive https://github.com/HaxeFoundation/haxe.git
Alternatively, source .zip archives or tarballs can be obtained from the GitHub Haxe release overview. However, the git submodules are not included, so you will have to manually place the source code of submodules into appropreate sub-folders.
The dependencies can be easily installed by Homebrew. In fact, if you only want to use the latest development branch of Haxe, without modifying the source, simply run:
brew install haxe --HEAD
brew reinstall haxe --HEAD to upgrade in the future.
If you want to start hacking the Haxe compiler, it is better to clone manually and use the Makefile:
brew cask install xquartz
brew install ocaml camlp4 pcre neko
make make install
sudo apt-get install neko.
make make install
mingw64-i686-pcre(used by Haxe). You might need to switch "View" in top-right corner to "Not Installed" to see it in the list.
Run OCaml32 terminal from the desktop shortcut, from it:
opam install camlp4 sedlex ocamlfind xml-light extlib rope ptmap
Add these to your PATH (actual paths may differ depending on your install path, username, and OCaml version):
Add new env variables (actual paths may differ depending on your install path, username, and OCaml version):
I couldn't get
opam itself running through cmd/powershell because it needs some more environment that's inited in
.bashrc, but I think installing opam packages from within Cygwin terminal is acceptable.
make ADD_REVISION=1 -f Makefile.win
Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3, this helps: http://hdrlab.org.nz/articles/windows-development/make-interrupt-exception-caught-code-0xc00000fd-addr-0x4217b/ TL;DR: put the environment variables at the start of your PATH, not at the end.
where make. It should print out the path of the command that will execute (should be
pkg install ocaml ocaml-camlp4 ocaml-findlib pcre gmake git neko
cd ~ && git clone --recursive https://github.com/HaxeFoundation/haxe.git
cd haxe && gmake "CFLAGS=-I /usr/local/include/"
su -followed by
cd /home/username/haxe && gmake install
If you want to update, it's usually enough to just recompile the compiler by updating your checkout using
git pull followed by issueing the command