zsh-workers
 help / color / mirror / code / Atom feed
* zshall.1
@ 2005-10-24  8:01 Zvi Har'El
  2005-10-24  9:03 ` zshall.1 Peter Stephenson
  0 siblings, 1 reply; 11+ messages in thread
From: Zvi Har'El @ 2005-10-24  8:01 UTC (permalink / raw)
  To: Zsh hackers list

Dear Zsh Hackers,

The configure option --program-suffix and her sisters are quite useful, since
they enable me to maintain an up-to-the-minute developement version on a live
system, under the name (say) zsh-dev, and it is easy to switch to it using
exec - zsh-dev, etc. (as long as you set export SHELL=$ZSH_NAME in your
.zprofile). Also commands like man zsh-dev and man zsh-devoptions etc. work
nicely. However, there is a problem with man zsh-devall: since zshall.1
contains the lines

.so man1/zshmisc.1
.so man1/zshexpn.1
.so man1/zshparam.1
.so man1/zshoptions.1
.so man1/zshbuiltins.1
.so man1/zshzle.1
.so man1/zshcompwid.1
.so man1/zshcompsys.1
.so man1/zshcompctl.1
.so man1/zshmodules.1
.so man1/zshtcpsys.1
.so man1/zshzftpsys.1
.so man1/zshcontrib.1

which are not modified during make in the Doc directory, the fact all manual
pages get renamed in the make install.man by replacing zsh with $(tzsh) makes
zsh-devall.1 source the wrong manual pages. What's missing is editing zshall.1
before installing it.

Best,

Zvi.
-- 
Dr. Zvi Har'El      mailto:rl@math.technion.ac.il    Department of Mathematics
tel:+972-54-4227607 icq:179294841    Technion - Israel Institute of Technology
fax:+972-4-8293388  http://www.math.technion.ac.il/~rl/    Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                              Monday, 21 Tishri 5766, 24 October 2005,  9:46AM


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24  8:01 zshall.1 Zvi Har'El
@ 2005-10-24  9:03 ` Peter Stephenson
  2005-10-24 11:52   ` zshall.1 Zvi Har'El
  2005-10-24 14:58   ` zshall.1 Bart Schaefer
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Stephenson @ 2005-10-24  9:03 UTC (permalink / raw)
  To: Zsh hackers list

"Zvi Har'El" wrote:
> Dear Zsh Hackers,
> 
> The configure option --program-suffix and her sisters are quite useful, since
> they enable me to maintain an up-to-the-minute developement version on a live
> system, under the name (say) zsh-dev, and it is easy to switch to it using
> exec - zsh-dev, etc. (as long as you set export SHELL=$ZSH_NAME in your
> .zprofile). Also commands like man zsh-dev and man zsh-devoptions etc. work
> nicely. However, there is a problem with man zsh-devall: since zshall.1
> contains the lines
> 
> .so man1/zshmisc.1
>...

I'm not sure what use people put the --program-suffix option to; it's
possibly they expect to be able to rename the files to the base programme
and have everything work, in which case zshall.1 would need to be the
way it is.  But if it's usually used the way you do, then certainly
the naming in zshall is wrong.

pws


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24  9:03 ` zshall.1 Peter Stephenson
@ 2005-10-24 11:52   ` Zvi Har'El
  2005-10-24 12:00     ` zshall.1 Peter Stephenson
  2005-10-24 14:58   ` zshall.1 Bart Schaefer
  1 sibling, 1 reply; 11+ messages in thread
From: Zvi Har'El @ 2005-10-24 11:52 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

I don't know better how people use it, but the usage has to be consistent.
If you install your zsh as zsh-dev, and man zsh-dev, man zsh-devoptions etc
all give you the new manual page, man zsh-devall should do the same!

On 10/24/05, Peter Stephenson <pws@csr.com> wrote:
>
> "Zvi Har'El" wrote:
> > Dear Zsh Hackers,
> >
> > The configure option --program-suffix and her sisters are quite useful,
> since
> > they enable me to maintain an up-to-the-minute developement version on a
> live
> > system, under the name (say) zsh-dev, and it is easy to switch to it
> using
> > exec - zsh-dev, etc. (as long as you set export SHELL=$ZSH_NAME in your
> > .zprofile). Also commands like man zsh-dev and man zsh-devoptions etc.
> work
> > nicely. However, there is a problem with man zsh-devall: since zshall.1
> > contains the lines
> >
> > .so man1/zshmisc.1
> >...
>
> I'm not sure what use people put the --program-suffix option to; it's
> possibly they expect to be able to rename the files to the base programme
> and have everything work, in which case zshall.1 would need to be the
> way it is. But if it's usually used the way you do, then certainly
> the naming in zshall is wrong.
>
> pws
>
>
> This message has been scanned for viruses by BlackSpider MailControl -
> www.blackspider.com <http://www.blackspider.com>
>



