From f78772bbe490b9eec3f72e17c387f3c297c8fb08 Mon Sep 17 00:00:00 2001 From: netchild Date: Sat, 23 Jul 2005 14:23:30 +0000 Subject: Add delete-old and delete-old-libs targets: - removes obsolete files/dirs or libraries. - works in interactive (default) and batch mode - respects DISTDIR - documented in UPDATING and build(7) The head of the file ObsoleteFiles.inc contains instructions how to add obsolete files/dirs/libs to the list. Obviously one should add obsolete files to this list, when he removes a file/dir/lib from the basesystem. Additionally add check-old target: - allows re@ to check if a file on the obsolete list resurfaces Design goals: - allows full control by the user (default interactive mode) - possibility of scripted removal of obsolete files (batch mode) - opt-in removal of files (explicit list of files) - seperate removal of libs (2 delete targets) Important design decissions: - structured list of files to remove instead of a plain text file: * allows to remove additional files if a NO_foo knob is specified without the need to change the targets (no NO_foo knob is respected yet) - not using mtree like NetBSD does: * mtree doesn't has an interactive mode Discussed on: arch (long ago), current (this year) Additional input from: re (hrs) Approved by: mentor (joerg) --- Makefile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b993afa..c473b69 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,9 @@ # reinstallkernel.debug # kernel - buildkernel + installkernel. # update - Convenient way to update your source tree (cvs). +# check-old - Print a list of old files/directories in the system. +# delete-old - Delete obsolete files and directories interactively. +# delete-old-libs - Delete obsolete libraries interactively. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the @@ -38,15 +41,17 @@ # For individuals wanting to upgrade their sources (even if only a # delta of a few days): # -# 1. `cd /usr/src' (or to the directory containing your source tree). -# 2. `make buildworld' -# 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). -# 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). -# 5. `reboot' (in single user mode: boot -s from the loader prompt). -# 6. `mergemaster -p' -# 7. `make installworld' -# 8. `mergemaster' -# 9. `reboot' +# 1. `cd /usr/src' (or to the directory containing your source tree). +# 2. `make buildworld' +# 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). +# 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). +# 5. `reboot' (in single user mode: boot -s from the loader prompt). +# 6. `mergemaster -p' +# 7. `make installworld' +# 8. `make delete-old' +# 9. `mergemaster' +# 10. `reboot' +# 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) # # See src/UPDATING `COMMON ITEMS' for more complete information. # @@ -62,9 +67,9 @@ # developer convenience only. They are intentionally not documented and # completely subject to change without notice. # -TGTS= all all-man buildenv buildkernel buildworld checkdpadd clean \ - cleandepend cleandir depend distribute distributeworld \ - distrib-dirs distribution everything \ +TGTS= all all-man buildenv buildkernel buildworld check-old checkdpadd \ + clean cleandepend cleandir delete-old delete-old-libs depend \ + distribute distributeworld distrib-dirs distribution everything \ hierarchy install installcheck installkernel installkernel.debug\ reinstallkernel reinstallkernel.debug installworld \ kernel-toolchain libraries lint maninstall \ -- cgit v1.1