building haxelib from source
If you installed haxe with the official precompiled releases there is no need to install haxelib from source since it's already part of the installation.
But - at least at the time of this writing - the installation of haxelib is not part of the install.ml installation file, which is needed if you build haXe from sources.
Requirements
- installed haXe and neko from sources according to this manual
- environment variable $HAXE_HOME is defined
- you work on linux, mac os x, or - if on windows - with cygwin
Installation
You can use the following shell script for the complete build and install process.
1. copy the contents into a shell script, like "install_haxelib.sh"
2. make it executable: sudo chmod 0755 install_haxelib.sh
3. run it:
./install_haxelib.sh
installation script:
#!/bin/sh
# install_haxelib.sh
# clean previous
rm -rf ./bin-haxelib
rm -rf ./haxelib
sudo rm -rf /usr/local/bin/haxelib
sudo rm -rf /usr/local/haxe/haxelib
cvs -d :pserver:anonymous@cvs.motion-twin.com:/cvsroot login
# hit enter for blank password
cvs -d :pserver:anonymous@cvs.motion-twin.com:/cvsroot co haxe/std/tools/haxelib/
# build haxelib
haxe ./haxe/std/tools/haxelib/haxelib.hxml
# install it
mkdir ./bin-haxelib
mv ./haxelib* ./bin-haxelib/
mv ./index.* ./bin-haxelib/
sudo mkdir $HAXE_HOME/haxelib
sudo cp -R ./bin-haxelib/* $HAXE_HOME/haxelib
sudo ln -s $HAXE_HOME/haxelib/haxelib /usr/local/bin/
Now you're ready to use haxelib: Using haxelib
version #5904, modified 2009-05-03 15:52:29 by baurel