Makefile revision 51361
12061Sjkh# 250479Speter# $FreeBSD: head/Makefile 51361 1999-09-18 08:27:55Z jb $ 32061Sjkh# 438666Sjb# The user-driven targets are: 532427Sjb# 638666Sjb# buildworld - Rebuild *everything*, including glue to help do 738666Sjb# upgrades. 838666Sjb# installworld - Install everything built by "buildworld". 938666Sjb# world - buildworld + installworld. 1038666Sjb# update - Convenient way to update your source tree (cvs). 1144918Sjkh# upgrade - Upgrade a.out (2.2.x/3.0) system to the new ELF way 1238666Sjb# most - Build user commands, no libraries or include files. 1338666Sjb# installmost - Install user commands, no libraries or include files. 1438666Sjb# aout-to-elf - Upgrade an system from a.out to elf format (see below). 1538666Sjb# aout-to-elf-build - Build everything required to upgrade a system from 1638666Sjb# a.out to elf format (see below). 1738666Sjb# aout-to-elf-install - Install everything built by aout-to-elf-build (see 1838666Sjb# below). 1938978Sjb# move-aout-libs - Move the a.out libraries into an aout sub-directory 2038978Sjb# of each elf library sub-directory. 2132427Sjb# 2238666Sjb# This makefile is simple by design. The FreeBSD make automatically reads 2338666Sjb# the /usr/share/mk/sys.mk unless the -m argument is specified on the 2438666Sjb# command line. By keeping this makefile simple, it doesn't matter too 2538666Sjb# much how different the installed mk files are from those in the source 2638666Sjb# tree. This makefile executes a child make process, forcing it to use 2738666Sjb# the mk files from the source tree which are supposed to DTRT. 2817308Speter# 2938666Sjb# The user-driven targets (as listed above) are implemented in Makefile.inc0 3038666Sjb# and the private targets are in Makefile.inc1. These are kept separate 3138666Sjb# to help the bootstrap build from aout to elf format. 3219175Sbde# 3338666Sjb# For novices wanting to build from current sources, the simple instructions 3438666Sjb# are: 3538042Sbde# 3639726Sjb# 1. Ensure that your /usr/obj directory has at least 260 Mb of free space. 3738666Sjb# 2. `cd /usr/src' (or to the directory containing your source tree). 3838666Sjb# 3. `make world' 3938042Sbde# 4038666Sjb# Be warned, this will update your installed system, except for configuration 4149315Shoek# files in the /etc directory and for the kernel. You have to do those manually. 4217308Speter# 4338666Sjb# If at first you're a little nervous about having a `make world' update 4438666Sjb# your system, a `make buildworld' will build everything in the /usr/obj 4538666Sjb# tree without touching your installed system. To be of any further use 4638666Sjb# though, a `make installworld' is required. 4717308Speter# 4845108Sobrien# If -DWANT_AOUT is specified, a `make world' with OBJFORMAT=elf will 4942128Speter# update the legacy support for aout. This includes all libraries, ld.so 5042128Speter# and boot objects. This part of build should be regarded as 5138666Sjb# deprecated and you should _not_ expect to be able to do this past the 5251361Sjb# release of 4.0. You have exactly one major release to move entirely 5338666Sjb# to elf. 5417308Speter# 5538666Sjb# ---------------------------------------------------------------------------- 5617308Speter# 5738666Sjb# Upgrading an i386 system from a.out to elf format 5817308Speter# 5927910Sasami# 6043226Sjkh# The aout->elf transition build is performed by doing a `make upgrade' (or 6143226Sjkh# `make aout-to-elf') or in two steps by a `make aout-to-elf-build' followed 6243226Sjkh# by a `make aout-to-elf-install', depending on user preference. 6338666Sjb# You need to have at least 320 Mb of free space for the object tree. 6427910Sasami# 6538666Sjb# The upgrade process checks the installed release. If this is 3.0-CURRENT, 6638666Sjb# it is assumed that your kernel contains all the syscalls required by the 6738666Sjb# current sources. 6827910Sasami# 6938666Sjb# The upgrade procedure will stop and ask for confirmation to proceed 7038666Sjb# several times. On each occasion, you can type Ctrl-C to abort the 7143226Sjkh# upgrade. Optionally, you can also start it with NOCONFIRM=yes and skip 7243226Sjkh# the confirmation steps. 7327910Sasami# 7438666Sjb# At the end of the upgrade procedure, /etc/objformat is created or 7538666Sjb# updated to contain OBJFORMAT=elf. From then on, you're elf by default. 7627910Sasami# 7738666Sjb# ---------------------------------------------------------------------------- 7827910Sasami# 7917308Speter# 8038666Sjb# Define the user-driven targets. These are listed here in alphabetical 8138666Sjb# order, but that's not important. 8217308Speter# 8340495SbdeTGTS = afterdistribute all buildworld checkdpadd clean cleandepend cleandir \ 8440495Sbde depend distribute everything hierarchy includes install installmost \ 8540495Sbde installworld lint maninstall mk most obj objlink regress rerelease \ 8640495Sbde tags update world 872061Sjkh 8817308Speter# 8938666Sjb# Handle the user-driven targets, using the source relative mk files. 9017308Speter# 9138666Sjb${TGTS} : upgrade_checks 9238666Sjb @cd ${.CURDIR}; \ 9344103Smsmith ${MAKE} -f Makefile.inc0 -m ${.CURDIR}/share/mk ${.TARGET} 942302Spaul 9539206Sjkh# Set a reasonable default 9639206Sjkh.MAIN: all 9739206Sjkh 9817308Speter# 9938666Sjb# Perform a few tests to determine if the installed tools are adequate 10038666Sjb# for building the world. These are for older systems (prior to 2.2.5). 10117308Speter# 10238666Sjb# From 2.2.5 onwards, the installed tools will pass these upgrade tests, 10338666Sjb# so the normal make world is capable of doing what is required to update 10438666Sjb# the system to current. 10517308Speter# 10638666Sjbupgrade_checks : 10744103Smsmith @cd ${.CURDIR}; if `make -m ${.CURDIR}/share/mk test > /dev/null 2>&1`; then ok=1; else ${MAKE} -f Makefile.upgrade make; fi; 1082061Sjkh 10917308Speter# 11038666Sjb# A simple test target used as part of the test to see if make supports 11138666Sjb# the -m argument. 11217308Speter# 11338666Sjbtest : 1143626Swollman 11517308Speter# 11638666Sjb# Define the upgrade targets. These are listed here in alphabetical 11738666Sjb# order, but that's not important. 11817308Speter# 11938978SjbUPGRADE = aout-to-elf aout-to-elf-build aout-to-elf-install \ 12038978Sjb move-aout-libs 1213626Swollman 12217308Speter# 12338666Sjb# Handle the upgrade targets, using the source relative mk files. 12417308Speter# 12543226Sjkh 12643226Sjkhupgrade: aout-to-elf 12743226Sjkh 12838666Sjb${UPGRADE} : upgrade_checks 12938666Sjb @cd ${.CURDIR}; \ 13044103Smsmith ${MAKE} -f Makefile.upgrade -m ${.CURDIR}/share/mk ${.TARGET} 131