Makefile revision 53909
1169689Skan# 2169689Skan# $FreeBSD: head/Makefile 51361 1999-09-18 08:27:55Z jb $ 3169689Skan# 4169689Skan# The user-driven targets are: 5169689Skan# 6169689Skan# buildworld - Rebuild *everything*, including glue to help do 7169689Skan# upgrades. 8169689Skan# installworld - Install everything built by "buildworld". 9169689Skan# world - buildworld + installworld. 10169689Skan# update - Convenient way to update your source tree (cvs). 11169689Skan# upgrade - Upgrade a.out (2.2.x/3.0) system to the new ELF way 12169689Skan# most - Build user commands, no libraries or include files. 13169689Skan# installmost - Install user commands, no libraries or include files. 14169689Skan# aout-to-elf - Upgrade an system from a.out to elf format (see below). 15169689Skan# aout-to-elf-build - Build everything required to upgrade a system from 16169689Skan# a.out to elf format (see below). 17169689Skan# aout-to-elf-install - Install everything built by aout-to-elf-build (see 18169689Skan# below). 19169689Skan# move-aout-libs - Move the a.out libraries into an aout sub-directory 20169689Skan# of each elf library sub-directory. 21169689Skan# 22169689Skan# This makefile is simple by design. The FreeBSD make automatically reads 23169689Skan# the /usr/share/mk/sys.mk unless the -m argument is specified on the 24169689Skan# command line. By keeping this makefile simple, it doesn't matter too 25169689Skan# much how different the installed mk files are from those in the source 26169689Skan# tree. This makefile executes a child make process, forcing it to use 27169689Skan# the mk files from the source tree which are supposed to DTRT. 28169689Skan# 29169689Skan# The user-driven targets (as listed above) are implemented in Makefile.inc0 30169689Skan# and the private targets are in Makefile.inc1. These are kept separate 31169689Skan# to help the bootstrap build from aout to elf format. 32169689Skan# 33169689Skan# For novices wanting to build from current sources, the simple instructions 34169689Skan# are: 35169689Skan# 36169689Skan# 1. Ensure that your /usr/obj directory has at least 260 Mb of free space. 37169689Skan# 2. `cd /usr/src' (or to the directory containing your source tree). 38169689Skan# 3. `make world' 39169689Skan# 40169689Skan# Be warned, this will update your installed system, except for configuration 41169689Skan# files in the /etc directory and for the kernel. You have to do those manually. 42169689Skan# 43169689Skan# If at first you're a little nervous about having a `make world' update 44169689Skan# your system, a `make buildworld' will build everything in the /usr/obj 45169689Skan# tree without touching your installed system. To be of any further use 46169689Skan# though, a `make installworld' is required. 47169689Skan# 48169689Skan# If -DWANT_AOUT is specified, a `make world' with OBJFORMAT=elf will 49169689Skan# update the legacy support for aout. This includes all libraries, ld.so 50169689Skan# and boot objects. This part of build should be regarded as 51169689Skan# deprecated and you should _not_ expect to be able to do this past the 52169689Skan# release of 4.0. You have exactly one major release to move entirely 53169689Skan# to elf. 54169689Skan# 55169689Skan# ---------------------------------------------------------------------------- 56169689Skan# 57169689Skan# Upgrading an i386 system from a.out to elf format 58169689Skan# 59169689Skan# 60169689Skan# The aout->elf transition build is performed by doing a `make upgrade' (or 61169689Skan# `make aout-to-elf') or in two steps by a `make aout-to-elf-build' followed 62169689Skan# by a `make aout-to-elf-install', depending on user preference. 63169689Skan# You need to have at least 320 Mb of free space for the object tree. 64169689Skan# 65169689Skan# The upgrade process checks the installed release. If this is 3.0-CURRENT, 66169689Skan# it is assumed that your kernel contains all the syscalls required by the 67169689Skan# current sources. 68169689Skan# 69169689Skan# The upgrade procedure will stop and ask for confirmation to proceed 70169689Skan# several times. On each occasion, you can type Ctrl-C to abort the 71169689Skan# upgrade. Optionally, you can also start it with NOCONFIRM=yes and skip 72169689Skan# the confirmation steps. 73169689Skan# 74169689Skan# At the end of the upgrade procedure, /etc/objformat is created or 75169689Skan# updated to contain OBJFORMAT=elf. From then on, you're elf by default. 76169689Skan# 77169689Skan# ---------------------------------------------------------------------------- 78169689Skan# 79169689Skan# 80169689Skan# Define the user-driven targets. These are listed here in alphabetical 81169689Skan# order, but that's not important. 82169689Skan# 83169689SkanTGTS = afterdistribute all buildworld checkdpadd clean cleandepend cleandir \ 84169689Skan depend distribute everything hierarchy includes install installmost \ 85169689Skan installworld lint maninstall mk most obj objlink regress rerelease \ 86169689Skan tags update world 87169689Skan 88169689Skan# 89169689Skan# Handle the user-driven targets, using the source relative mk files. 90169689Skan# 91169689Skan${TGTS} : upgrade_checks 92169689Skan @cd ${.CURDIR}; \ 93169689Skan ${MAKE} -f Makefile.inc0 -m ${.CURDIR}/share/mk ${.TARGET} 94169689Skan 95169689Skan# Set a reasonable default 96169689Skan.MAIN: all 97169689Skan 98169689Skan# 99169689Skan# Perform a few tests to determine if the installed tools are adequate 100169689Skan# for building the world. These are for older systems (prior to 2.2.5). 101169689Skan# 102169689Skan# From 2.2.5 onwards, the installed tools will pass these upgrade tests, 103169689Skan# so the normal make world is capable of doing what is required to update 104169689Skan# the system to current. 105169689Skan# 106169689Skanupgrade_checks : 107169689Skan @cd ${.CURDIR}; if `make -m ${.CURDIR}/share/mk test > /dev/null 2>&1`; then ok=1; else ${MAKE} -f Makefile.upgrade make; fi; 108169689Skan 109169689Skan# 110169689Skan# A simple test target used as part of the test to see if make supports 111169689Skan# the -m argument. 112169689Skan# 113169689Skantest : 114169689Skan 115169689Skan# 116169689Skan# Define the upgrade targets. These are listed here in alphabetical 117169689Skan# order, but that's not important. 118169689Skan# 119169689SkanUPGRADE = aout-to-elf aout-to-elf-build aout-to-elf-install \ 120169689Skan move-aout-libs 121169689Skan 122169689Skan# 123169689Skan# Handle the upgrade targets, using the source relative mk files. 124169689Skan# 125169689Skan 126169689Skanupgrade: aout-to-elf 127169689Skan 128169689Skan${UPGRADE} : upgrade_checks 129169689Skan @cd ${.CURDIR}; \ 130169689Skan ${MAKE} -f Makefile.upgrade -m ${.CURDIR}/share/mk ${.TARGET} 131169689Skan