build: commonize preparations for build
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 16 Sep 2015 04:51:26 +0000 (13:51 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 16 Sep 2015 04:51:26 +0000 (13:51 +0900)
Change-Id: Ic438661885c0634029a23fbc626fc729f06fbdeb
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
package/build.common
package/build.linux
package/build.macos-64
package/build.windows-32

index 85e7007..6525b8a 100644 (file)
@@ -1,6 +1,18 @@
 # build_common
+prepare_common()
+{
+       if [ "$JAVA_HOME" = "" ]
+       then
+               echo "Make sure that you have installed JDK"
+               echo "and then set installed JDK/bin path into JAVA_HOME"
+               echo "as a system environment variable on your PC!!"
+               exit 1
+       fi
+}
+
 build_common()
 {
+       prepare_common
        prepare
 
        cd ${SRCDIR}/tizen
@@ -11,8 +23,8 @@ build_common()
        PKG_CONFIG_PATH=${PKG_CONFIG_PATH} ./emulator_configure.sh x86_64
 
        make clean
-    # needed for building java UI
-    #export SWT_PATH=${ROOTDIR}/swt_4.3
+       # needed for building java UI
+       #export SWT_PATH=${ROOTDIR}/swt_4.3
        PATH=${PATH} make all -j8
        make install
 
index d43568d..9f24389 100755 (executable)
@@ -2,14 +2,6 @@
 # check build environment
 prepare()
 {
-       if [ "$JAVA_HOME" = "" ]
-       then
-               echo "Make sure that you have installed JDK"
-               echo "and then set installed JDK/bin path into JAVA_HOME"
-               echo "as a system environment variable on your PC!!"
-               exit 1
-       fi
-
        if [ "${TARGET_OS}" = "windows-32" ] || [ "${TARGET_OS}" = "windows-64" ]
        then
                # for Windows target (cross compiling)
index b3e72fe..dd94e93 100755 (executable)
@@ -2,33 +2,27 @@
 # check build environment
 prepare()
 {
-    if [ "$JAVA_HOME" = "" ]
-    then
-        echo "Make sure that you have installed JDK"
-        echo "and then set installed JDK/bin path into JAVA_HOME"
-        echo "as a system environment variable on your PC!!"
-        exit 1
-    fi
+       echo "nothing to do"
 }
 
 # clean
 clean()
 {
-    echo "nothing to do"
+       echo "nothing to do"
 }
 
 # build
 build()
 {
-    . $SRCDIR/package/build.common
-    build_common
+       . $SRCDIR/package/build.common
+       build_common
 }
 
 # install
 install()
 {
-    . $SRCDIR/package/build.common
-    install_common
+       . $SRCDIR/package/build.common
+       install_common
 }
 
 [ "$1" = "clean" ] && clean
index f1d742e..2be533b 100755 (executable)
@@ -1,45 +1,37 @@
 #!/bin/sh -xe
-#prepare
+# check build environment
 prepare()
 {
-       if [ "$JAVA_HOME" = "" ]
-       then
-               echo "Make sure that you have installed JDK"
-        echo "and then set installed JDK/bin path into JAVA_HOME"
-        echo "as a system environment variable on your PC!!"
-               exit 1
-       fi
-
        PYTHON_DIR=`env | grep PATH | grep Python`
        if [ "$PYTHON_DIR" = "" ]
        then
                echo "Make sure that you have installed Python 2.x version"
-        echo "and then set installed Python/bin path into PATH system variable on your PC!"
+               echo "and then set installed Python/bin path into PATH system variable on your PC!"
                exit 1
        fi
 
-    ROOTDIR=$MSYS_ROOTDIR
+       ROOTDIR=$MSYS_ROOTDIR
 }
 
 # clean
 clean()
 {
-    echo "nothing to do"
+       echo "nothing to do"
 }
 
 
 # build
 build()
 {
-    . $SRCDIR/package/build.common
-    build_common
+       . $SRCDIR/package/build.common
+       build_common
 }
 
 # install
 install()
 {
-    . $SRCDIR/package/build.common
-    install_common
+       . $SRCDIR/package/build.common
+       install_common
 }
 
 [ "$1" = "clean" ] && clean