Permalink
Browse files

32031 plus missed _run_help: get helpfiles install path corect in fun…

…ctions
  • Loading branch information...
1 parent 8e2d4c2 commit 9503b161ab893a5d5c6ac6f9fdd9e938aee7045c Peter Stephenson committed Nov 23, 2013
Showing with 31 additions and 6 deletions.
  1. +7 −0 ChangeLog
  2. +1 −1 Completion/Zsh/Command/_run-help
  3. +1 −0 Config/defs.mk.in
  4. +20 −2 Config/installfns.sh
  5. +0 −1 Doc/Makefile.in
  6. +1 −1 Functions/Misc/run-help
  7. +1 −1 Makefile.in
View
@@ -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
@@ -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
View
@@ -51,6 +51,7 @@ sitefndir = @sitefndir@
scriptdir = @scriptdir@
sitescriptdir = @sitescriptdir@
htmldir = @htmldir@
+runhelpdir = @runhelpdir@
# compilation
CC = @CC@
View
@@ -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
View
@@ -33,7 +33,6 @@ dir_top = ..
VPATH = @srcdir@
sdir = @srcdir@
sdir_top = @top_srcdir@
-runhelpdir = @runhelpdir@
INSTALL = @INSTALL@
LN_S = @LN_S@
View
@@ -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"
View
@@ -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)" \

0 comments on commit 9503b16

Please sign in to comment.