Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Version-dependent functions install path
- X-seq: zsh-workers 9256
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: Version-dependent functions install path
- Date: Thu, 06 Jan 2000 20:20:54 +0000
- In-reply-to: ""Andrej Borsenkow""'s message of "Thu, 06 Jan 2000 10:04:21 +0300." <000001bf5814$41f88720$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"Andrej Borsenkow" wrote:
> I suggest, that functions are being installed in version-specific directories
> as
> well. Unfortunately (and that applies to the development builds in the first
> place) it is often impossible to mix binaries and functions from different
> versions.
Yes, it's a bit more difficult than it should be. Furthermore, for most
users installing versions as well separated as 3.1.6 and 3.1.7 will be, the
position will be even worse, even if the pace of change of this area of the
code slows down in future. So this adds the version.
I hope the choice of path (default
`/usr/local/share/zsh/functions/3.1.6-dev-14', mutatis mutandis) is
rational. The version-specific bit comes last, as with the module path,
and the `share' remains present, despite the version-dependence, because it
refers to the absence of machine-dependence (it worried me at first, but
actually I've just noticed Emacs does exactly the same with its lisp code).
Indeed, this will make it easier to share functions across architectures
potentially running different versions of the shell.
Index: configure.in
===================================================================
--- configure.in 1999/12/21 15:18:27 1.11
+++ configure.in 2000/01/06 19:58:35
@@ -214,10 +214,10 @@
AC_ARG_ENABLE(fndir,
[ --enable-fndir=DIR where functions go (default DATADIR/zsh/functions)],
[if test $enableval = yes; then
- fndir=${datadir}/${tzsh_name}/functions
+ fndir=${datadir}/${tzsh_name}/functions/${VERSION}
else
fndir="$enableval"
-fi], [fndir=${datadir}/${tzsh_name}/functions])
+fi], [fndir=${datadir}/${tzsh_name}/functions/${VERSION}])
undefine([function_subdirs])
AC_ARG_ENABLE(function-subdirs,
Index: INSTALL
===================================================================
--- INSTALL 1999/12/21 15:18:27 1.2
+++ INSTALL 2000/01/06 19:51:44
@@ -247,12 +247,15 @@
By default, the shell functions which are installed with `make install' or
`make install.fns' go into the directory ${datadir}/zsh/functions, which
unless you have specified --datadir is the same as
-${prefix}/share/zsh/functions ($prefix itself defaults to /usr/local, as
-described below). This directory will also be compiled into the shell as
-the default directory for the variable $fpath/$FPATH. You can override it
-with --enable-fndir=directory; --disable-fndir or --enable-fndir=no will
-turn off both installation of functions and the setting of a default value
-for $fpath/$FPATH.
+${prefix}/share/zsh/functions/$ZSH_VERSION ($prefix itself defaults to
+/usr/local, as described below). This directory will also be compiled into
+the shell as the default directory for the variable $fpath/$FPATH. You can
+override it with --enable-fndir=directory; --disable-fndir or
+--enable-fndir=no will turn off both installation of functions and the
+setting of a default value for $fpath/$FPATH. Note the presence of
+$ZSH_VERSION (e.g. `3.1.7') to avoid clashes between versions of zsh.
+If you only run one version of zsh at once, installing into a common
+directory such as /usr/local/share/zsh/functions is fine.
You can control the functions which get installed by setting
FUNCTIONS_INSTALL, either when running configure (e.g.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author