netsurf: branch master updated. release/3.0-57-ge6eecc0

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Sat May 11 10:46:39 BST 2013


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9
...commit http://git.netsurf-browser.org/netsurf.git/commit/e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9
...tree http://git.netsurf-browser.org/netsurf.git/tree/e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9

The branch, master has been updated
       via  e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9 (commit)
      from  29086c377f78bbf684c49627866d68c962c352af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9
commit e6eecc098baaf3cbcd04af6c8bbb9e04209bc9c9
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    improve script to use case statements as appropriate and fail correctly for unsupported usage

diff --git a/utils/jenkins-build.sh b/utils/jenkins-build.sh
index feb6605..0fe834c 100755
--- a/utils/jenkins-build.sh
+++ b/utils/jenkins-build.sh
@@ -20,19 +20,17 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-# NetSurf continuius integration build script for jenkins
+# NetSurf continuous integration build script for jenkins
 #
 # This script is executed by jenkins to build netsurf itself
 #
 # Usage: jenkins-build.sh
 #
 
+# TARGET is set to the frontend target to build
+# label is set to the identifier of the toolchain doing the building
 
-# TARGET must be in the environment and set correctly
-if [ "x${TARGET}" = "x" ];then
-    echo "TARGET unset"
-    exit 1
-fi
+################# Parameter and environment setup #####################
 
 #identifier for this specific build
 IDENTIFIER="$CC-${BUILD_JS}-${BUILD_NUMBER}"
@@ -40,135 +38,216 @@ IDENTIFIER="$CC-${BUILD_JS}-${BUILD_NUMBER}"
 # default atari architecture - bletch
 ATARIARCH=68020-60
 
-if [ "${TARGET}" = "riscos" ];then
-
-    ARTIFACT_TARGET=riscos
-    PKG_SRC=netsurf
-    PKG_SFX=.zip
-
-elif [ "${TARGET}" = "windows" ];then
-
-    ARTIFACT_TARGET=windows
-    PKG_SRC=netsurf-installer
-    PKG_SFX=.exe
-
-elif [ "${TARGET}" = "cocoa" ];then
-
-    if [ "${label}" = "i686-apple-darwin10" ]; then
-        ARTIFACT_TARGET=Darwin
-        IDENTIFIER="${label}-${IDENTIFIER}"
-
-    elif [ "${label}" = "powerpc-apple-darwin9" ]; then
-        ARTIFACT_TARGET=powerpc-apple-darwin9
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
-
-    else
-        echo "Bad cocoa label"
-        exit 1
-
-    fi
-
-    PKG_SRC=NetSurf
-    PKG_SFX=.dmg
-
-elif [ "${TARGET}" = "amiga" ];then
-
-    ARTIFACT_TARGET=amiga
-    PKG_SRC=NetSurf_Amiga/netsurf
-    PKG_SFX=.lha
-
-
-elif [ "${TARGET}" = "atari" ];then
-
-    if [ "${label}" = "m68k-atari-mint" ]; then
-        ARTIFACT_TARGET=m68k-atari-mint
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"    
-        PKG_SRC=ns020
-        PKG_SFX=.zip
-
-    elif [ "${label}" = "m5475-atari-mint" ]; then
-        ARTIFACT_TARGET=m5475-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/m5475-atari-mint/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/m5475-atari-mint/cross/bin
-        ATARIARCH=v4e
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
-        PKG_SRC=nsv4e
-        PKG_SFX=.zip
-
-    else
+# Ensure the combination of target and toolchain works and set build
+#   specific parameters too
+case ${TARGET} in
+    "riscos")
+	case ${label} in
+	    "arm-unknown-riscos")
+		ARTIFACT_TARGET=riscos
+		;;
 
-        echo "Bad atari label"
-        exit 1
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    fi    
+	esac
 
-elif [ "${TARGET}" = "gtk" ];then
+	PKG_SRC=netsurf
+	PKG_SFX=.zip
+	;;
 
-    ARTIFACT_TARGET=Linux
-    PKG_SRC=nsgtk
-    PKG_SFX=
 
-elif [ "${TARGET}" = "framebuffer" ];then
+    "windows")
+	case ${label} in
+	    "i686-w64-mingw32")
+		ARTIFACT_TARGET=windows
+		;;
 
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    ARTIFACT_TARGET=Linux
-    PKG_SRC=nsfb
-    PKG_SFX=
+	esac
 
