#!/bin/bash
SCRIPTDIR=$( cd $(dirname $0) ; pwd -P )
-TOPDIR=$( cd ${SCRIPTDIR}/.. ; pwd -P )
source ${SCRIPTDIR}/common.sh
trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
host_arch=$(getHostArch)
-if [ -z "$GYP_GENERATOR_OUTPUT" ]; then
- export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}"
-fi
-
parseHostBuildScriptParams desktop $@
-JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp"
+JHBUILD_STAMPFILE=""
+if [ -z "$GN_GENERATOR_OUTPUT" ]; then
+ export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}"
+fi
+JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp"
-shouldForceJHBuild() {
+forceJHBuildIfNeeded() {
if [[ $FORCE_JHBUILD == 1 ]]; then
- return 1
+ rm -f $JHBUILD_STAMPFILE
+ return
fi
# Check if anything in jhbuild is more recent than stamp file.
- return $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l)
+ if [ $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) != "0" ]; then
+ rm -f $JHBUILD_STAMPFILE
+ fi
}
-if [[ $(shouldForceJHBuild) > 0 ]]; then
- rm -f $JHBUILD_STAMPFILE
-fi
+forceJHBuildIfNeeded
-JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root"
+JHBUILD_DEPS=""
+JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root"
if [ "${host_arch}" == "x64" ]; then
_LIBDIR=lib64
elif [ "${host_arch}" == "ia32" ]; then
fi
fi
-export __GYP_CHROMIUMEFL_TARGET=desktop
+export __GN_CHROMIUMEFL_TARGET=desktop
+
+export C_INCLUDE_PATH="${SCRIPTDIR}/desktop/tizen_include:$C_INCLUDE_PATH"
+export CPLUS_INCLUDE_PATH="${SCRIPTDIR}/desktop/tizen_include:$CPLUS_INCLUDE_PATH"
-hostGypChromiumEfl
+hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\""
export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH"
export PATH="${JHBUILD_DEPS}/bin:$PATH"