zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: $(LIBZSH) installation
@ 1998-01-16 10:16 Andrew Main
  1998-01-16 11:21 ` Andrej Borsenkow
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Main @ 1998-01-16 10:16 UTC (permalink / raw)
  To: zsh-workers

-----BEGIN PGP SIGNED MESSAGE-----

This is based on Andrej's patch in article 3706.  If you have applied
that patch, unapply it before applying this.

The linking with $(LIBZSH) is the way Andrej suggested, but also
using an extra -R option to tell the dynamic linker where $(LIBZSH)
will be installed.  (Are there any platforms that use libzsh but don't
support -R?)

The filename used for the library is changed to libzsh-$(VERSION).so,
from libzsh.so.$(VERSION).  This avoids the fiddling with library version
numbers, and is more logical (libzsh.so.* were not interchangeable the
way shared libraries named that way usually are).  I also considered
just using the name libzsh.so, putting it in the modules directory, but
with -R being used this would carry a risk of modules being accidentally
loaded in place of real libraries.

libzsh is installed and uninstalled with (un)install.bin.  There is no
need to separate it from installation of the actual binary, as each
is useless without the other.  (Modules and man pages are optional
components, and so justify a separate installation option.)  libzsh is
also added to the make clean rule.

 -zefram
 
 *** configure.in	1998/01/09 21:09:21	1.45
 --- configure.in	1998/01/15 23:41:47
 ***************
 *** 961,967 ****
     RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
     zsh_SYS_DYNAMIC_EXECSYMS
     if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
 !     L=L LIBS="$LIBS -L. -lzsh"
     fi
     zsh_SYS_DYNAMIC_STRIP_EXE
     zsh_SYS_DYNAMIC_STRIP_LIB
 --- 961,967 ----
     RTLD_GLOBAL_OK=$zsh_cv_sys_dynamic_rtld_global
     zsh_SYS_DYNAMIC_EXECSYMS
     if test "$zsh_cv_sys_dynamic_execsyms" != yes; then
 !     L=L
     fi
     zsh_SYS_DYNAMIC_STRIP_EXE
     zsh_SYS_DYNAMIC_STRIP_LIB
 *** Src/Makefile.in	1998/01/11 15:57:40	1.49
 --- Src/Makefile.in	1998/01/15 23:59:38
 ***************
 *** 102,118 ****
   NSTMP = stamp-modobjs
   NLIST = `cat stamp-modobjs`
   
 ! LIBZSH = libzsh.so.$(VERSION)
   NIBZSH =
   
   zsh: $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS)
   	rm -f $@
 ! 	$(LINK) $(MAIN_OBJS) $(@L@LIST) $(LIBS)
   
   $(LIBZSH): $(LIBOBJS) $(NSTMP)
   	rm -f $@
   	$(DLLINK) $(LIBOBJS) $(NLIST)
 - 	ln -sf $(LIBZSH) libzsh.so
   
   stamp-modobjs: modobjs
   	@if cmp -s stamp-modobjs.tmp stamp-modobjs; then \
 --- 102,120 ----
   NSTMP = stamp-modobjs
   NLIST = `cat stamp-modobjs`
   
 ! LIBZSH = libzsh-$(VERSION).so
   NIBZSH =
   
 + LFLAGS = -R$(libdir)/zsh
 + NFLAGS =
 + 
   zsh: $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS)
   	rm -f $@
 ! 	$(LINK) $(@L@FLAGS) $(MAIN_OBJS) $(@L@LIST) $(@L@IBZSH) $(LIBS)
   
   $(LIBZSH): $(LIBOBJS) $(NSTMP)
   	rm -f $@
   	$(DLLINK) $(LIBOBJS) $(NLIST)
   
   stamp-modobjs: modobjs
   	@if cmp -s stamp-modobjs.tmp stamp-modobjs; then \
 ***************
 *** 185,202 ****
   uninstall.bin: uninstall.bin-here
   
   # install binary, creating install directory if necessary
 ! install.bin-here: zsh
   	$(sdir_top)/mkinstalldirs $(bindir)
   	-if [ -f $(bindir)/zsh ]; then mv $(bindir)/zsh $(bindir)/zsh.old; fi
   	$(INSTALL_PROGRAM) zsh $(bindir)/zsh
   	-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
   	ln $(bindir)/zsh $(bindir)/zsh-$(VERSION)
   
   # uninstall binary
 ! uninstall.bin-here:
   	-if [ -f $(bindir)/zsh ]; then rm -f $(bindir)/zsh; fi
   	-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
   
   # ========== DEPENDENCIES FOR CLEANUP ==========
   
   mostlyclean: mostlyclean-recursive mostlyclean-here
 --- 187,213 ----
   uninstall.bin: uninstall.bin-here
   
   # install binary, creating install directory if necessary
 ! install.bin-here: zsh install.bin-@L@
   	$(sdir_top)/mkinstalldirs $(bindir)
   	-if [ -f $(bindir)/zsh ]; then mv $(bindir)/zsh $(bindir)/zsh.old; fi
   	$(INSTALL_PROGRAM) zsh $(bindir)/zsh
   	-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
   	ln $(bindir)/zsh $(bindir)/zsh-$(VERSION)
   
 + install.bin-N:
 + install.bin-L:
 + 	$(sdir_top)/mkinstalldirs $(libdir)/zsh
 + 	$(INSTALL_PROGRAM) $(LIBZSH) $(libdir)/zsh/$(LIBZSH)
 + 
   # uninstall binary
 ! uninstall.bin-here: uninstall.bin-@L@
   	-if [ -f $(bindir)/zsh ]; then rm -f $(bindir)/zsh; fi
   	-if [ -f $(bindir)/zsh-$(VERSION) ]; then rm -f $(bindir)/zsh-$(VERSION); fi
   
 + uninstall.bin-N:
 + uninstall.bin-L:
 + 	rm -f $(libdir)/zsh/$(LIBZSH)
 + 
   # ========== DEPENDENCIES FOR CLEANUP ==========
   
   mostlyclean: mostlyclean-recursive mostlyclean-here
 ***************
 *** 210,215 ****
 --- 221,227 ----
   
   clean-here: mostlyclean-here
   	rm -f modules.index.* modules.stamp zsh ansi2knr.o ansi2knr
 + 	rm -f libzsh-*.so
   
   distclean-here: clean-here
   	rm -f modules.index modules-bltin Makefile

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii

iQEVAwUBNL6mvZmk9GeOHh7BAQFEXggAoILv3kllAjeVJoPArWHQmNilTH3OOjWG
E5GaAIFPFapuHSoWm1niV7a7aGEzG6JQfbo/U9ujl4f4GeZ9pAHvMrF0Rlqx20Nb
6Gt71tX1lxED98v5so7DdHG9UZcqB5Nb2Zdk0Hq4i3N4VllLmGKjrpdzxGIBWzAs
RW4QFGvux5msoSV8QWB0Squvr7CBREJ8m8QSyYh23RD6WebZHqRq07hgAlX+MXCn
NHxGHBXgE95+3cyLwUpF2YOnujLCjjsPQ1jGx70A0G894nVDmp6llFGKcM4NCNy/
k2bFb92CW4quSDDJFiSbQS9zPOtqVBYx3HInIA1uAvaADNMaZEnVZg==
=BXI2
-----END PGP SIGNATURE-----


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

* Re: PATCH: $(LIBZSH) installation
  1998-01-16 10:16 PATCH: $(LIBZSH) installation Andrew Main
@ 1998-01-16 11:21 ` Andrej Borsenkow
  1998-01-16 11:32   ` Andrew Main
  0 siblings, 1 reply; 3+ messages in thread
From: Andrej Borsenkow @ 1998-01-16 11:21 UTC (permalink / raw)
  To: Andrew Main; +Cc: zsh-workers

On Fri, 16 Jan 1998, Andrew Main wrote:

> 
> The linking with $(LIBZSH) is the way Andrej suggested, but also
> using an extra -R option to tell the dynamic linker where $(LIBZSH)
> will be installed.  (Are there any platforms that use libzsh but don't
> support -R?)
> 

Yep. SVR4 (at least this particular flavor I have). Actually, if you just
link against $(LIBZSH) $(LIBS), zsh will look for *this partucular name*
(be it libzsh-$VERSION).so or for that matter libzsh.so.$(VERSION)), so
you can just drop it in the standard place (it won't conflict with old
version anyway).

Standard way to fo it on SVR4 is to set LD_RUN_PATH:

LD_RUN_PATH=$(libdir)/zsh $(LD) ...

cf. Perl :-) 


> The filename used for the library is changed to libzsh-$(VERSION).so,
> from libzsh.so.$(VERSION).

See above. It looks, like it actually doesn't matter (*.so needed only for
-l flag).

> 
> libzsh is installed and uninstalled with (un)install.bin.  There is no
> need to separate it from installation of the actual binary, as each
> is useless without the other.

Hmmm ... When building a new (test) version I won't like to overrided my
(login and so far favorite) shell. I would really prefer to install mods
and lib (to avoid fiddling with LD_LIBRARY_PATH/module_path) and just
start new shell from build dir.

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------



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

* Re: PATCH: $(LIBZSH) installation
  1998-01-16 11:21 ` Andrej Borsenkow