--
Dr. Zvi Har'El mailto:rl@math.technion.ac.il Department of Mathematics
tel:+972-54-4227607 icq:179294841 Technion - Israel Institute of Technology
fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper
(1942)

[-- Attachment #2: Type: text/html, Size: 2242 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 11:52   ` zshall.1 Zvi Har'El
@ 2005-10-24 12:00     ` Peter Stephenson
  2005-10-24 12:33       ` zshall.1 DervishD
  2005-10-24 13:30       ` zshall.1 Clint Adams
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Stephenson @ 2005-10-24 12:00 UTC (permalink / raw)
  To: zsh-workers

"Zvi Har'El" <rl@math.technion.ac.il> wrote:
> I don't know better how people use it, but the usage has to be consistent.
> If you install your zsh as zsh-dev, and man zsh-dev, man zsh-devoptions etc
> all give you the new manual page, man zsh-devall should do the same!

That wasn't quite the point...

At least one of those prefix/suffix things was introduced so you could
install zsh in one place (where it would never be used), package it up
there, then have the package install it in the normal place.  In other
words, it would never be run in the place where it was actually installed,
it always got moved first.

I suspect the feature you're using is slightly different, and you actually
are expected to run the shell from where it's installed.  However, I've
never had anything to do with the feature, so I can't be sure.  If anyone
knows about it, they could help by saying.  Otherwise I'm inclined to
assume you're right and massage zshall.1

pws


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 12:00     ` zshall.1 Peter Stephenson
@ 2005-10-24 12:33       ` DervishD
  2005-10-24 13:01         ` zshall.1 Peter Stephenson
  2005-10-24 13:34         ` zshall.1 Peter Stephenson
  2005-10-24 13:30       ` zshall.1 Clint Adams
  1 sibling, 2 replies; 11+ messages in thread
From: DervishD @ 2005-10-24 12:33 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

    Hi Peter and Zvi :)

 * Peter Stephenson <pws@csr.com> dixit:
> "Zvi Har'El" <rl@math.technion.ac.il> wrote:
> > I don't know better how people use it, but the usage has to be consistent.
> > If you install your zsh as zsh-dev, and man zsh-dev, man zsh-devoptions etc
> > all give you the new manual page, man zsh-devall should do the same!
> 
> That wasn't quite the point...
> 
> At least one of those prefix/suffix things was introduced so you
> could install zsh in one place (where it would never be used),
> package it up there, then have the package install it in the normal
> place.  In other words, it would never be run in the place where it
> was actually installed, it always got moved first.

    In autoconf, the program-prefix, program-suffix and
program-transform-name were introduced to modify the names of the
binaries, and in fact if this facility is used to install the
software into a temporary place to package it afterwards, then it
will not probably work (if you transformed DATADIR, for example).

    If you want to install the software in a place suitable to make a
distribution package, then you should use the "DESTDIR" variable, at
least this is the common practice with autoconf-based software.

    The real problem is that autoconf doesn't force the developer to
change the names even when program-whatever options are used. So
there is really NO WAY of telling if those options are intended to
modify installation names or to do packaging: the developer can use
it for both things (that's one of the million reasons why I wrote
MOBS for my projects).

    If the options were called 'transform-names', 'add-prefix' and
'add-suffix', the intention would be much clearer, but with the
current name I wouldn't make a bet. Right now using those options is
very dangerous because, depending on the developer, they can apply
ONLY to binaries, they can apply only in the name level and not in
the code level (I mean, you install "myprogram" with a transformed
name of "myprogname-suffixed" and you don't know if it will look for
data in $datadir/myprogname or $datadir/myprogname-suffixed), or
probably you can only modify the $prefix so you can install it in any
directory to package it. There is no way of knowing.

    What I would suggest here is to document the behaviour or simply