-elif [ "${TARGET}" = "monkey" ];then
+	PKG_SRC=netsurf-installer
+	PKG_SFX=.exe
+	;;
 
-    if [ "${label}" = "linux" ]; then
-        ARTIFACT_TARGET=Linux
 
-    elif [ "${label}" = "i686-apple-darwin10" ]; then
-        ARTIFACT_TARGET=Darwin
+    "cocoa")
+	case ${label} in
+	    "i686-apple-darwin10")
+		ARTIFACT_TARGET=Darwin
+		IDENTIFIER="${label}-${IDENTIFIER}"
+		;;
 
-    elif [ "${label}" = "powerpc-apple-darwin9" ]; then
-        ARTIFACT_TARGET=powerpc-apple-darwin9
+	    "powerpc-apple-darwin9")
+		ARTIFACT_TARGET=powerpc-apple-darwin9
+		IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
+		;;
 
-    elif [ "${label}" = "arm-unknown-riscos" ]; then
-        ARTIFACT_TARGET=riscos
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    elif [ "${label}" = "m68k-atari-mint" ]; then
-        ARTIFACT_TARGET=m68k-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	esac
 
-    elif [ "${label}" = "m5475-atari-mint" ]; then
-        ATARIARCH=v4e
-        ARTIFACT_TARGET=m5475-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	PKG_SRC=NetSurf
+	PKG_SFX=.dmg
+	;;
 
-    elif [ "${label}" = "i686-w64-mingw32" ]; then
-        ARTIFACT_TARGET=windows
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
 
-    elif [ "${label}" = "ppc-amigaos" ]; then
-	ARTIFACT_TARGET=amiga
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+    "amiga")
+	case ${label} in
+	    "ppc-amigaos")
+		ARTIFACT_TARGET=amiga
+		;;
 
-    else
-        echo "Bad monkey label"
-        exit 1
-    fi
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    IDENTIFIER="${label}-${IDENTIFIER}"
-    PKG_SRC=nsmonkey
-    PKG_SFX=
+	esac
+
+	PKG_SRC=NetSurf_Amiga/netsurf
+	PKG_SFX=.lha
+	;;
+
+
+    "atari")
+	case ${label} in
+	    "m68k-atari-mint")
+		ARTIFACT_TARGET=m68k-atari-mint
+		PKG_SRC=ns020
+		PKG_SFX=.zip
+		;;
+
+	    "m5475-atari-mint")
+		ARTIFACT_TARGET=m5475-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/m5475-atari-mint/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/m5475-atari-mint/cross/bin
+		ATARIARCH=v4e
+		PKG_SRC=nsv4e
+		PKG_SFX=.zip
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
+	;;
+
+
+    "gtk")
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	PKG_SRC=nsgtk
+	PKG_SFX=
+	;;
+
+
+    "framebuffer")
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	PKG_SRC=nsfb
+	PKG_SFX=
+	;;
+
+
+    "monkey")
+	# monkey target can be built on most of the supported architectures
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    "i686-apple-darwin10")
+		ARTIFACT_TARGET=Darwin
+		;;
+
+	    "powerpc-apple-darwin9")
+		ARTIFACT_TARGET=powerpc-apple-darwin9
+		;;
+
+	    "arm-unknown-riscos")
+		ARTIFACT_TARGET=riscos
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "m68k-atari-mint")
+		ARTIFACT_TARGET=m68k-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "m5475-atari-mint")
+		ATARIARCH=v4e
+		ARTIFACT_TARGET=m5475-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "i686-w64-mingw32")
+		ARTIFACT_TARGET=windows
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "ppc-amigaos")
+		ARTIFACT_TARGET=amiga
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
 
-else
-    
-    # unkown target
-    exit 1
+	IDENTIFIER="${label}-${IDENTIFIER}"
+	PKG_SRC=nsmonkey
+	PKG_SFX=
+	;;
 
-fi
-
-########### Build from source ##################
+    *)
+	# TARGET must be in the environment and set correctly
+	echo "Unkown TARGET \"${TARGET}\""
+	exit 1
+	;;
+
+esac
 
 # setup environment
 export PREFIX=${JENKINS_HOME}/artifacts-${ARTIFACT_TARGET}
