Unifying the scripts generating pkg-config definition files
This commit is contained in:
parent
d8d5c03014
commit
10904da1ab
|
@ -1,11 +1,11 @@
|
||||||
prefix=PREFIX
|
prefix=@PREFIX@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/lib
|
libdir=${exec_prefix}/lib
|
||||||
|
|
||||||
Name: libApp
|
Name: libApp
|
||||||
Description: DeforaOS System essential library
|
Description: DeforaOS System essential library
|
||||||
Version: VERSION
|
Version: @VERSION@
|
||||||
Requires: libSystem
|
Requires: libSystem
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
Libs: -L${libdir} -Wl,-rpath-link,${libdir} -Wl,-rpath,${libdir} -lApp
|
Libs: -L${libdir} -Wl,-rpath-link,${libdir} -Wl,-rpath,${libdir} -lApp
|
||||||
|
|
|
@ -29,6 +29,7 @@ PREFIX="/usr/local"
|
||||||
. "../config.sh"
|
. "../config.sh"
|
||||||
DEBUG="_debug"
|
DEBUG="_debug"
|
||||||
DEVNULL="/dev/null"
|
DEVNULL="/dev/null"
|
||||||
|
#executables
|
||||||
INSTALL="install -m 0644"
|
INSTALL="install -m 0644"
|
||||||
MKDIR="mkdir -m 0755 -p"
|
MKDIR="mkdir -m 0755 -p"
|
||||||
RM="rm -f"
|
RM="rm -f"
|
||||||
|
@ -39,7 +40,7 @@ SED="sed"
|
||||||
#debug
|
#debug
|
||||||
_debug()
|
_debug()
|
||||||
{
|
{
|
||||||
echo $@
|
echo $@ 1>&2
|
||||||
$@
|
$@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,10 +100,10 @@ while [ $# -gt 0 ]; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#create
|
#create
|
||||||
$SED -e "s,PREFIX,$PREFIX," -e "s,VERSION,$VERSION," "$target.in" \
|
$DEBUG $SED -e "s,@PREFIX@,$PREFIX," \
|
||||||
> "$target"
|
-e "s,@VERSION@,$VERSION," "$target.in" > "$target"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
$RM -- "$target" 2> "$DEVNULL"
|
$DEBUG $RM -- "$target"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user