mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 17:00:32 +02:00
zsh-workers/9322
This commit is contained in:
parent
9fc3e9a8db
commit
e142bdeb17
9 changed files with 86 additions and 57 deletions
|
|
@ -41,6 +41,7 @@ infodir = @infodir@
|
|||
mandir = @mandir@
|
||||
datadir = @datadir@
|
||||
fndir = @fndir@
|
||||
sitefndir = @sitefndir@
|
||||
htmldir = $(datadir)/$(tzsh)/htmldoc
|
||||
|
||||
# compilation
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ install.fns:
|
|||
FUNCTIONS_INSTALL="$(FUNCTIONS_INSTALL)" \
|
||||
FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
|
||||
INSTALL_DATA="$(INSTALL_DATA)" \
|
||||
DESTDIR="$(DESTDIR)" \
|
||||
DESTDIR="$(DESTDIR)" VERSION="$(VERSION)" \
|
||||
$(SHELL) $(sdir_top)/Config/installfns.sh || exit 1; \
|
||||
fi; \
|
||||
exit 0
|
||||
|
|
@ -43,7 +43,7 @@ uninstall.fns:
|
|||
fndir="$(fndir)" sdir="$(sdir)" \
|
||||
FUNCTIONS_INSTALL="$(FUNCTIONS_INSTALL)" \
|
||||
FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
|
||||
DESTDIR="$(DESTDIR)" \
|
||||
DESTDIR="$(DESTDIR)" VERSION="$(VERSION)" \
|
||||
$(SHELL) $(sdir_top)/Config/uninstallfns.sh || exit 1; \
|
||||
fi; \
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
fndir=$DESTDIR$fndir
|
||||
|
||||
if test -d $fndir.old; then
|
||||
add_old=1
|
||||
fi
|
||||
|
||||
$sdir_top/mkinstalldirs $fndir || exit 1;
|
||||
|
||||
# If the source directory is somewhere else, we need to force
|
||||
|
|
@ -24,27 +20,14 @@ for file in $install; do
|
|||
if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
|
||||
subfile="$file"
|
||||
subdir="`echo $file | sed -e 's%/[^/]*$%%'`"
|
||||
olddir="$fndir.old/$subdir"
|
||||
instdir="$fndir/$subdir"
|
||||
else
|
||||
subfile="`echo $file | sed -e 's%^.*/%%'`"
|
||||
olddir="$fndir.old"
|
||||
instdir="$fndir"
|
||||
fi
|
||||
if test -f $fndir/$subfile; then
|
||||
if cmp $fndir/$subfile $sdir/$file >/dev/null; then :; else
|
||||
$sdir_top/mkinstalldirs $olddir
|
||||
mv $fndir/$subfile $olddir
|
||||
: ${add_old:=1}
|
||||
fi
|
||||
fi
|
||||
$sdir_top/mkinstalldirs $instdir || exit 1
|
||||
$INSTALL_DATA $sdir/$file $instdir || exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if test x$add_old != x1; then
|
||||
rm -rf $fndir.old
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -14,20 +14,26 @@ done
|
|||
fndir=$DESTDIR$fndir
|
||||
|
||||
for file in $install; do
|
||||
if test -f $sdir/$file; then
|
||||
if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
|
||||
rm -f $fndir/$file;
|
||||
if test -f $fndir.old/$file; then
|
||||
mv $fndir.old/$file $fndir/$file
|
||||
fi
|
||||
else
|
||||
bfile="`echo $file | sed -e 's%^.*/%%'`"
|
||||
rm -f "$fndir/$bfile"; \
|
||||
if test -f $fndir.old/$bfile; then
|
||||
mv $fndir.old/$bfile $fndir/$bfile
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
case $fndir in
|
||||
*$VERSION*)
|
||||
# Version specific function directory, safe to remove completely.
|
||||
# However, we don't remove the top-level version directory since
|
||||
# it could have other things than functions in it. We could
|
||||
# do that instead in the top-level Makefile on a full uninstall,
|
||||
# if we wanted.
|
||||
rm -rf $fndir
|
||||
;;
|
||||
*)
|
||||
if test -f $sdir/$file; then
|
||||
if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
|
||||
rm -f $fndir/$file;
|
||||
else
|
||||
bfile="`echo $file | sed -e 's%^.*/%%'`"
|
||||
rm -f "$fndir/$bfile"; \
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue