Set buildtype from env PSOL_BUILDTYPE. (#1486)

This commit is contained in:
Yukihiko SAWANOBORI
2017-10-06 18:13:18 +09:00
committed by Otto van der Schaaf
parent 11f67d9bc7
commit 49006858d1
+11 -5
View File
@@ -15,9 +15,11 @@
# Environment Variables (Optional): # Environment Variables (Optional):
# MOD_PAGESPEED_DIR: absolute path to the mod_pagespeed/src directory # MOD_PAGESPEED_DIR: absolute path to the mod_pagespeed/src directory
# PSOL_BINARY: absolute path to pagespeed_automatic.a # PSOL_BINARY: absolute path to pagespeed_automatic.a
# PSOL_BUILDTYPE: Release or Debug
mod_pagespeed_dir="${MOD_PAGESPEED_DIR:-unset}" mod_pagespeed_dir="${MOD_PAGESPEED_DIR:-unset}"
position_aux="${POSITION_AUX:-unset}" position_aux="${POSITION_AUX:-unset}"
psol_buildtype="${PSOL_BUILDTYPE:-unset}"
if [ "$mod_pagespeed_dir" = "unset" ] ; then if [ "$mod_pagespeed_dir" = "unset" ] ; then
mod_pagespeed_dir="$ngx_addon_dir/psol/include" mod_pagespeed_dir="$ngx_addon_dir/psol/include"
@@ -75,12 +77,16 @@ else
exit 1 exit 1
fi fi
if [ "$NGX_DEBUG" = "YES" ]; then if [ "$psol_buildtype" = "unset" ] ; then
buildtype=Debug if [ "$NGX_DEBUG" = "YES" ]; then
# If we're using a psol tarball that doesn't contain Debug/ (which is the case buildtype=Debug
# from 1.12 onward) then this will be overriden to buildtype=Release below. # If we're using a psol tarball that doesn't contain Debug/ (which is the case
# from 1.12 onward) then this will be overriden to buildtype=Release below.
else
buildtype=Release
fi
else else
buildtype=Release buildtype=$psol_buildtype
fi fi
# If the compiler is gcc, we want to use g++ to link, if at all possible, # If the compiler is gcc, we want to use g++ to link, if at all possible,