diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-14 19:14:40 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-14 19:14:40 +0000 |
commit | e142bdeb17005fdb974b0352c743f9da68dbb8aa (patch) | |
tree | 6ff0657f3ec5540579bbce67fcbe950e7782f106 /Config | |
parent | 9fc3e9a8dbfd2bbce2fd825a104414994539cd4d (diff) | |
download | zsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.tar.gz zsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.tar.xz zsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.zip |
zsh-workers/9322
Diffstat (limited to 'Config')
-rw-r--r-- | Config/defs.mk.in | 1 | ||||
-rw-r--r-- | Config/funcinst.mk | 4 | ||||
-rwxr-xr-x | Config/installfns.sh | 17 | ||||
-rwxr-xr-x | Config/uninstallfns.sh | 34 |
4 files changed, 23 insertions, 33 deletions
diff --git a/Config/defs.mk.in b/Config/defs.mk.in index 14f79d581..f19a40b21 100644 --- a/Config/defs.mk.in +++ b/Config/defs.mk.in @@ -41,6 +41,7 @@ infodir = @infodir@ mandir = @mandir@ datadir = @datadir@ fndir = @fndir@ +sitefndir = @sitefndir@ htmldir = $(datadir)/$(tzsh)/htmldoc # compilation diff --git a/Config/funcinst.mk b/Config/funcinst.mk index 82f0c16a5..4642de6a5 100644 --- a/Config/funcinst.mk +++ b/Config/funcinst.mk @@ -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 diff --git a/Config/installfns.sh b/Config/installfns.sh index 21147dea4..ec738e2d7 100755 --- a/Config/installfns.sh +++ b/Config/installfns.sh @@ -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 diff --git a/Config/uninstallfns.sh b/Config/uninstallfns.sh index 97a35c0f7..1f7e0c54b 100755 --- a/Config/uninstallfns.sh +++ b/Config/uninstallfns.sh @@ -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 |