@@ -176,27 +255,37 @@ export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib
 export PATH=${PATH}:${PREFIX}/bin
 
-# disable ccache for clang
+# configure ccache for clang
 if [ "${CC}" = "clang" ];then
-export CCACHE_CPP2=yes
-export CC="clang -Qunused-arguments"
+    export CCACHE_CPP2=yes
+    export CC="clang -Qunused-arguments"
 fi
 
 # convert javascript parameters
 if [ "${BUILD_JS}" = "json" ];then
-        BUILD_MOZJS=NO
-        BUILD_JS=YES
+    BUILD_MOZJS=NO
+    BUILD_JS=YES
 else
     BUILD_JS=NO
     BUILD_MOZJS=NO
 fi
 
+
+
+
+########### Build from source ##################
+
+# Clean first
 make NETSURF_USE_JS=${BUILD_JS} NETSURF_USE_MOZJS=${BUILD_MOZJS} clean
 
 # Do the Build
 make -k NETSURF_USE_JS=${BUILD_JS} NETSURF_USE_MOZJS=${BUILD_MOZJS} CI_BUILD=${BUILD_NUMBER} ATARIARCH=${ATARIARCH} Q=
 
-############ Package artifact construction and deployment ################
+
+
+
+
+############ Package artifact construction ################
 
 #destination for package artifacts
 DESTDIR=/srv/ci.netsurf-browser.org/html/builds/${TARGET}/
@@ -209,10 +298,14 @@ if [ ! -f "${PKG_SRC}${PKG_SFX}" ]; then
     exit 1
 fi
 
+
+
+############ Package artifact deployment ################
+
 # copy the file into the output - always use scp as it works local or remote
 scp "${PKG_SRC}${PKG_SFX}" netsurf at ci.netsurf-browser.org:${DESTDIR}/NetSurf-${IDENTIFIER}${PKG_SFX}
 
-# remove the package file 
+# remove the package file
 rm -f "${PKG_SRC}${PKG_SFX}"
 
 # setup latest link


-----------------------------------------------------------------------

Summary of changes:
 utils/jenkins-build.sh |  337 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 215 insertions(+), 122 deletions(-)

diff --git a/utils/jenkins-build.sh b/utils/jenkins-build.sh
index feb6605..0fe834c 100755
--- a/utils/jenkins-build.sh
+++ b/utils/jenkins-build.sh
@@ -20,19 +20,17 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-# NetSurf continuius integration build script for jenkins
+# NetSurf continuous integration build script for jenkins
 #
 # This script is executed by jenkins to build netsurf itself
 #
 # Usage: jenkins-build.sh
 #
 
+# TARGET is set to the frontend target to build
+# label is set to the identifier of the toolchain doing the building
 
-# TARGET must be in the environment and set correctly
-if [ "x${TARGET}" = "x" ];then
-    echo "TARGET unset"
-    exit 1
-fi
+################# Parameter and environment setup #####################
 
 #identifier for this specific build
 IDENTIFIER="$CC-${BUILD_JS}-${BUILD_NUMBER}"
@@ -40,135 +38,216 @@ IDENTIFIER="$CC-${BUILD_JS}-${BUILD_NUMBER}"
 # default atari architecture - bletch
 ATARIARCH=68020-60
 
-if [ "${TARGET}" = "riscos" ];then
-
-    ARTIFACT_TARGET=riscos
-    PKG_SRC=netsurf
-    PKG_SFX=.zip
-
-elif [ "${TARGET}" = "windows" ];then
-
-    ARTIFACT_TARGET=windows
-    PKG_SRC=netsurf-installer
-    PKG_SFX=.exe
-
-elif [ "${TARGET}" = "cocoa" ];then
-
-    if [ "${label}" = "i686-apple-darwin10" ]; then
-        ARTIFACT_TARGET=Darwin
-        IDENTIFIER="${label}-${IDENTIFIER}"
-
-    elif [ "${label}" = "powerpc-apple-darwin9" ]; then
-        ARTIFACT_TARGET=powerpc-apple-darwin9
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
-
-    else
-        echo "Bad cocoa label"
-        exit 1
-
-    fi
-
-    PKG_SRC=NetSurf
-    PKG_SFX=.dmg
-
-elif [ "${TARGET}" = "amiga" ];then
-
-    ARTIFACT_TARGET=amiga
-    PKG_SRC=NetSurf_Amiga/netsurf
-    PKG_SFX=.lha
-
-
-elif [ "${TARGET}" = "atari" ];then
-
-    if [ "${label}" = "m68k-atari-mint" ]; then
-        ARTIFACT_TARGET=m68k-atari-mint
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"    
-        PKG_SRC=ns020
-        PKG_SFX=.zip
-
-    elif [ "${label}" = "m5475-atari-mint" ]; then
-        ARTIFACT_TARGET=m5475-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/m5475-atari-mint/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/m5475-atari-mint/cross/bin
-        ATARIARCH=v4e
-        IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
-        PKG_SRC=nsv4e
-        PKG_SFX=.zip
-
-    else
+# Ensure the combination of target and toolchain works and set build
+#   specific parameters too
+case ${TARGET} in
+    "riscos")
+	case ${label} in
+	    "arm-unknown-riscos")
+		ARTIFACT_TARGET=riscos
+		;;
 