don't honoring any transformation and issue a warning if any is
provided. If zsh installation names can be modified, they have to be
consistently and allow documentation names to be modified
accordingly. Another, better solution, is to get rid of the autoconf
nightmare, but unfortunately there aren't many replacements out there
(and not, MOBS is not *exactly* an autotools replacement). The less
intrusive change may be to change ALL installation names (including
the hardcoded paths, if any, that zsh uses) when a transformation is
requested, and document this behaviour. Otherwise don't allow
transformations, if this will lead to less surprises to an advanced
end user (advanced in the sense of autoconf, not zsh).

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 12:33       ` zshall.1 DervishD
@ 2005-10-24 13:01         ` Peter Stephenson
  2005-10-24 13:34         ` zshall.1 Peter Stephenson
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Stephenson @ 2005-10-24 13:01 UTC (permalink / raw)
  To: zsh-workers

DervishD wrote:
>     The real problem is that autoconf doesn't force the developer to
> change the names even when program-whatever options are used. So
> there is really NO WAY of telling if those options are intended to
> modify installation names or to do packaging: the developer can use
> it for both things (that's one of the million reasons why I wrote
> MOBS for my projects).

Well, we get to decide in our case... I think something like the following
ought to work, though I haven't tried this in situ (I did debug the
sed command)... sorry if this gets wrapped badly:

Index: Doc/Makefile.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Makefile.in,v
retrieving revision 1.30
diff -u -r1.30 Makefile.in
--- Doc/Makefile.in	21 Oct 2005 09:51:55 -0000	1.30
+++ Doc/Makefile.in	24 Oct 2005 12:57:24 -0000
@@ -153,7 +153,7 @@
 	esac; \
 	case '$(YODL)' in :*) touch $$target ;; *) \
 	    echo $(YODL) -o $$target -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo; \
-	    $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' > $$target \
+	    $(YODL) -I$(sdir) -DZSHALL -w zman.yo version.yo zsh.yo | sed -e '1s/\\-/-/g' -e '/^\.'\''/d' -e 's|^\.so man1/zsh|.so man1/$(tzsh)|' > $$target \
 	;; esac; \
 
 ../META-FAQ: META-FAQ.yo Zsh/metafaq.yo

pws


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 12:00     ` zshall.1 Peter Stephenson
  2005-10-24 12:33       ` zshall.1 DervishD
@ 2005-10-24 13:30       ` Clint Adams
  1 sibling, 0 replies; 11+ messages in thread
From: Clint Adams @ 2005-10-24 13:30 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

> I suspect the feature you're using is slightly different, and you actually
> are expected to run the shell from where it's installed.  However, I've
> never had anything to do with the feature, so I can't be sure.  If anyone
> knows about it, they could help by saying.  Otherwise I'm inclined to
> assume you're right and massage zshall.1

