1. Ivan Vučica
  2. GNUstep-Ubuntu

Commits

Ivan Vučica  committed b6bbd5d

Removed 'exit 0' from main script. Added more error checking. Added more variable exports to ensure correct detection of libobjc2 and compiler. libobjc2 is now installed in /GNUstep prefix, too.

  • Participants
  • Parent commits a9d80a4
  • Branches default

Comments (0)

Files changed (5)

File GNUstep with libobjc2 on Ubuntu.sh

View file
 fi	
 . "$GSU_SCRIPT_ROOT/phases/10-build-llvm.sh"
 . "$GSU_SCRIPT_ROOT/phases/15-build-libobjc2.sh"
-exit 0
 . "$GSU_SCRIPT_ROOT/phases/20-build-gnustep-make.sh"
 . "$GSU_SCRIPT_ROOT/phases/25-build-gnustep-base.sh"
 . "$GSU_SCRIPT_ROOT/phases/30-build-gnustep-gui.sh"

File phases/10-build-llvm.sh

View file
 echo "Building trunk LLVM and Clang"
 echo "============================="
 if [ "$WITH_TRUNK_LLVM" == "1" ] ; then
-if [ -e "$GSU_BUILD_ROOT/llvm/Release+Asserts/bin/clang" ] ; then
-	echo "Clang already set up in expected directory"
-else
-	cd llvm
-	export CC=gcc
-	export CXX=g++
-	if ./configure --enable-optimized && make -j3 ; then
-		echo "Ok"
+	if [ -e "$GSU_BUILD_ROOT/llvm/Release+Asserts/bin/clang" ] ; then
+		echo "Clang already set up in expected directory"
 	else
-		echo "Failed building trunk LLVM and Clang"
-		exit 1
+		cd llvm
+		export CC=gcc
+		export CXX=g++
+		if ./configure --enable-optimized && make -j3 ; then
+			echo "Ok"
+		else
+			echo "Failed building trunk LLVM and Clang"
+			exit 1
+		fi
 	fi
+
 	export PATH=$PATH:$GSU_BUILD_ROOT/llvm/Release+Asserts/bin: # llvm/Debug/bin contains the clang binary
 	export CC=clang # Make Clang the C/ObjC compiler rather than GCC
 	export CXX=clang++
-fi
+	export OBJC=clang
 
 	echo "Clang now lives in $GSU_BUILD_ROOT/llvm/Release+Asserts/bin/clang"
 	if clang -v ; then

File phases/15-build-libobjc2.sh

View file
 else
 	mkdir Build/
 	cd Build
-	if cmake .. ; then
+	if cmake -DCMAKE_INSTALL_PREFIX=/GNUstep .. ; then
 		echo "CMake ok"
 	else
 		echo "CMake failed"
 	cd ..
 fi
 
+export CFLAGS="-I/GNUstep/include $CFLAGS"
+export CXXFLAGS="-I/GNUstep/include $CXXFLAGS"
+export LDFLAGS="-L/GNUstep/lib $LDFLAGS"
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/GNUstep/lib"
+echo "/GNUstep/lib" | sudo tee -a /etc/ld.so.conf.d/GNUstep.conf
+# or: sudo sh -c "echo '/GNUstep/lib' > /etc/ld.so.conf.d/GNUstep.conf"
+
+

File phases/25-build-gnustep-base.sh

View file
 # - Build and Install GNUstep Base:
 cd gnustep/core/base
 # For Linux e.g. Ubuntu, --with-ffi-include is usually required
-./configure --with-ffi-include=/usr/include/`gcc -dumpmachine` --disable-mixedabi
-make -j 3 && sudo -E make install
+if ./configure \
+	--with-ffi-include=/usr/include/`gcc -dumpmachine` \
+	--disable-mixedabi ; then
+	echo "Configured ok"
+else
+	echo "Failed to configure GNUstep Base"
+	exit 1
+fi
 
+if make -j 3 && sudo -E make install ; then
+	echo "Installed GNUstep Base"
+else
+	echo "Failed to build of install GNUstep Base"
+	exit 1
+fi
+

File phases/30-build-gnustep-gui.sh

View file
 echo "===================="
 
 cd gnustep/core/gui/
-./configure && make -j 3 && sudo -E make install
+if ./configure && make -j 3 && sudo -E make install ; then
+	echo "Ok"
+else
+	echo "Failed to configure, build or install GNUstep GUI"
+	exit 1
+fi
 
+