-        echo "Bad atari label"
-        exit 1
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    fi    
+	esac
 
-elif [ "${TARGET}" = "gtk" ];then
+	PKG_SRC=netsurf
+	PKG_SFX=.zip
+	;;
 
-    ARTIFACT_TARGET=Linux
-    PKG_SRC=nsgtk
-    PKG_SFX=
 
-elif [ "${TARGET}" = "framebuffer" ];then
+    "windows")
+	case ${label} in
+	    "i686-w64-mingw32")
+		ARTIFACT_TARGET=windows
+		;;
 
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    ARTIFACT_TARGET=Linux
-    PKG_SRC=nsfb
-    PKG_SFX=
+	esac
 
-elif [ "${TARGET}" = "monkey" ];then
+	PKG_SRC=netsurf-installer
+	PKG_SFX=.exe
+	;;
 
-    if [ "${label}" = "linux" ]; then
-        ARTIFACT_TARGET=Linux
 
-    elif [ "${label}" = "i686-apple-darwin10" ]; then
-        ARTIFACT_TARGET=Darwin
+    "cocoa")
+	case ${label} in
+	    "i686-apple-darwin10")
+		ARTIFACT_TARGET=Darwin
+		IDENTIFIER="${label}-${IDENTIFIER}"
+		;;
 
-    elif [ "${label}" = "powerpc-apple-darwin9" ]; then
-        ARTIFACT_TARGET=powerpc-apple-darwin9
+	    "powerpc-apple-darwin9")
+		ARTIFACT_TARGET=powerpc-apple-darwin9
+		IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
+		;;
 
-    elif [ "${label}" = "arm-unknown-riscos" ]; then
-        ARTIFACT_TARGET=riscos
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    elif [ "${label}" = "m68k-atari-mint" ]; then
-        ARTIFACT_TARGET=m68k-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	esac
 
-    elif [ "${label}" = "m5475-atari-mint" ]; then
-        ATARIARCH=v4e
-        ARTIFACT_TARGET=m5475-atari-mint
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+	PKG_SRC=NetSurf
+	PKG_SFX=.dmg
+	;;
 
-    elif [ "${label}" = "i686-w64-mingw32" ]; then
-        ARTIFACT_TARGET=windows
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
 
-    elif [ "${label}" = "ppc-amigaos" ]; then
-	ARTIFACT_TARGET=amiga
-        export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
-        export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+    "amiga")
+	case ${label} in
+	    "ppc-amigaos")
+		ARTIFACT_TARGET=amiga
+		;;
 
-    else
-        echo "Bad monkey label"
-        exit 1
-    fi
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
 
