From 6771aa16b0a18c9f3c0b1189376b3dc0e8b9b3da Mon Sep 17 00:00:00 2001 From: jb Date: Wed, 9 Sep 1998 06:02:31 +0000 Subject: Add a move-aout-libs target to do just that. It takes the well known library directories: /usr/lib /usr/lib/compat /usr/local/lib and /usr/X11R6/lib and adds any other directories that ldconfig knows about, then removes any that are already aout directories (that is, with aout as a component of the path) and passes this directory list to the move_aout_libs.sh script to do the hack (believe it, it moves libraries that are in use) work. --- Makefile.upgrade | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/Makefile.upgrade b/Makefile.upgrade index c0374d8..8840afc 100644 --- a/Makefile.upgrade +++ b/Makefile.upgrade @@ -1,5 +1,5 @@ # -# $Id: Makefile.upgrade,v 1.3 1998/09/03 21:16:15 jb Exp $ +# $Id: Makefile.upgrade,v 1.4 1998/09/05 08:10:44 jb Exp $ # # This makefile contains rules for preforming upgrades that are outside # the scope of the normal build world process. @@ -41,6 +41,7 @@ make : aout-to-elf aout-to-elf-install : \ ${MAKEOBJDIRPREFIX}/do_aout_buildworld \ ${MAKEOBJDIRPREFIX}/do_elf_buildworld \ + ${MAKEOBJDIRPREFIX}/do_move_aout_libs \ ${MAKEOBJDIRPREFIX}/do_aout_installworld \ ${MAKEOBJDIRPREFIX}/do_aout_kernel \ ${MAKEOBJDIRPREFIX}/do_elf_installworld \ @@ -90,6 +91,58 @@ ${MAKEOBJDIRPREFIX}/do_elf_buildworld : @touch ${MAKEOBJDIRPREFIX}/do_elf_buildworld # +# ldconfig should list the directories that the system is currently using. +# +CUSTOM_LIBDIRS!=ldconfig -r | grep search | sed "s/search directories: //" | sed "s/:/ /g" + +# +# These are the standard library directories that should end up containing +# just elf libraries. +# +LIBDIRS=/usr/lib /usr/lib/compat /usr/local/lib /usr/X11R6/lib + +# +# Go through the list of library directories from ldconfig and add any +# directory that doesn't contain an aout path component to the list of +# library directories to search. +# +.for _lib in ${CUSTOM_LIBDIRS} +_lib1=${_lib:S/\/aout//} +.if ${_lib1} == ${_lib} +.if ${LIBDIRS:R:M${_lib:R}} == "" +LIBDIRS+=${_lib} +.endif +.endif +.endfor + +# +# Go through the list of library directories and prepare a list of +# aout directories. +# +AOUTLIBDIRS= +.for _lib in ${LIBDIRS} +AOUTLIBDIRS+=${_lib}/aout +.endfor + +# +# Move the aout libraries into an aout sub-directory of each elf library +# directory. +# +${MAKEOBJDIRPREFIX}/do_move_aout_libs move-aout-libs : + @echo + @echo "--------------------------------------------------------------" + @echo " You are about to move all the installed a.out libraries into" + @echo " an aout sub-directory of each elf library directory. You can" + @echo " type Ctrl-C to abort now or press return to start the moving" + @echo " the libraries." + @echo "--------------------------------------------------------------" + @echo Directories to search: ${LIBDIRS} + @/bin/sh -c "read -p \"Return to continue or Ctrl-C to abort: \" _e" + @sh ${.CURDIR}/tools/tools/upgrade/move_aout_libs.sh ${LIBDIRS} + @ldconfig ${AOUTLIBDIRS} + @touch ${MAKEOBJDIRPREFIX}/do_move_aout_libs + +# # Before installing the aout world, allow for the possibility that the # world about to be installed has some different syscalls to the installed # kernel which will make shutting the system down problematic. We set aside -- cgit v1.1