More portable generation of pkg-config definition files
This commit is contained in:
parent
79d7189a69
commit
4b46d09576
|
@ -8,4 +8,4 @@ Description: DeforaOS Desktop Mailer plug-ins
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: libDesktop
|
Requires: libDesktop
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
Libs: -Wl,-R${libdir} -L${libdir} -lMailer
|
Libs: -L${libdir} @RPATH@ -lMailer
|
||||||
|
|
|
@ -40,8 +40,8 @@ SED="sed"
|
||||||
#debug
|
#debug
|
||||||
_debug()
|
_debug()
|
||||||
{
|
{
|
||||||
echo $@ 1>&2
|
echo "$@" 1>&2
|
||||||
$@
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,9 +99,18 @@ while [ $# -gt 0 ]; do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#portability
|
||||||
|
RPATH="-Wl,-rpath-link,\${libdir} -Wl,-rpath,\${libdir}"
|
||||||
|
case $(uname -s) in
|
||||||
|
Darwin)
|
||||||
|
RPATH=
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
#create
|
#create
|
||||||
$DEBUG $SED -e "s,@PREFIX@,$PREFIX," \
|
$DEBUG $SED -e "s:@PREFIX@:$PREFIX:" \
|
||||||
-e "s,@VERSION@,$VERSION," "$target.in" > "$target"
|
-e "s:@VERSION@:$VERSION:" \
|
||||||
|
-e "s:@RPATH@:$RPATH:" -- "$target.in" > "$target"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
$DEBUG $RM -- "$target"
|
$DEBUG $RM -- "$target"
|
||||||
exit 2
|
exit 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user