Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 4900685

Browse files
sawanobolyoschaaf
authored andcommitted
Set buildtype from env PSOL_BUILDTYPE. (#1486)
1 parent 11f67d9 commit 4900685

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

config

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
# Environment Variables (Optional):
1616
# MOD_PAGESPEED_DIR: absolute path to the mod_pagespeed/src directory
1717
# PSOL_BINARY: absolute path to pagespeed_automatic.a
18+
# PSOL_BUILDTYPE: Release or Debug
1819

1920
mod_pagespeed_dir="${MOD_PAGESPEED_DIR:-unset}"
2021
position_aux="${POSITION_AUX:-unset}"
22+
psol_buildtype="${PSOL_BUILDTYPE:-unset}"
2123

2224
if [ "$mod_pagespeed_dir" = "unset" ] ; then
2325
mod_pagespeed_dir="$ngx_addon_dir/psol/include"
@@ -75,12 +77,16 @@ else
7577
exit 1
7678
fi
7779

78-
if [ "$NGX_DEBUG" = "YES" ]; then
79-
buildtype=Debug
80-
# If we're using a psol tarball that doesn't contain Debug/ (which is the case
81-
# from 1.12 onward) then this will be overriden to buildtype=Release below.
80+
if [ "$psol_buildtype" = "unset" ] ; then
81+
if [ "$NGX_DEBUG" = "YES" ]; then
82+
buildtype=Debug
83+
# If we're using a psol tarball that doesn't contain Debug/ (which is the case
84+
# from 1.12 onward) then this will be overriden to buildtype=Release below.
85+
else
86+
buildtype=Release
87+
fi
8288
else
83-
buildtype=Release
89+
buildtype=$psol_buildtype
8490
fi
8591

8692
# If the compiler is gcc, we want to use g++ to link, if at all possible,

0 commit comments

Comments
 (0)