summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-08-21 09:31:15 +0000
committermidipix <writeonce@midipix.org>2019-10-17 11:34:03 +0000
commit02c642668e76cff13fe87a412e65dee7c1e244e1 (patch)
tree38254f8b3fe1b4efef57435580555be5f973c5a8
parentd10954fde996942934ef48cfae6a79eeb20ed675 (diff)
downloadntux-02c642668e76cff13fe87a412e65dee7c1e244e1.tar.bz2
ntux-02c642668e76cff13fe87a412e65dee7c1e244e1.tar.xz
build system: pkgconf.sh: properly handle empty prefix variable.
-rwxr-xr-xsofort/tools/pkgconf.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/sofort/tools/pkgconf.sh b/sofort/tools/pkgconf.sh
index 614fdec..392647a 100755
--- a/sofort/tools/pkgconf.sh
+++ b/sofort/tools/pkgconf.sh
@@ -20,6 +20,10 @@ else
prefix=$(dirname "$PKGCONF_INCLUDEDIR")
base=$(basename "$PKGCONF_INCLUDEDIR")
+ if [ "$prefix" = '/' ]; then
+ prefix=
+ fi
+
if [ "$prefix/$base" = "$PKGCONF_PREFIX/$base" ]; then
pkgconf_includedir='${prefix}/'"${base}"
pkgconf_cflags='-I${includedir}'
@@ -37,6 +41,10 @@ else
prefix=$(dirname "$PKGCONF_LIBDIR")
base=$(basename "$PKGCONF_LIBDIR")
+ if [ "$prefix" = '/' ]; then
+ prefix=
+ fi
+
if [ "$prefix/$base" = "$PKGCONF_EXEC_PREFIX/$base" ]; then
pkgconf_libdir='${exec_prefix}/'"${base}"
else