forked from IoLanguage/io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·30 lines (27 loc) · 983 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# Build script for Steve
INSTALL_PREFIX="/usr/local"
if [ X"$1" = X"linkInstall" ]; then
rm -rf $INSTALL_PREFIX/lib/io $INSTALL_PREFIX/bin/io
for i in $PWD/build/_build/dll/*; do ln -s $i $INSTALL_PREFIX/lib/`basename $i`; done
mkdir $INSTALL_PREFIX/lib/io
ln -s $PWD/addons $INSTALL_PREFIX/lib/io/
elif [ X"$1" = X"install" ]; then
cd build
make install
elif [ X"$1" = X"help" ]; then
echo "Io build and installation"
echo "Usage: $0 [help|install|linkInstall|clean]"
echo -e "help\n\tThis message"
echo -e "install\n\tInstalls Io (must have built it first)"
echo -e "linkInstall\n\tLike above, but creates links into this hierarchy"
echo -e "clean\n\tRemoves all build files. This will break a linkInstall."
echo -e "Any other arguments, or lack thereof will build Io."
elif [ X"$1" = X"clean" ]; then
[ -d build ] && rm -rf build || echo "Nothing to clean."
else
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" ..
make all
fi