From 609391cb3bc31109f37f78f0b0a22efd381888b8 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 11 Jul 2012 23:07:34 +0000 Subject: [PATCH] Unifying the scripts generating pkg-config definition files --- data/libSystem.pc.in | 4 ++-- data/pkgconfig.sh | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/libSystem.pc.in b/data/libSystem.pc.in index d983723..f884f8b 100644 --- a/data/libSystem.pc.in +++ b/data/libSystem.pc.in @@ -1,10 +1,10 @@ -prefix=PREFIX +prefix=@PREFIX@ includedir=${prefix}/include exec_prefix=${prefix} libdir=${exec_prefix}/lib Name: libSystem Description: DeforaOS System essential library -Version: VERSION +Version: @VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -Wl,-rpath-link,${libdir} -Wl,-rpath,${libdir} -lSystem diff --git a/data/pkgconfig.sh b/data/pkgconfig.sh index ca94910..01f2ce7 100755 --- a/data/pkgconfig.sh +++ b/data/pkgconfig.sh @@ -29,6 +29,7 @@ PREFIX="/usr/local" . "../config.sh" DEBUG="_debug" DEVNULL="/dev/null" +#executables INSTALL="install -m 0644" MKDIR="mkdir -m 0755 -p" RM="rm -f" @@ -39,7 +40,7 @@ SED="sed" #debug _debug() { - echo $@ + echo $@ 1>&2 $@ } @@ -99,10 +100,10 @@ while [ $# -gt 0 ]; do fi #create - $SED -e "s,PREFIX,$PREFIX," -e "s,VERSION,$VERSION," "$target.in" \ - > "$target" + $DEBUG $SED -e "s,@PREFIX@,$PREFIX," \ + -e "s,@VERSION@,$VERSION," "$target.in" > "$target" if [ $? -ne 0 ]; then - $RM -- "$target" 2> "$DEVNULL" + $DEBUG $RM -- "$target" exit 2 fi done