# # Run this script as root to configure, compile and install # gnustep-make, gnustep-base, gnustep-gui, gnustep-back # with a single command # # Examples: # # ./compile-all # # # # ./compile-all /usr/local/GNUstep # # # if [ "$1" != "" ]; then prefix="$1" else prefix="/usr/GNUstep" fi UNAME=`uname | cut -d'-' -f1` if [ "$UNAME" != "MINGW32_NT" ] ; then if [ ! \( -d $prefix -a -w $prefix \) ] ; then if [ ! \( -d $(basename $prefix) -a -w $(basename $prefix) \) ] ; then NEEDSROOT="true" fi fi fi if gmake -v >/dev/null 2>&1 then export MAKE=gmake else export MAKE=make fi if [ -x /usr/bin/gcc3 ]; then export CC=gcc3 elif [ -z "$CC" ]; then export CC=gcc fi echo "Using compiler $CC" # Flags for windows build. if [ "$UNAME" == "MINGW32_NT" ] ; then export CCFLAGS="-fstrict-aliasing -fno-omit-frame-pointer" fi # Install make cd make CC=$CC ./configure --prefix=$prefix $MAKE if [ "true" == "$NEEDSROOT" ]; then sudo -u root $MAKE install else $MAKE install fi . $prefix/System/Library/Makefiles/GNUstep.sh # Install base cd ../base CC=$CC ./configure $MAKE if [ "true" == "$NEEDSROOT" ]; then sudo -u root ./install.sh $prefix $MAKE else $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install fi # Install gui cd ../gui CC=$CC ./configure $MAKE if [ true == $NEEDSROOT ]; then sudo -u root ./install.sh $prefix $MAKE else $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install fi # Install back cd ../back CC=$CC ./configure $MAKE if [ "true" == "$NEEDSROOT" ]; then sudo -u root ./install.sh $prefix $MAKE else $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install fi