Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: function install



I nearly wrote:
> Yow!  I have seen the SUBDIRS!

This should fix it, with the change that Completion is now installed as a
subdirectory under ..../functions.  I've even tested it this time.
The first hunk is tangentially related paranoia; the second got missed out
the first time round.

Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.35
diff -u -r1.35 configure.in
--- configure.in	2000/11/30 18:36:21	1.35
+++ configure.in	2000/12/04 19:07:26
@@ -1744,7 +1744,7 @@
                 grep "^name=$name " ${CONFIG_MODULES}.old
 		;;
     *) case "$link" in
-	  *\ *) eval 'link=`'$link'`'
+	  *\ *) eval "link=\`$link\`"
 	       ;;
        esac
        case "${load}" in
Index: Config/defs.mk.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/defs.mk.in,v
retrieving revision 1.3
diff -u -r1.3 defs.mk.in
--- Config/defs.mk.in	2000/11/26 20:01:02	1.3
+++ Config/defs.mk.in	2000/12/04 19:07:26
@@ -74,7 +74,6 @@
 INSTALL_DATA    = @INSTALL_DATA@
 
 # variables used in determining what to install
-FUNCTIONS_INSTALL = @FUNCTIONS_INSTALL@
 FUNCTIONS_SUBDIRS = @FUNCTIONS_SUBDIRS@
 
 # flags passed to recursive makes in subdirectories
Index: Config/installfns.sh
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/installfns.sh,v
retrieving revision 1.3
diff -u -r1.3 installfns.sh
--- Config/installfns.sh	2000/12/04 12:02:31	1.3
+++ Config/installfns.sh	2000/12/04 19:07:26
@@ -14,8 +14,7 @@
 for file in $allfuncs; do
   if test -f $sdir_top/$file; then
     if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
-      subdir="`echo $file | sed -e 's%/[^/]*$%%' \
-		-e s%^Functions/%% -e s%^Completion/%%`"
+      subdir="`echo $file | sed -e 's%/[^/]*$%%' -e 's%^Functions/%%'`"
       instdir="$fndir/$subdir"
     else
       instdir="$fndir"
Index: Config/uninstallfns.sh
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/uninstallfns.sh,v
retrieving revision 1.2
diff -u -r1.2 uninstallfns.sh
--- Config/uninstallfns.sh	2000/11/30 18:36:23	1.2
+++ Config/uninstallfns.sh	2000/12/04 19:07:26
@@ -24,7 +24,7 @@
      for file in $allfuncs; do
        if test -f $sdir_top/$file; then
 	 if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
-	   file=`echo $file | sed -e 's%%^Completion/%' -e 's%%^Functions%'`
+	   file=`echo $file | sed -e 's%%^Functions/%'`
 	   rm -f $fndir/$file;
 	 else
 	   bfile="`echo $file | sed -e 's%^.*/%%'`"
Index: Src/zsh.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.mdd,v
retrieving revision 1.5
diff -u -r1.5 zsh.mdd
--- Src/zsh.mdd	2000/11/30 18:36:23	1.5
+++ Src/zsh.mdd	2000/12/04 19:07:27
@@ -45,10 +45,13 @@
 	  echo '#define FPATH_DIR "'$(fndir)'"' >> zshpaths.h.tmp; \
 	  if test x$(FUNCTIONS_SUBDIRS) != x -a \
 	  x$(FUNCTIONS_SUBDIRS) != xno; then \
-	    fpath_tmp="`for f in $$FUNCTIONS_INSTALL; do \
-	      echo $$f | sed s%/.*%%; \
-	    done | sort | uniq`"; \
-	    fpath_tmp="`echo $$fpath_tmp | sed 's/ /\", \"/g'`"; \
+	    fpath_tmp="`grep ' functions=.' \
+	    $(dir_top)/config.modules | sed -e '/^#/d' -e '/ link=no/d' \
+	    -e 's/^.* functions=//'`"; \
+	    fpath_tmp=`for f in $$fpath_tmp; do \
+	      echo $$f | sed -e 's%^Functions/%%' -e 's%/[^/]*$$%%'; \
+	    done | sort | uniq`; \
+	    fpath_tmp=`echo $$fpath_tmp | sed 's/ /\", \"/g'`; \
 	    echo "#define FPATH_SUBDIRS { \"$$fpath_tmp\" }" \
 	    >>zshpaths.h.tmp; \
 	  fi; \

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



Messages sorted by: Reverse Date, Date, Thread, Author