@ 1998-01-16 11:32   ` Andrew Main
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Main @ 1998-01-16 11:32 UTC (permalink / raw)
  To: borsenkow.msk; +Cc: zefram, zsh-workers

Andrej Borsenkow wrote:
>                                                    Actually, if you just
>link against $(LIBZSH) $(LIBS), zsh will look for *this partucular name*
>(be it libzsh-$VERSION).so or for that matter libzsh.so.$(VERSION)), so
>you can just drop it in the standard place (it won't conflict with old
>version anyway).

Define `standard place'.  We already have a zsh-specific lib directory;
it would be nice to keep all zsh's files together, and we can't assume
that any particular directory to which we can write will be searched by
default for libraries.

>Standard way to fo it on SVR4 is to set LD_RUN_PATH:
>
>LD_RUN_PATH=$(libdir)/zsh $(LD) ...

OK, better use that instead of -R.  Are there any platforms that need
libzsh but don't accept LD_RUN_PATH?  Or should I just assume that there
are, and write another configure test?

>Hmmm ... When building a new (test) version I won't like to overrided my
>(login and so far favorite) shell. I would really prefer to install mods
>and lib (to avoid fiddling with LD_LIBRARY_PATH/module_path) and just
>start new shell from build dir.

Hmmm ... I don't see a problem with temporarily setting
LD_LIBRARY_PATH=$PWD for testing purposes.  Still, as there does seem
to be some use in installing the library without the binary, I suppose
we should have a separate target for it.  I'd still like install.bin to
install the library, so that "make install.bin" will install a *usable*
binary on all systems.

-zefram


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

end of thread, other threads:[~1998-01-16 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-16 10:16 PATCH: $(LIBZSH) installation Andrew Main
1998-01-16 11:21 ` Andrej Borsenkow
1998-01-16 11:32   ` Andrew Main

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).