summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-01-21 21:12:37 -0500
committerMichael Orlitzky <mjo@gentoo.org>2016-01-21 21:12:37 -0500
commitf4a2678217a23ce0db353173f74a556039b5b08d (patch)
treefce66759673b3ff518c52ac0fbe2c2a744c538b3
parentClean up and document find_targets(). (diff)
downloadeselect-php-f4a2678217a23ce0db353173f74a556039b5b08d.tar.gz
eselect-php-f4a2678217a23ce0db353173f74a556039b5b08d.tar.bz2
eselect-php-f4a2678217a23ce0db353173f74a556039b5b08d.zip
Use uppercase @BINDIR@, @LIBDIR@, etc. for autotools substitution.
The last few commits introduced a problem: by passing php.eselect.in.in through autoconf, we unwittingly replace things like @bindir@ with ${exec_prefix}. This is because lowercase @bindir@ gets defined for automake and is intended to be based on the other directory variables like @exec_prefix@. Since we're replacing them after the fact in the Makefile, this commit avoids the autoconf mangling by making them all uppercase.
-rw-r--r--Makefile.am6
-rw-r--r--src/70_mod_php.conf.in2
-rw-r--r--src/php.eselect.in.in18
3 files changed, 13 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index 9487f1b..1d1132e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,9 +8,9 @@ nodist_apacheconf_DATA = $(srcdir)/src/70_mod_php.conf
# localstatedir within our script and conf file. The example is taken
# from the autoconf documentation and can be found in the
# "Installation Directory Variables" section.
-edit = sed -e 's|@bindir[@]|$(bindir)|g' \
- -e 's|@libdir[@]|$(libdir)|g' \
- -e 's|@localstatedir[@]|$(localstatedir)|g'
+edit = sed -e 's|@BINDIR[@]|$(bindir)|g' \
+ -e 's|@LIBDIR[@]|$(libdir)|g' \
+ -e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g'
$(nodist_eselect_DATA) $(nodist_apacheconf_DATA): Makefile
rm -f $@ $@.tmp
diff --git a/src/70_mod_php.conf.in b/src/70_mod_php.conf.in
index 4b97354..a9d348d 100644
--- a/src/70_mod_php.conf.in
+++ b/src/70_mod_php.conf.in
@@ -4,7 +4,7 @@
# php5_module to php7_module so we can't blindly load whatever
# is there. Instead we let eselect-php manage a small
# configuration file that loads the appropriate module.
- Include "@localstatedir@/lib/eselect-php/mod_php.conf"
+ Include "@LOCALSTATEDIR@/lib/eselect-php/mod_php.conf"
# Tell apache that mod_php should handle PHP files.
#
diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in
index e1edb42..d3428bd 100644
--- a/src/php.eselect.in.in
+++ b/src/php.eselect.in.in
@@ -88,7 +88,7 @@ sapi_active_link_target_dir() {
local sapi="${1}"
local target="${2}"
- local link_target_dir="@libdir@/${target}/bin"
+ local link_target_dir="@LIBDIR@/${target}/bin"
if [[ "${sapi}" == "apache2" ]] ; then
link_target_dir+="/../apache2"
fi
@@ -116,11 +116,11 @@ sapi_active_link_dir() {
local sapi="${1}"
case "${sapi}" in
- apache2) echo "@libdir@/apache2/modules" ;;
- cli) echo "@bindir@" ;;
- fpm) echo "@bindir@" ;;
- cgi) echo "@bindir@" ;;
- phpdbg) echo "@bindir@" ;;
+ apache2) echo "@LIBDIR@/apache2/modules" ;;
+ cli) echo "@BINDIR@" ;;
+ fpm) echo "@BINDIR@" ;;
+ cgi) echo "@BINDIR@" ;;
+ phpdbg) echo "@BINDIR@" ;;
*) die "invalid SAPI name: ${sapi}" ;;
esac
}
@@ -198,7 +198,7 @@ cleanup_sapi() {
fi
if [[ "${sapi}" == "apache2" ]] ; then
- rm -f "@libdir@"/apache2/modules/libphp[57].so \
+ rm -f "@LIBDIR@"/apache2/modules/libphp[57].so \
|| die "failed to remove old libphp.so symlink"
fi
@@ -258,7 +258,7 @@ find_sapi_targets() {
esac
for target in $(find_targets); do
- local pattern="@libdir@/${target}/${pattern_suffix}"
+ local pattern="@LIBDIR@/${target}/${pattern_suffix}"
for file in $pattern; do
[[ -f "${file}" ]] && echo "${target}"
@@ -313,7 +313,7 @@ get_sapi_active_target() {
#
write_mod_php_conf() {
local target="${1}"
- local conf_dir="@localstatedir@/lib/eselect-php"
+ local conf_dir="@LOCALSTATEDIR@/lib/eselect-php"
local conf_path="${conf_dir}/mod_php.conf"
@MKDIR_P@ "${conf_dir}" || die "failed to create ${conf_dir}"