Yes.  The DESTDIR stuff was added to handle an install to elsewhere for
packaging, and the transform/prefix/suffix stuff was for different
"flavors" coexisting.  I've just been munging zshall afterward.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 12:33       ` zshall.1 DervishD
  2005-10-24 13:01         ` zshall.1 Peter Stephenson
@ 2005-10-24 13:34         ` Peter Stephenson
  2005-10-24 13:55           ` zshall.1 DervishD
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2005-10-24 13:34 UTC (permalink / raw)
  To: zsh-workers

This explains how the name transformation is used in zsh.

Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.19
diff -u -r1.19 INSTALL
--- INSTALL	3 Oct 2005 09:00:44 -0000	1.19
+++ INSTALL	24 Oct 2005 13:17:34 -0000
@@ -450,6 +450,19 @@
   --srcdir=DIR          # find the sources in DIR [configure dir or ..]
   --datadir=DATADIR     # install shared files in DATADIR [PREFIX/share]
 
+Program name transformation:
+  --program-prefix=PREFIX           # prepend PREFIX to installed name
+  --program-suffix=SUFFIX           # append SUFFIX to installed name
+  --program-transform-name=SEDSCR   # run sed script SEDSCR on installed name
+
+Note that zsh interprets this standard feature of configure to mean that the
+program will be run from the installed location.  For example, with
+the argument --program-suffix=-dev is given, the file zsh-dev will be
+installed and all references to it will be adjusted accordingly.  If
+the program is to be created in some temporary directory for installation
+elsewhere, set DESTDIR to the top-level directory of the temporary
+hierarchy.
+
 Features:
   --enable-FEATURE      # enable use of this feature
   --disable-FEATURE     # disable use of this feature


-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 13:34         ` zshall.1 Peter Stephenson
@ 2005-10-24 13:55           ` DervishD
  0 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2005-10-24 13:55 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

    Hi Peter :)

 * Peter Stephenson <pws@csr.com> dixit:
> This explains how the name transformation is used in zsh.
[...]
> +Note that zsh interprets this standard feature of configure to mean that the
> +program will be run from the installed location.  For example, with
> +the argument --program-suffix=-dev is given, the file zsh-dev will be
> +installed and all references to it will be adjusted accordingly.  If
> +the program is to be created in some temporary directory for installation
> +elsewhere, set DESTDIR to the top-level directory of the temporary
> +hierarchy.
[...]

    Short, descriptive and avoids surprises. Looks cool :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24  9:03 ` zshall.1 Peter Stephenson
  2005-10-24 11:52   ` zshall.1 Zvi Har'El
@ 2005-10-24 14:58   ` Bart Schaefer
  2005-10-24 16:05     ` zshall.1 DervishD
  1 sibling, 1 reply; 11+ messages in thread
From: Bart Schaefer @ 2005-10-24 14:58 UTC (permalink / raw)
  To: Zsh hackers list

On Oct 24, 10:03am, Peter Stephenson wrote:
} Subject: Re: zshall.1
}
} I'm not sure what use people put the --program-suffix option to; it's
} possibly they expect to be able to rename the files to the base programme

No.

The normal use of --program-suffix would be e.g. --program-suffix=.exe
so that e.g. "cc -o zsh main.o init.o ..." becomes "cc -o zsh.exe ..."
when using a unix-oriented build system on a Cygwin-type platform where
the underlying OS requires a file extension to create an executable.

It's not supposed to affect anything but the binaries, and for Zvi to
expect it to rename things inside the manual pages -- or for zsh's build
to already be doing so in some cases -- is unusual.

We can co-opt it in the way that 21924 and 21926 have (because zsh has
already got a different mechanism for appending .exe) but I'm sure that,
somewhere, Richard Stallman is frowning.

(Of course, he was probably frowning anyway.)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: zshall.1
  2005-10-24 14:58   ` zshall.1 Bart Schaefer
@ 2005-10-24 16:05     ` DervishD
  0 siblings, 0 replies; 11+ messages in thread
From: DervishD @ 2005-10-24 16:05 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh hackers list

    Hi Bart :)

 * Bart Schaefer <schaefer@brasslantern.com> dixit:
> On Oct 24, 10:03am, Peter Stephenson wrote:
> } I'm not sure what use people put the --program-suffix option to; it's
> } possibly they expect to be able to rename the files to the base programme
> 
> No.
> 
> The normal use of --program-suffix would be e.g. --program-suffix=.exe
> so that e.g. "cc -o zsh main.o init.o ..." becomes "cc -o zsh.exe ..."
> when using a unix-oriented build system on a Cygwin-type platform where
> the underlying OS requires a file extension to create an executable.

    Probably, but the developer can affect other files, too, and in
addition to this, there is the "transform-name", which probably got
introduced in order to avoid "forbidden" file names when installing
on dummy OSes, but people use it to add things like "-dev" to names.

    I know, if you want to install multiple versions of any package
you have to use different prefixes, but people uses the "--program"
options for that frequently.
 
> It's not supposed to affect anything but the binaries, and for Zvi
> to expect it to rename things inside the manual pages -- or for
> zsh's build to already be doing so in some cases -- is unusual.

    But autoconf allows you to ignore anything especified by the user
in the command line, change it or misuse it, and the documentation
doesn't make clear, IMHO, that the "--program" options should affect
only binaries. The name is not enough to assume that, in fact you
*have* to use "--program-transform-name" in any file your project
installs if the name is going to cause problems in dumb OSes.

    Of course, all that crap is not zsh's fault, but zsh is going to
suffer from it and I don't think is a bad idea to affect all
installed files and hardcoded paths with the "--program" options.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-10-24 16:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-24  8:01 zshall.1 Zvi Har'El
2005-10-24  9:03 ` zshall.1 Peter Stephenson
2005-10-24 11:52   ` zshall.1 Zvi Har'El
2005-10-24 12:00     ` zshall.1 Peter Stephenson
2005-10-24 12:33       ` zshall.1 DervishD
2005-10-24 13:01         ` zshall.1 Peter Stephenson
2005-10-24 13:34         ` zshall.1 Peter Stephenson
2005-10-24 13:55           ` zshall.1 DervishD
2005-10-24 13:30       ` zshall.1 Clint Adams
2005-10-24 14:58   ` zshall.1 Bart Schaefer
2005-10-24 16:05     ` zshall.1 DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).