-    IDENTIFIER="${label}-${IDENTIFIER}"
-    PKG_SRC=nsmonkey
-    PKG_SFX=
+	esac
+
+	PKG_SRC=NetSurf_Amiga/netsurf
+	PKG_SFX=.lha
+	;;
+
+
+    "atari")
+	case ${label} in
+	    "m68k-atari-mint")
+		ARTIFACT_TARGET=m68k-atari-mint
+		PKG_SRC=ns020
+		PKG_SFX=.zip
+		;;
+
+	    "m5475-atari-mint")
+		ARTIFACT_TARGET=m5475-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/m5475-atari-mint/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/m5475-atari-mint/cross/bin
+		ATARIARCH=v4e
+		PKG_SRC=nsv4e
+		PKG_SFX=.zip
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	IDENTIFIER="${ARTIFACT_TARGET}-${IDENTIFIER}"
+	;;
+
+
+    "gtk")
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	PKG_SRC=nsgtk
+	PKG_SFX=
+	;;
+
+
+    "framebuffer")
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
+
+	PKG_SRC=nsfb
+	PKG_SFX=
+	;;
+
+
+    "monkey")
+	# monkey target can be built on most of the supported architectures
+	case ${label} in
+	    "linux")
+		ARTIFACT_TARGET=Linux
+		;;
+
+	    "i686-apple-darwin10")
+		ARTIFACT_TARGET=Darwin
+		;;
+
+	    "powerpc-apple-darwin9")
+		ARTIFACT_TARGET=powerpc-apple-darwin9
+		;;
+
+	    "arm-unknown-riscos")
+		ARTIFACT_TARGET=riscos
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "m68k-atari-mint")
+		ARTIFACT_TARGET=m68k-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "m5475-atari-mint")
+		ATARIARCH=v4e
+		ARTIFACT_TARGET=m5475-atari-mint
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "i686-w64-mingw32")
+		ARTIFACT_TARGET=windows
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    "ppc-amigaos")
+		ARTIFACT_TARGET=amiga
+		export GCCSDK_INSTALL_ENV=/opt/netsurf/${label}/env
+		export GCCSDK_INSTALL_CROSSBIN=/opt/netsurf/${label}/cross/bin
+		;;
+
+	    *)
+		echo "Target \"${TARGET}\" cannot be built on \"${label})\""
+		exit 1
+		;;
+
+	esac
 
-else
-    
-    # unkown target
-    exit 1
+	IDENTIFIER="${label}-${IDENTIFIER}"
+	PKG_SRC=nsmonkey
+	PKG_SFX=
+	;;
 
-fi
-
-########### Build from source ##################
+    *)
+	# TARGET must be in the environment and set correctly
+	echo "Unkown TARGET \"${TARGET}\""
+	exit 1
+	;;
+
+esac
 
 # setup environment
 export PREFIX=${JENKINS_HOME}/artifacts-${ARTIFACT_TARGET}
@@ -176,27 +255,37 @@ export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PREFIX}/lib
 export PATH=${PATH}:${PREFIX}/bin
 
-# disable ccache for clang
+# configure ccache for clang
 if [ "${CC}" = "clang" ];then
-export CCACHE_CPP2=yes
-export CC="clang -Qunused-arguments"
+    export CCACHE_CPP2=yes
+    export CC="clang -Qunused-arguments"
 fi
 
 # convert javascript parameters
 if [ "${BUILD_JS}" = "json" ];then
-        BUILD_MOZJS=NO
-        BUILD_JS=YES
+    BUILD_MOZJS=NO
+    BUILD_JS=YES
 else
     BUILD_JS=NO
     BUILD_MOZJS=NO
 fi
 
+
+
+
+########### Build from source ##################
+
+# Clean first
 make NETSURF_USE_JS=${BUILD_JS} NETSURF_USE_MOZJS=${BUILD_MOZJS} clean
 
 # Do the Build
 make -k NETSURF_USE_JS=${BUILD_JS} NETSURF_USE_MOZJS=${BUILD_MOZJS} CI_BUILD=${BUILD_NUMBER} ATARIARCH=${ATARIARCH} Q=
 
-############ Package artifact construction and deployment ################
+
+
+
+
+############ Package artifact construction ################
 
 #destination for package artifacts
 DESTDIR=/srv/ci.netsurf-browser.org/html/builds/${TARGET}/
@@ -209,10 +298,14 @@ if [ ! -f "${PKG_SRC}${PKG_SFX}" ]; then
     exit 1
 fi
 
+
+
+############ Package artifact deployment ################
+
 # copy the file into the output - always use scp as it works local or remote
 scp "${PKG_SRC}${PKG_SFX}" netsurf at ci.netsurf-browser.org:${DESTDIR}/NetSurf-${IDENTIFIER}${PKG_SFX}
 
-# remove the package file 
+# remove the package file
 rm -f "${PKG_SRC}${PKG_SFX}"
 
 # setup latest link


-- 
NetSurf Browser



More information about the netsurf-commits mailing list