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

PATCH: $(LIBZSH) installation



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



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