summaryrefslogtreecommitdiffstats
path: root/scripts/pkg-config-wrapper
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2006-02-09 13:37:46 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2006-02-09 13:37:46 +0000
commite7ef7ee9b568d3fc06c79d1a2a107c683fd6f5bf (patch)
tree9527dcf2ebecf246cbbab745b4ac57bf731ac3ba /scripts/pkg-config-wrapper
parent9beac7a59cd4700868e15f377a5d60e5db3eccc4 (diff)
downloadptxdist-e7ef7ee9b568d3fc06c79d1a2a107c683fd6f5bf.tar.gz
ptxdist-e7ef7ee9b568d3fc06c79d1a2a107c683fd6f5bf.tar.xz
* pkg-config-wrapper:
sed-cleanups git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.10-trunk@4541 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/pkg-config-wrapper')
-rwxr-xr-xscripts/pkg-config-wrapper18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper
index 6b0361fa4..c01643baa 100755
--- a/scripts/pkg-config-wrapper
+++ b/scripts/pkg-config-wrapper
@@ -2,8 +2,12 @@
PKGCONFIG=/usr/bin/pkg-config
-if [ ! "$SYSROOT" ]; then
- echo "pkg-config-filter: missing \$SYSROOT environment variable"
+if [ \! "$SYSROOT" ]; then
+ echo >&2
+ echo >&2
+ echo "pkg-config: missing \$SYSROOT environment variable" >&2
+ echo >&2
+ echo >&2
exit 2
fi
@@ -16,8 +20,6 @@ export PKG_CONFIG_PATH
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
-[ "$PTXDIST_DEBUG" = "1" ] && echo "$PKGCONFIG $*" >&2
-
#
# 1) protect already given sysroot
# 2) add sysroot symbol to all absolute paths
@@ -29,7 +31,7 @@ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
OUTPUT=`$PKGCONFIG $*` || exit $?
echo -n $OUTPUT |
- sed -e "s~\-L/*$SYSROOT/*~-L=/~g; s~\-I/*$SYSROOT/*~-I=/~g;" | # 1)
- sed -e "s~\-L/~-L=/~g; s~\-I/~-I=/~g;" | # 2)
- sed -e "s~\-L\=~-L$SYSROOT~g; s~\-I\=~-I$SYSROOT~g;" | # 3)
- sed -e "s~[\t ]\-l~ -Wl,-l~g;" # 4)
+ sed -e "s~\-L/*$SYSROOT/*~-L=/~g; s~\-I/*$SYSROOT/*~-I=/~g;" \
+ -e "s~\-L/~-L=/~g; s~\-I/~-I=/~g;" \
+ -e "s~\-L\=~-L$SYSROOT~g; s~\-I\=~-I$SYSROOT~g;" \
+ -e "s~[\t ]\-l~ -Wl,-l~g;"