summaryrefslogtreecommitdiffstats
path: root/Makefile.upgrade
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-09-09 06:02:31 +0000
committerjb <jb@FreeBSD.org>1998-09-09 06:02:31 +0000
commit6771aa16b0a18c9f3c0b1189376b3dc0e8b9b3da (patch)
tree08b78f9e905e1c4c5687ca408cca86babf1463d7 /Makefile.upgrade
parentc88512597a7c1c89a9f8013c808252cb2845b12a (diff)
downloadFreeBSD-src-6771aa16b0a18c9f3c0b1189376b3dc0e8b9b3da.zip
FreeBSD-src-6771aa16b0a18c9f3c0b1189376b3dc0e8b9b3da.tar.gz
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.
Diffstat (limited to 'Makefile.upgrade')
-rw-r--r--Makefile.upgrade55
1 files changed, 54 insertions, 1 deletions
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
OpenPOWER on IntegriCloud