about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2013-11-23 17:44:12 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-11-23 17:44:12 +0000
commit9503b161ab893a5d5c6ac6f9fdd9e938aee7045c (patch)
treee4714911e5d88154a27e1878f0aad2af91585b4a
parent8e2d4c2cf77125588549194677a2688a547c1b9e (diff)
downloadzsh-9503b161ab893a5d5c6ac6f9fdd9e938aee7045c.tar.gz
zsh-9503b161ab893a5d5c6ac6f9fdd9e938aee7045c.tar.xz
zsh-9503b161ab893a5d5c6ac6f9fdd9e938aee7045c.zip
32031 plus missed _run_help: get helpfiles install path corect in functions
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Zsh/Command/_run-help2
-rw-r--r--Config/defs.mk.in1
-rwxr-xr-xConfig/installfns.sh22
-rw-r--r--Doc/Makefile.in1
-rw-r--r--Functions/Misc/run-help2
-rw-r--r--Makefile.in2
7 files changed, 31 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index be96b6312..faf75cd88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-23  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 32031 plus missed _run_help: Completion/Zsh/Command/_run-help,
+	Config/defs.mk.in, Config/installfns.sh, Doc/Makefile.in,
+	Functions/Misc/run-help, Makefile.in: turn @runhelpdir@ in
+	installed functions into the actual installation path.
+
 2013-11-20  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 32030: revert 31995 as it caused (N) to fail on an empty
diff --git a/Completion/Zsh/Command/_run-help b/Completion/Zsh/Command/_run-help
index 786ad3785..81adc4d84 100644
--- a/Completion/Zsh/Command/_run-help
+++ b/Completion/Zsh/Command/_run-help
@@ -1,6 +1,6 @@
 #compdef run-help
 local d expl
-local HELPDIR=${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}
+local HELPDIR=${HELPDIR:-@runhelpdir@}
 [[ -d $HELPDIR ]] && {
 	d=($HELPDIR/*(:t))
 	(($#d)) && d+=('.' ':') && _wanted commands expl 'command' compadd -a d
diff --git a/Config/defs.mk.in b/Config/defs.mk.in
index 58ef11066..5c19cc4d5 100644
--- a/Config/defs.mk.in
+++ b/Config/defs.mk.in
@@ -51,6 +51,7 @@ sitefndir       = @sitefndir@
 scriptdir       = @scriptdir@
 sitescriptdir   = @sitescriptdir@
 htmldir         = @htmldir@
+runhelpdir      = @runhelpdir@
 
 # compilation
 CC              = @CC@
diff --git a/Config/installfns.sh b/Config/installfns.sh
index cf587c438..149f359c6 100755
--- a/Config/installfns.sh
+++ b/Config/installfns.sh
@@ -10,6 +10,8 @@ allfuncs="`grep ' functions=.' ${dir_top}/config.modules |
 
 allfuncs="`cd $sdir_top; echo ${allfuncs}`"
 
+test -d installfnsdir || mkdir installfnsdir
+
 # We now have a list of files, but we need to use `test -f' to check
 # (1) the glob got expanded (2) we are not looking at directories.
 for file in $allfuncs; do
@@ -44,8 +46,22 @@ for file in $allfuncs; do
         ;;
       esac
     fi
-    test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir || exit 1
-    $INSTALL_DATA $sdir_top/$file $instdir || exit 1
+    basename=`basename $file`
+    ok=0
+    if test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir; then
+      if sed "s|@runhelpdir@|$runhelpdir|" <$sdir_top/$file \
+        >installfnsdir/$basename; then
+	if $INSTALL_DATA installfnsdir/$basename $instdir; then
+	  ok=1
+	fi
+      fi
+    fi
+    case $ok in
+      0)
+      rm -rf installfnsdir
+      exit 1
+      ;;
+    esac
     read line < $sdir_top/$file
     case "$line" in
       '#!'*)
@@ -54,3 +70,5 @@ for file in $allfuncs; do
     esac
   fi
 done
+
+rm -rf installfnsdir
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index 5893cc832..eae330171 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -33,7 +33,6 @@ dir_top = ..
 VPATH           = @srcdir@
 sdir            = @srcdir@
 sdir_top        = @top_srcdir@
-runhelpdir      = @runhelpdir@
 INSTALL         = @INSTALL@
 LN_S            = @LN_S@
 
diff --git a/Functions/Misc/run-help b/Functions/Misc/run-help
index c817b67d6..e351dd6a6 100644
--- a/Functions/Misc/run-help
+++ b/Functions/Misc/run-help
@@ -10,7 +10,7 @@
 
 emulate -RL zsh
 
-local HELPDIR="${HELPDIR:-/usr/share/zsh/$ZSH_VERSION/help}"
+local HELPDIR="${HELPDIR:-@runhelpdir@}"
 
 [[ $1 == "." ]] && 1="dot"
 [[ $1 == ":" ]] && 1="colon"
diff --git a/Makefile.in b/Makefile.in
index d771033be..cb74e94ef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -88,7 +88,7 @@ install.fns:
 	  test x$(sitefndir) != xno && \
 	    $(SHELL) $(sdir_top)/mkinstalldirs $(DESTDIR)$(sitefndir); \
 	  sdir_top="$(sdir_top)" fndir="$(fndir)" dir_top="$(dir_top)" \
-	  scriptdir="$(scriptdir)" \
+	  scriptdir="$(scriptdir)" runhelpdir="$(runhelpdir)" \
 	  FUNCTIONS_SUBDIRS="$(FUNCTIONS_SUBDIRS)" \
 	  INSTALL_DATA="$(INSTALL_DATA)" \
 	  INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \