Added support for OBJDIR

This commit is contained in:
Pierre Pronchery 2014-10-31 02:45:14 +01:00
parent 4a62ebc9e9
commit b7a553b6a5

View File

@ -150,15 +150,18 @@ while [ $# -gt 0 ]; do
#install
if [ "$install" -eq 1 ]; then
source="${target#$OBJDIR}"
$DEBUG $MKDIR -- "$PREFIX" || exit 2
mode="-m 0644"
[ -x "$target" ] && mode="-m 0755"
$DEBUG $INSTALL $mode "$target" "$PREFIX/$target" \
[ -x "${source}.in" ] && mode="-m 0755"
$DEBUG $INSTALL $mode "$target" "$PREFIX/$source" \
|| exit 2
continue
fi
#create
source="${target#$OBJDIR}"
source="${source}.in"
$DEBUG $SED -e "s,@PACKAGE@,$PACKAGE,g" \
-e "s,@VERSION@,$VERSION,g" \
-e "s,@PREFIX@,$PREFIX,g" \
@ -171,11 +174,11 @@ while [ $# -gt 0 ]; do
-e "s,@MANDIR@,$MANDIR,g" \
-e "s,@SYSCONFDIR@,$SYSCONFDIR,g" \
-e "s,@PWD@,$PWD,g" \
-- "$target.in" > "$target"
-- "$source" > "$target"
if [ $? -ne 0 ]; then
$RM -- "$target" 2> "$DEVNULL"
exit 2
elif [ -x "$target.in" ]; then
elif [ -x "$source" ]; then
$DEBUG $CHMOD 0755 "$target"
fi
done