3 pushd `dirname $0` > /dev/null
4 export SCRIPTDIR=`pwd -L`
7 export TOPDIR=$(readlink -f "${SCRIPTDIR}/..")
8 if [[ -z "${CHROME_SRC}" ]]; then
9 # If $CHROME_SRC was not set, assume src subfolder in project directory is CHROME_SRC.
10 export CHROME_SRC="${TOPDIR}/src"
13 export CLANG_DIR="${TOPDIR}/src/third_party/llvm-build/Release+Asserts/"
20 echo Applying $patchfile in $directory
21 pushd "$directory" > /dev/null
22 patch -p1 $@ < "$patchfile"
26 function getHostOs() {
27 echo $(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
30 function getHostArch() {
31 echo $(uname -m | sed -e \
32 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
35 function getPythonVersion() {
36 echo $(python --version 2>&1 | sed -e 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/')
39 function setIfUndef() {
42 if [ -n "$original" ]; then
50 function hostBuldScriptUsage() {
54 Build non gbs version of chromium-efl
57 -h, --help Show this message
58 --build-ewk-unittests Build ewk unittests
59 --ccache Configure ccache installed in your system
60 --clang Use chromium's clang compiler to build the sources
61 --content-shell Build content_shell application
62 --debug Build debug version of chromium-efl (out.${host_arch}/Debug instead of out.${host_arch}/Release)
63 -jN Set number of jobs, just like with make or ninja
64 --skip-gyp Skip restore_gyp, jhbuild and gyp_chromium steps
65 --skip-ninja Skip ninja step
69 $0 --skip-gyp --ccache
75 function parseHostBuildScriptParams() {
80 export FORCE_JHBUILD=0
82 export BUILD_EWK_UNITTESTS=0
83 export BUILD_CONTENT_SHELL=0
84 export BUILD_SUBDIRECTORY=Release
89 while [[ $# > 0 ]]; do
92 hostBuldScriptUsage ${0}
100 source $TOPDIR/build/ccache_env.sh ${platform}
106 export BUILD_CONTENT_SHELL=1
109 export FORCE_JHBUILD=1
114 --build-ewk-unittests)
115 export BUILD_EWK_UNITTESTS=1
118 export BUILD_SUBDIRECTORY="Debug"
124 echo "Unknown argument: $1"
132 function hostGypChromiumEfl() {
133 if [[ $SKIP_GYP == 0 ]]; then
134 ${TOPDIR}/build/gyp_chromiumefl.sh $@
138 function hostNinja() {
139 if [[ $SKIP_NINJA == 0 ]]; then
140 TARGETS="chromium-efl efl_webprocess chromium-ewk efl_webview_app ubrowser"
141 if [[ $BUILD_EWK_UNITTESTS == 1 ]]; then
142 TARGETS="$TARGETS ewk_unittests"
144 if [[ $BUILD_CONTENT_SHELL == 1 ]]; then
145 TARGETS="$TARGETS content_shell_efl"
147 BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY}
148 ninja -C $BUILDDIR ${JOBS} ${TARGETS}
152 function error_report() {
153 echo "Error: File:$1 Line:$2"