1998-08-31 01:08:08 +00:00
|
|
|
#
|
1999-08-28 01:35:59 +00:00
|
|
|
# $FreeBSD$
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
|
|
|
# Make command line options:
|
2004-12-21 12:21:26 +00:00
|
|
|
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
|
|
|
|
# -DNO_CLEAN do not clean at all
|
2004-12-21 12:13:23 +00:00
|
|
|
# -DNO_SHARE do not go into share subdir
|
2000-06-15 10:00:20 +00:00
|
|
|
# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
|
2001-01-22 23:29:13 +00:00
|
|
|
# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
|
2000-06-15 10:00:20 +00:00
|
|
|
# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
|
2000-08-07 14:35:49 +00:00
|
|
|
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
|
|
|
|
# -DNO_DOCUPDATE do not update doc in ${MAKE} update
|
1998-08-31 01:08:08 +00:00
|
|
|
# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
|
2006-09-07 16:41:30 +00:00
|
|
|
# TARGET="machine" to crossbuild world for a different machine type
|
1998-08-31 01:08:08 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# The intended user-driven targets are:
|
|
|
|
# buildworld - rebuild *everything*, including glue to help do upgrades
|
|
|
|
# installworld- install everything built by "buildworld"
|
2006-05-26 18:10:06 +00:00
|
|
|
# doxygen - build API documentation of the kernel
|
2004-12-17 10:11:33 +00:00
|
|
|
# update - convenient way to update your source tree (eg: cvsup/cvs)
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
|
|
|
# Standard targets (not defined here) are documented in the makefiles in
|
|
|
|
# /usr/share/mk. These include:
|
|
|
|
# obj depend all install clean cleandepend cleanobj
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
1998-08-31 01:08:08 +00:00
|
|
|
# We must do share/info early so that installation of info `dir'
|
|
|
|
# entries works correctly. Do it first since it is less likely to
|
|
|
|
# grow dependencies on include and lib than vice versa.
|
2004-02-13 21:52:08 +00:00
|
|
|
#
|
2006-11-13 05:52:11 +00:00
|
|
|
# We must do lib/ and libexec/ before bin/, because if installworld
|
2003-12-09 00:42:44 +00:00
|
|
|
# installs a new /bin/sh, the 'make' command will *immediately*
|
|
|
|
# use that new version. And the new (dynamically-linked) /bin/sh
|
|
|
|
# will expect to find appropriate libraries in /lib and /libexec.
|
2004-02-13 21:52:08 +00:00
|
|
|
#
|
2006-11-13 05:52:11 +00:00
|
|
|
SUBDIR= share/info lib libexec
|
|
|
|
SUBDIR+=bin
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_GAMES} != "no"
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=games
|
2001-12-06 07:44:47 +00:00
|
|
|
.endif
|
2006-11-13 05:52:11 +00:00
|
|
|
SUBDIR+=gnu include
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=kerberos5
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_RESCUE} != "no"
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=rescue
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=sbin
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_CRYPT} != "no"
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=secure
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
2004-12-21 12:13:23 +00:00
|
|
|
.if !defined(NO_SHARE)
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=share
|
2002-04-30 11:46:49 +00:00
|
|
|
.endif
|
2006-11-13 05:52:11 +00:00
|
|
|
SUBDIR+=sys usr.bin usr.sbin
|
|
|
|
#
|
|
|
|
# We must do etc/ last for install/distribute to work.
|
|
|
|
#
|
|
|
|
SUBDIR+=etc
|
2002-04-30 11:46:49 +00:00
|
|
|
|
1998-08-31 01:08:08 +00:00
|
|
|
# These are last, since it is nice to at least get the base system
|
|
|
|
# rebuilt before you do them.
|
|
|
|
.for _DIR in ${LOCAL_DIRS}
|
2004-02-13 21:52:08 +00:00
|
|
|
.if exists(${.CURDIR}/${_DIR}/Makefile)
|
1998-08-31 01:08:08 +00:00
|
|
|
SUBDIR+= ${_DIR}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
.if defined(SUBDIR_OVERRIDE)
|
|
|
|
SUBDIR= ${SUBDIR_OVERRIDE}
|
|
|
|
.endif
|
|
|
|
|
2005-02-28 09:23:38 +00:00
|
|
|
.if defined(NOCLEAN)
|
|
|
|
NO_CLEAN= ${NOCLEAN}
|
|
|
|
.endif
|
2004-12-21 12:21:26 +00:00
|
|
|
.if defined(NO_CLEANDIR)
|
1998-08-31 01:08:08 +00:00
|
|
|
CLEANDIR= clean cleandepend
|
|
|
|
.else
|
|
|
|
CLEANDIR= cleandir
|
|
|
|
.endif
|
|
|
|
|
2001-11-19 17:43:29 +00:00
|
|
|
CVS?= cvs
|
2004-11-12 13:22:22 +00:00
|
|
|
CVSFLAGS?= -A -P -d -I!
|
2006-03-19 15:36:56 +00:00
|
|
|
SUP?= /usr/bin/csup
|
|
|
|
SUPFLAGS?= -g -L 2
|
2000-08-13 12:36:40 +00:00
|
|
|
.if defined(SUPHOST)
|
|
|
|
SUPFLAGS+= -h ${SUPHOST}
|
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
|
1999-12-10 10:48:20 +00:00
|
|
|
MAKEOBJDIRPREFIX?= /usr/obj
|
2003-05-04 04:14:10 +00:00
|
|
|
.if !defined(OSRELDATE)
|
2003-08-25 17:48:25 +00:00
|
|
|
.if exists(/usr/include/osreldate.h)
|
2003-05-15 17:59:32 +00:00
|
|
|
OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
|
|
|
|
/usr/include/osreldate.h
|
2003-08-25 17:48:25 +00:00
|
|
|
.else
|
2003-08-27 04:49:43 +00:00
|
|
|
OSRELDATE= 0
|
2003-08-25 17:48:25 +00:00
|
|
|
.endif
|
2003-05-04 04:14:10 +00:00
|
|
|
.endif
|
2006-09-07 16:41:30 +00:00
|
|
|
|
|
|
|
# Guess machine architecture from machine type, and vice versa.
|
|
|
|
.if !defined(TARGET_ARCH) && defined(TARGET)
|
2006-10-16 22:18:13 +00:00
|
|
|
TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/}
|
2006-09-07 16:41:30 +00:00
|
|
|
.elif !defined(TARGET) && defined(TARGET_ARCH) && \
|
|
|
|
${TARGET_ARCH} != ${MACHINE_ARCH}
|
|
|
|
TARGET= ${TARGET_ARCH}
|
2006-09-07 07:37:16 +00:00
|
|
|
.endif
|
2006-09-07 16:41:30 +00:00
|
|
|
# Otherwise, default to current machine type and architecture.
|
2001-10-25 07:28:55 +00:00
|
|
|
TARGET?= ${MACHINE}
|
2006-09-07 16:41:30 +00:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
|
|
|
|
2006-10-09 04:58:45 +00:00
|
|
|
KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 powerpc sparc64 sparc64/sun4v
|
2006-09-07 16:41:30 +00:00
|
|
|
.if ${TARGET} == ${TARGET_ARCH}
|
|
|
|
_t= ${TARGET}
|
|
|
|
.else
|
|
|
|
_t= ${TARGET_ARCH}/${TARGET}
|
|
|
|
.endif
|
|
|
|
.for _t in ${_t}
|
|
|
|
.if empty(KNOWN_ARCHES:M${_t})
|
|
|
|
.error Unknown target ${TARGET_ARCH}:${TARGET}.
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if ${TARGET} == ${MACHINE}
|
2002-08-02 18:04:22 +00:00
|
|
|
TARGET_CPUTYPE?=${CPUTYPE}
|
2002-04-11 13:43:50 +00:00
|
|
|
.else
|
2002-07-31 03:56:03 +00:00
|
|
|
TARGET_CPUTYPE?=
|
2002-04-11 13:43:50 +00:00
|
|
|
.endif
|
2006-09-07 16:41:30 +00:00
|
|
|
|
2002-08-08 15:43:23 +00:00
|
|
|
.if !empty(TARGET_CPUTYPE)
|
|
|
|
_TARGET_CPUTYPE=${TARGET_CPUTYPE}
|
|
|
|
.else
|
|
|
|
_TARGET_CPUTYPE=dummy
|
|
|
|
.endif
|
Further fix the case mentioned in rev. 1.302. The
intent was (and still is) that if a user has say
CPUTYPE=i686 set in /etc/make.conf, we don't print
the assignment type warning unless TARGET_CPUTYPE
is overridden.
Unfortunately, the implementation was buggy, and
only recent changes to bsd.cpu.mk that swapped
canonical and alias values of some CPU types made
the bug apparent.
Here's what happens here.
- CPUTYPE=i686 is set in /etc/make.conf,
- bsd.cpu.mk reset it to "pentiumpro",
- Makefile.inc1 compares this canonical value
with the result of the following test,
make -f /dev/null CPUTYPE=pentiumpro -V CPUTYPE
and expects the result to be "pentiumpro" too,
but "i686" is returned, here's why. We have two
CPUTYPE variables, global, set to "i686" in
/etc/make.conf, and command-line (of a higher
precedence), set to "pentiumpro".
The following part of bsd.cpu.mk,
. elif ${CPUTYPE} == "i686"
CPUTYPE = pentiumpro
which is responsible for converting aliases to
canonical values, sees the value of the CPUTYPE
command-line variable first, "pentiumpro", and
no conversion is done -- the net effect is that
CPUTYPE global stays with its old value "i686",
and "make -V CPUTYPE" (which prints variables
in the global context) returns "i686".
The fix was to pass the CPUTYPE in the test above
as an environment variable instead of as a command
line variable, i.e.,
CPUTYPE=pentiumpro make -f /dev/null -V CPUTYPE
This time, CPUTYPE global is still set to "i686"
initially (by /etc/make.conf), and an envieronment
variable CPUTYPE (of a lower precedence) is set
to "pentiumpro". The .elif sees it's set to
"i686" and resets it to "pentiumpro", and so
"make -V" returns "pentiumpro".
NB: these various types of make(1) variables can
be very painful, especially when combined with
"make -V".
2004-12-22 22:00:01 +00:00
|
|
|
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
|
|
|
|
-f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
|
2002-08-08 15:43:23 +00:00
|
|
|
.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
|
2002-08-02 18:04:22 +00:00
|
|
|
.error CPUTYPE global should be set with ?=.
|
|
|
|
.endif
|
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
2001-09-29 13:17:54 +00:00
|
|
|
.if make(buildworld)
|
2005-12-03 05:11:07 +00:00
|
|
|
BUILD_ARCH!= uname -p
|
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
2001-09-29 13:17:54 +00:00
|
|
|
.if ${MACHINE_ARCH} != ${BUILD_ARCH}
|
|
|
|
.error To cross-build, set TARGET_ARCH.
|
|
|
|
.endif
|
|
|
|
.endif
|
2005-03-02 16:40:51 +00:00
|
|
|
.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
|
1999-12-11 17:05:36 +00:00
|
|
|
OBJTREE= ${MAKEOBJDIRPREFIX}
|
|
|
|
.else
|
2002-04-11 13:43:50 +00:00
|
|
|
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
|
1999-12-11 17:05:36 +00:00
|
|
|
.endif
|
2005-03-02 16:40:51 +00:00
|
|
|
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
|
1999-12-23 19:18:28 +00:00
|
|
|
# /usr/games added for fortune which depend on strfile
|
2003-04-13 11:42:55 +00:00
|
|
|
BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
|
|
|
|
XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
|
|
|
|
STRICTTMPPATH= ${BPATH}:${XPATH}
|
1998-10-17 11:56:20 +00:00
|
|
|
TMPPATH= ${STRICTTMPPATH}:${PATH}
|
1998-08-31 01:08:08 +00:00
|
|
|
|
2001-12-23 22:49:06 +00:00
|
|
|
INSTALLTMP!= /usr/bin/mktemp -d -u -t install
|
2000-07-19 04:41:59 +00:00
|
|
|
|
1999-12-20 10:32:11 +00:00
|
|
|
#
|
|
|
|
# Building a world goes through the following stages
|
|
|
|
#
|
2003-04-06 21:46:44 +00:00
|
|
|
# 1. legacy stage [BMAKE]
|
2003-04-06 21:23:02 +00:00
|
|
|
# This stage is responsible for creating compatibility
|
|
|
|
# shims that are needed by the bootstrap-tools,
|
|
|
|
# build-tools and cross-tools stages.
|
|
|
|
# 1. bootstrap-tools stage [BMAKE]
|
1999-12-20 10:32:11 +00:00
|
|
|
# This stage is responsible for creating programs that
|
|
|
|
# are needed for backward compatibility reasons. They
|
|
|
|
# are not built as cross-tools.
|
2003-04-06 21:23:02 +00:00
|
|
|
# 2. build-tools stage [TMAKE]
|
1999-12-20 10:32:11 +00:00
|
|
|
# This stage is responsible for creating the object
|
|
|
|
# tree and building any tools that are needed during
|
|
|
|
# the build process.
|
2003-04-06 21:23:02 +00:00
|
|
|
# 3. cross-tools stage [XMAKE]
|
1999-12-20 10:32:11 +00:00
|
|
|
# This stage is responsible for creating any tools that
|
|
|
|
# are needed for cross-builds. A cross-compiler is one
|
|
|
|
# of them.
|
2000-10-13 01:19:36 +00:00
|
|
|
# 4. world stage [WMAKE]
|
1999-12-20 10:32:11 +00:00
|
|
|
# This stage actually builds the world.
|
2000-10-13 01:19:36 +00:00
|
|
|
# 5. install stage (optional) [IMAKE]
|
1999-12-20 10:32:11 +00:00
|
|
|
# This stage installs a previously built world.
|
|
|
|
#
|
|
|
|
|
2003-04-13 15:43:29 +00:00
|
|
|
BOOTSTRAPPING?= 0
|
|
|
|
|
1999-12-20 10:32:11 +00:00
|
|
|
# Common environment for world related stages
|
|
|
|
CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
2001-09-29 13:17:54 +00:00
|
|
|
MACHINE_ARCH=${TARGET_ARCH} \
|
2001-10-25 07:28:55 +00:00
|
|
|
MACHINE=${TARGET} \
|
2002-08-02 18:04:22 +00:00
|
|
|
CPUTYPE=${TARGET_CPUTYPE} \
|
2003-04-13 11:42:55 +00:00
|
|
|
GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
|
|
|
|
GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
|
|
|
|
GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
|
1999-12-09 16:40:27 +00:00
|
|
|
|
2003-04-06 21:23:02 +00:00
|
|
|
# bootstrap-tools stage
|
2004-08-25 22:06:29 +00:00
|
|
|
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
2003-04-13 11:42:55 +00:00
|
|
|
PATH=${BPATH}:${PATH} \
|
2003-04-12 15:07:46 +00:00
|
|
|
WORLDTMP=${WORLDTMP} \
|
|
|
|
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
|
2003-04-05 20:30:30 +00:00
|
|
|
BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
|
|
|
|
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
|
2004-08-25 22:06:29 +00:00
|
|
|
DESTDIR= \
|
2002-11-13 13:49:29 +00:00
|
|
|
BOOTSTRAPPING=${OSRELDATE} \
|
2006-03-17 18:54:44 +00:00
|
|
|
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
|
2006-03-18 21:37:05 +00:00
|
|
|
-DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
|
2006-03-17 18:54:44 +00:00
|
|
|
-DNO_CPU_CFLAGS -DNO_WARNS
|
1999-12-20 10:32:11 +00:00
|
|
|
|
2003-04-06 21:23:02 +00:00
|
|
|
# build-tools stage
|
2003-04-05 20:30:30 +00:00
|
|
|
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
|
|
|
|
${BMAKEENV} ${MAKE} -f Makefile.inc1 \
|
2006-09-08 10:09:02 +00:00
|
|
|
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
2004-08-25 22:06:29 +00:00
|
|
|
DESTDIR= \
|
2004-12-21 09:33:47 +00:00
|
|
|
BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS
|
1999-12-20 10:32:11 +00:00
|
|
|
|
2003-04-06 21:23:02 +00:00
|
|
|
# cross-tools stage
|
2006-03-17 18:54:44 +00:00
|
|
|
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
|
2006-09-07 20:27:56 +00:00
|
|
|
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
2006-03-17 18:54:44 +00:00
|
|
|
-DWITHOUT_FORTRAN -DWITHOUT_GDB
|
1999-12-20 10:32:11 +00:00
|
|
|
|
|
|
|
# world stage
|
|
|
|
WMAKEENV= ${CROSSENV} \
|
2003-09-07 14:15:40 +00:00
|
|
|
_SHLIBDIRPREFIX=${WORLDTMP} \
|
2000-01-11 16:23:51 +00:00
|
|
|
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
1999-12-10 10:48:20 +00:00
|
|
|
PATH=${TMPPATH}
|
2004-08-25 22:06:29 +00:00
|
|
|
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
|
1999-12-08 13:45:11 +00:00
|
|
|
|
2005-03-27 19:35:09 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
2004-11-06 03:14:26 +00:00
|
|
|
# 32 bit world
|
|
|
|
LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
|
|
|
|
|
2005-12-07 22:55:29 +00:00
|
|
|
.if empty(TARGET_CPUTYPE)
|
2005-12-07 17:41:10 +00:00
|
|
|
LIB32CPUTYPE= k8
|
|
|
|
.else
|
2005-12-07 22:55:29 +00:00
|
|
|
LIB32CPUTYPE= ${TARGET_CPUTYPE}
|
2005-12-07 17:41:10 +00:00
|
|
|
.endif
|
2005-12-07 17:42:27 +00:00
|
|
|
LIB32PREFLAGS= -m32 -march=${LIB32CPUTYPE} -mfancy-math-387 -DCOMPAT_32BIT
|
2004-11-06 03:14:26 +00:00
|
|
|
LIB32POSTFLAGS= -I${LIB32TMP}/usr/include \
|
|
|
|
-L${LIB32TMP}/usr/lib32 \
|
|
|
|
-B${LIB32TMP}/usr/lib32
|
|
|
|
LIB32CC= ${LIB32PREFLAGS} \
|
|
|
|
${LIB32POSTFLAGS}
|
|
|
|
LIB32CXX= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/c++/3.4 \
|
|
|
|
${LIB32POSTFLAGS}
|
|
|
|
LIB32OBJC= ${LIB32PREFLAGS} -I${LIB32TMP}/usr/include/objc \
|
|
|
|
${LIB32POSTFLAGS}
|
|
|
|
|
|
|
|
# Yes, the flags are redundant.
|
|
|
|
LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
|
|
|
|
_SHLIBDIRPREFIX=${LIB32TMP} \
|
2005-04-06 01:41:08 +00:00
|
|
|
MACHINE=i386 \
|
2004-11-06 03:14:26 +00:00
|
|
|
MACHINE_ARCH=i386 \
|
|
|
|
INSTALL="sh ${.CURDIR}/tools/install.sh" \
|
|
|
|
PATH=${TMPPATH} \
|
2005-06-06 09:39:46 +00:00
|
|
|
CC="${CC} ${LIB32CC}" \
|
|
|
|
CXX="${CXX} ${LIB32CXX}" \
|
|
|
|
OBJC="${OBJC} ${LIB32OBJC}" \
|
|
|
|
LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
|
|
|
|
AS="${AS} --32" \
|
2004-11-06 03:14:26 +00:00
|
|
|
LIBDIR=/usr/lib32 \
|
|
|
|
SHLIBDIR=/usr/lib32
|
|
|
|
|
|
|
|
LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
|
2006-03-17 18:54:44 +00:00
|
|
|
-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_INFO \
|
|
|
|
-DWITHOUT_HTML
|
2005-11-19 06:45:44 +00:00
|
|
|
LIB32IMAKE= ${LIB32MAKE:NINSTALL=*} -DNO_INCS
|
2004-11-06 03:14:26 +00:00
|
|
|
.endif
|
|
|
|
|
1999-12-20 10:32:11 +00:00
|
|
|
# install stage
|
2004-08-09 11:38:41 +00:00
|
|
|
.if empty(.MAKEFLAGS:M-n)
|
2000-07-18 01:49:05 +00:00
|
|
|
IMAKEENV= ${CROSSENV} \
|
2000-07-19 04:41:59 +00:00
|
|
|
PATH=${STRICTTMPPATH}:${INSTALLTMP}
|
2004-08-09 11:38:41 +00:00
|
|
|
.else
|
|
|
|
IMAKEENV= ${CROSSENV} \
|
|
|
|
PATH=${TMPPATH}:${INSTALLTMP}
|
|
|
|
.endif
|
1999-12-10 10:48:20 +00:00
|
|
|
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
|
|
|
|
|
2001-01-22 08:07:58 +00:00
|
|
|
# kernel stage
|
2002-09-17 01:49:00 +00:00
|
|
|
KMAKEENV= ${WMAKEENV}
|
2005-11-22 11:31:03 +00:00
|
|
|
KMAKE= ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME}
|
2001-01-22 08:07:58 +00:00
|
|
|
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
|
|
|
# buildworld
|
|
|
|
#
|
|
|
|
# Attempt to rebuild the entire system, with reasonable chance of
|
|
|
|
# success, regardless of how old your existing system is.
|
|
|
|
#
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_worldtmp:
|
2003-02-04 08:15:30 +00:00
|
|
|
.if ${.CURDIR:C/[^,]//g} != ""
|
|
|
|
# The m4 build of sendmail files doesn't like it if ',' is used
|
|
|
|
# anywhere in the path of it's files.
|
|
|
|
@echo
|
|
|
|
@echo "*** Error: path to source tree contains a comma ','"
|
|
|
|
@echo
|
2004-03-04 09:14:30 +00:00
|
|
|
false
|
2003-02-04 08:15:30 +00:00
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1999-12-10 10:48:20 +00:00
|
|
|
@echo ">>> Rebuilding the temporary build tree"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-12-21 12:21:26 +00:00
|
|
|
.if !defined(NO_CLEAN)
|
1998-08-31 01:08:08 +00:00
|
|
|
rm -rf ${WORLDTMP}
|
2005-08-05 23:48:58 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
|
|
|
rm -rf ${LIB32TMP}
|
|
|
|
.endif
|
2002-04-11 14:49:32 +00:00
|
|
|
.else
|
2003-04-06 23:46:02 +00:00
|
|
|
rm -rf ${WORLDTMP}/legacy/usr/include
|
2005-12-07 20:01:12 +00:00
|
|
|
# XXX - These two can depend on any header file.
|
2002-04-11 14:49:32 +00:00
|
|
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
|
|
|
|
rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
|
1999-12-10 10:48:20 +00:00
|
|
|
.endif
|
2003-04-13 14:34:17 +00:00
|
|
|
.for _dir in \
|
2004-10-11 23:51:13 +00:00
|
|
|
usr/bin usr/games usr/include/c++/3.4 usr/include/sys usr/lib \
|
2003-04-13 14:34:17 +00:00
|
|
|
usr/libexec usr/sbin usr/share/dict \
|
|
|
|
usr/share/groff_font/devX100 \
|
|
|
|
usr/share/groff_font/devX100-12 \
|
|
|
|
usr/share/groff_font/devX75 \
|
|
|
|
usr/share/groff_font/devX75-12 \
|
|
|
|
usr/share/groff_font/devascii \
|
|
|
|
usr/share/groff_font/devcp1047 \
|
|
|
|
usr/share/groff_font/devdvi \
|
|
|
|
usr/share/groff_font/devhtml \
|
|
|
|
usr/share/groff_font/devkoi8-r \
|
|
|
|
usr/share/groff_font/devlatin1 \
|
|
|
|
usr/share/groff_font/devlbp \
|
|
|
|
usr/share/groff_font/devlj4 \
|
|
|
|
usr/share/groff_font/devps \
|
|
|
|
usr/share/groff_font/devutf8 \
|
|
|
|
usr/share/tmac/mdoc usr/share/tmac/mm
|
|
|
|
mkdir -p ${WORLDTMP}/legacy/${_dir}
|
1999-12-08 13:45:11 +00:00
|
|
|
.endfor
|
2003-04-13 14:34:17 +00:00
|
|
|
.for _dir in \
|
2003-08-17 07:50:15 +00:00
|
|
|
lib usr/bin usr/include usr/lib/compat/aout usr/libdata/ldscripts \
|
2004-03-19 15:08:58 +00:00
|
|
|
usr/libexec usr/sbin usr/share/misc \
|
2004-04-14 16:06:19 +00:00
|
|
|
usr/share/snmp/defs usr/share/snmp/mibs
|
2003-04-13 14:34:17 +00:00
|
|
|
mkdir -p ${WORLDTMP}/${_dir}
|
1999-12-08 13:45:11 +00:00
|
|
|
.endfor
|
2003-05-18 20:22:26 +00:00
|
|
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
2004-03-14 16:44:27 +00:00
|
|
|
-p ${WORLDTMP}/usr/include >/dev/null
|
2001-03-22 09:54:25 +00:00
|
|
|
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_BIND_LIBS} != "no"
|
2004-09-27 08:23:43 +00:00
|
|
|
mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
|
|
|
|
-p ${WORLDTMP}/usr/include >/dev/null
|
|
|
|
.endif
|
2003-04-06 21:46:44 +00:00
|
|
|
_legacy:
|
2003-04-06 03:50:28 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 1.1: legacy release compatibility shims"
|
2003-04-06 03:50:28 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${BMAKE} legacy
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_bootstrap-tools:
|
1999-12-10 10:48:20 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 1.2: bootstrap tools"
|
1999-12-10 10:48:20 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_cleanobj:
|
2004-12-21 12:21:26 +00:00
|
|
|
.if !defined(NO_CLEAN)
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 2.1: cleaning up the object tree"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
|
2005-08-05 23:48:58 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
|
|
|
rm -rf ${OBJTREE}/lib32
|
|
|
|
.endif
|
1999-01-04 12:05:59 +00:00
|
|
|
.endif
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_obj:
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 2.2: rebuilding the object tree"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${WMAKE} par-obj
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_build-tools:
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 2.3: build tools"
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_cross-tools:
|
1999-11-24 06:04:11 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
1999-12-20 10:32:11 +00:00
|
|
|
@echo ">>> stage 3: cross tools"
|
1999-11-24 06:04:11 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_includes:
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-11-03 21:09:47 +00:00
|
|
|
@echo ">>> stage 4.1: building includes"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_libraries:
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 4.2: building libraries"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; \
|
2006-03-17 18:54:44 +00:00
|
|
|
${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
|
2006-03-18 21:37:05 +00:00
|
|
|
-DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE libraries
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
_depend:
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2003-09-01 06:43:24 +00:00
|
|
|
@echo ">>> stage 4.3: make dependencies"
|
1999-12-20 10:32:11 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${WMAKE} par-depend
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
everything:
|
1999-12-20 10:32:11 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2004-03-19 17:57:07 +00:00
|
|
|
@echo ">>> stage 4.4: building everything"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${WMAKE} par-all
|
2005-03-27 19:35:09 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
2004-11-06 03:14:26 +00:00
|
|
|
build32:
|
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 5.1: building 32 bit shim libraries"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
.for _dir in \
|
|
|
|
lib lib32 usr/bin usr/include usr/lib32 usr/libdata/ldscripts \
|
|
|
|
usr/libexec usr/sbin usr/share/misc \
|
|
|
|
usr/share/snmp/defs usr/share/snmp/mibs
|
|
|
|
mkdir -p ${LIB32TMP}/${_dir}
|
|
|
|
.endfor
|
|
|
|
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
|
|
|
|
-p ${LIB32TMP}/usr/include >/dev/null
|
2005-08-05 23:48:58 +00:00
|
|
|
mkdir -p ${WORLDTMP}
|
2004-11-06 03:14:26 +00:00
|
|
|
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2004-11-20 23:41:25 +00:00
|
|
|
.for _t in obj depend all
|
|
|
|
cd ${.CURDIR}/kerberos5/tools; \
|
2005-03-22 14:22:47 +00:00
|
|
|
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t}
|
2004-11-20 23:41:25 +00:00
|
|
|
.endfor
|
|
|
|
.endif
|
2004-11-06 03:14:26 +00:00
|
|
|
.for _t in obj includes
|
|
|
|
cd ${.CURDIR}/include; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
cd ${.CURDIR}/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
cd ${.CURDIR}/gnu/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_CRYPT} != "no"
|
2004-11-06 03:14:26 +00:00
|
|
|
cd ${.CURDIR}/secure/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2006-01-02 17:52:16 +00:00
|
|
|
cd ${.CURDIR}/kerberos5/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
2004-11-15 05:59:10 +00:00
|
|
|
.endif
|
2004-11-06 03:14:26 +00:00
|
|
|
.endfor
|
2006-05-17 09:33:15 +00:00
|
|
|
.for _dir in usr.bin/lex/lib
|
2004-12-01 23:23:14 +00:00
|
|
|
cd ${.CURDIR}/${_dir}; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} obj
|
|
|
|
.endfor
|
2004-11-06 03:14:26 +00:00
|
|
|
.for _dir in lib/libncurses lib/libmagic
|
|
|
|
cd ${.CURDIR}/${_dir}; \
|
2005-03-22 14:22:47 +00:00
|
|
|
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= build-tools
|
2004-11-06 03:14:26 +00:00
|
|
|
.endfor
|
|
|
|
cd ${.CURDIR}; \
|
|
|
|
${LIB32MAKE} -f Makefile.inc1 DESTDIR=${LIB32TMP} libraries
|
|
|
|
.for _t in obj depend all
|
|
|
|
cd ${.CURDIR}/libexec/rtld-elf; \
|
|
|
|
PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
.endfor
|
|
|
|
|
2005-06-16 18:16:14 +00:00
|
|
|
distribute32 install32:
|
|
|
|
.if make(distribute32)
|
|
|
|
mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree
|
|
|
|
.else
|
|
|
|
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree
|
|
|
|
.endif
|
2005-08-03 20:27:06 +00:00
|
|
|
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
|
|
|
|
cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_CRYPT} != "no"
|
2005-08-03 20:27:06 +00:00
|
|
|
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
|
2004-11-06 03:14:26 +00:00
|
|
|
.endif
|
2005-08-03 20:27:06 +00:00
|
|
|
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
|
2004-11-06 03:14:26 +00:00
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
|
|
|
|
WMAKE_TGTS=
|
2002-05-18 18:17:13 +00:00
|
|
|
.if !defined(SUBDIR_OVERRIDE)
|
2003-04-06 21:46:44 +00:00
|
|
|
WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
.endif
|
|
|
|
WMAKE_TGTS+= _cleanobj _obj _build-tools
|
2002-05-18 18:17:13 +00:00
|
|
|
.if !defined(SUBDIR_OVERRIDE)
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
WMAKE_TGTS+= _cross-tools
|
|
|
|
.endif
|
|
|
|
WMAKE_TGTS+= _includes _libraries _depend everything
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
|
2004-11-06 03:14:26 +00:00
|
|
|
WMAKE_TGTS+= build32
|
|
|
|
.endif
|
Milestone #1 in cross-arch make releases.
Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.
Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.
Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).
Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).
In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.
Moved the creation of the "crypto" dist from release.5 to
release.2.
In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.
Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.
Inline createBOOTMFS target.
Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.
Assorted fixes:
Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".
Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.
gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.
release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.
Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.
XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)
Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.
Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
2002-04-26 17:55:27 +00:00
|
|
|
|
2006-09-07 19:36:16 +00:00
|
|
|
buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
|
|
|
|
.ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
|
1998-08-31 01:08:08 +00:00
|
|
|
|
2006-09-07 19:36:16 +00:00
|
|
|
buildworld_prologue:
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> World build started on `LC_ALL=C date`"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
|
|
|
|
buildworld_epilogue:
|
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> World build completed on `LC_ALL=C date`"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2006-06-06 16:24:54 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# We need to have this as a target because the indirection between Makefile
|
|
|
|
# and Makefile.inc1 causes the correct PATH to be used, rather than a
|
2006-06-06 18:07:58 +00:00
|
|
|
# modification of the current environment's PATH. In addition, we need
|
|
|
|
# to quote multiword values.
|
2006-06-06 16:24:54 +00:00
|
|
|
#
|
|
|
|
buildenvvars:
|
2006-06-06 18:07:58 +00:00
|
|
|
@echo ${WMAKEENV:Q}
|
2006-06-06 16:24:54 +00:00
|
|
|
|
2005-02-26 22:02:18 +00:00
|
|
|
buildenv:
|
|
|
|
@echo Entering world for ${TARGET_ARCH}:${TARGET}
|
2005-12-06 23:37:11 +00:00
|
|
|
@cd ${.CURDIR} && env ${WMAKEENV} sh || true
|
2005-02-26 22:02:18 +00:00
|
|
|
|
2005-07-07 00:58:41 +00:00
|
|
|
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
|
2004-04-13 13:42:01 +00:00
|
|
|
toolchain: ${TOOLCHAIN_TGTS}
|
|
|
|
kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
|
2004-03-24 08:26:22 +00:00
|
|
|
|
2004-03-03 19:36:20 +00:00
|
|
|
#
|
2005-11-22 12:02:41 +00:00
|
|
|
# installcheck
|
|
|
|
#
|
|
|
|
# Checks to be sure system is ready for installworld/installkernel.
|
2004-03-03 19:36:20 +00:00
|
|
|
#
|
2005-11-22 12:02:41 +00:00
|
|
|
installcheck:
|
2004-03-03 19:36:20 +00:00
|
|
|
|
2005-11-07 15:03:04 +00:00
|
|
|
#
|
|
|
|
# Require DESTDIR to be set if installing for a different architecture.
|
|
|
|
#
|
|
|
|
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE}
|
2005-11-12 19:28:46 +00:00
|
|
|
.if !make(distributeworld)
|
2005-11-22 12:02:41 +00:00
|
|
|
installcheck: installcheck_DESTDIR
|
2005-11-07 15:03:04 +00:00
|
|
|
installcheck_DESTDIR:
|
|
|
|
.if !defined(DESTDIR) || empty(DESTDIR)
|
|
|
|
@echo "ERROR: Please set DESTDIR!"; \
|
|
|
|
false
|
|
|
|
.endif
|
|
|
|
.endif
|
2005-11-12 19:28:46 +00:00
|
|
|
.endif
|
2005-11-07 15:03:04 +00:00
|
|
|
|
2002-04-20 19:04:59 +00:00
|
|
|
#
|
2005-11-22 12:02:41 +00:00
|
|
|
# Check for missing UIDs/GIDs.
|
2002-04-20 19:04:59 +00:00
|
|
|
#
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS=
|
2006-02-27 09:17:39 +00:00
|
|
|
CHECK_GIDS= audit
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_SENDMAIL} != "no"
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS+= smmsp
|
|
|
|
CHECK_GIDS+= smmsp
|
2002-04-20 19:04:59 +00:00
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_PF} != "no"
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS+= proxy
|
|
|
|
CHECK_GIDS+= proxy authpf
|
|
|
|
.endif
|
2005-11-22 12:02:41 +00:00
|
|
|
installcheck: installcheck_UGID
|
|
|
|
installcheck_UGID:
|
2004-03-12 13:20:24 +00:00
|
|
|
.for uid in ${CHECK_UIDS}
|
2004-03-12 13:24:17 +00:00
|
|
|
@if ! `id -u ${uid} >/dev/null 2>&1`; then \
|
2004-03-12 13:20:24 +00:00
|
|
|
echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \
|
2004-03-10 16:34:11 +00:00
|
|
|
false; \
|
|
|
|
fi
|
2004-03-12 13:20:24 +00:00
|
|
|
.endfor
|
|
|
|
.for gid in ${CHECK_GIDS}
|
2004-03-12 13:24:17 +00:00
|
|
|
@if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
|
2004-03-12 13:20:24 +00:00
|
|
|
echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \
|
|
|
|
false; \
|
|
|
|
fi
|
|
|
|
.endfor
|
2002-04-20 19:04:59 +00:00
|
|
|
|
2002-05-14 08:30:40 +00:00
|
|
|
#
|
|
|
|
# distributeworld
|
|
|
|
#
|
|
|
|
# Distributes everything compiled by a `buildworld'.
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
|
|
|
# installworld
|
|
|
|
#
|
|
|
|
# Installs everything compiled by a 'buildworld'.
|
|
|
|
#
|
2002-04-30 11:50:01 +00:00
|
|
|
distributeworld installworld: installcheck
|
2000-07-19 04:41:59 +00:00
|
|
|
mkdir -p ${INSTALLTMP}
|
2003-03-04 17:24:18 +00:00
|
|
|
for prog in [ awk cap_mkdb cat chflags chmod chown \
|
2005-05-31 04:45:47 +00:00
|
|
|
date echo egrep find grep install-info \
|
2005-11-03 08:56:39 +00:00
|
|
|
ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
|
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
2001-09-29 13:17:54 +00:00
|
|
|
test true uname wc zic; do \
|
2000-07-19 04:41:59 +00:00
|
|
|
cp `which $$prog` ${INSTALLTMP}; \
|
|
|
|
done
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}
|
2000-07-19 04:41:59 +00:00
|
|
|
rm -rf ${INSTALLTMP}
|
1998-08-31 01:08:08 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# reinstall
|
|
|
|
#
|
|
|
|
# If you have a build server, you can NFS mount the source and obj directories
|
|
|
|
# and do a 'make reinstall' on the *client* to install new binaries from the
|
|
|
|
# most recent server build.
|
|
|
|
#
|
2005-11-22 20:47:43 +00:00
|
|
|
reinstall:
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1998-09-17 16:32:00 +00:00
|
|
|
@echo ">>> Making hierarchy"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2004-03-19 17:57:07 +00:00
|
|
|
@echo ">>> Installing everything"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
|
2004-11-06 03:14:26 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
|
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
|
2002-04-30 11:50:01 +00:00
|
|
|
redistribute:
|
|
|
|
@echo "--------------------------------------------------------------"
|
2004-03-19 17:57:07 +00:00
|
|
|
@echo ">>> Distributing everything"
|
2002-04-30 11:50:01 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
|
2005-06-16 18:16:14 +00:00
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
|
|
|
|
.endif
|
2000-11-21 04:37:30 +00:00
|
|
|
|
2005-07-15 14:38:54 +00:00
|
|
|
distrib-dirs distribution:
|
|
|
|
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET}
|
2005-02-27 12:11:35 +00:00
|
|
|
|
2000-01-09 17:56:40 +00:00
|
|
|
#
|
|
|
|
# buildkernel and installkernel
|
|
|
|
#
|
|
|
|
# Which kernels to build and/or install is specified by setting
|
2001-01-22 07:29:48 +00:00
|
|
|
# KERNCONF. If not defined a GENERIC kernel is built/installed.
|
2001-10-25 07:28:55 +00:00
|
|
|
# Only the existing (depending TARGET) config files are used
|
2000-01-09 17:56:40 +00:00
|
|
|
# for building kernels and only the first of these is designated
|
|
|
|
# as the one being installed.
|
|
|
|
#
|
2001-10-25 07:28:55 +00:00
|
|
|
# Note that we have to use TARGET instead of TARGET_ARCH when
|
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
2001-09-29 13:17:54 +00:00
|
|
|
# we're in kernel-land. Since only TARGET_ARCH is (expected) to
|
2001-10-25 07:28:55 +00:00
|
|
|
# be set to cross-build, we have to make sure TARGET is set
|
2000-01-09 17:56:40 +00:00
|
|
|
# properly.
|
|
|
|
|
2001-01-23 09:52:50 +00:00
|
|
|
.if !defined(KERNCONF) && defined(KERNEL)
|
|
|
|
KERNCONF= ${KERNEL}
|
2004-10-24 15:33:08 +00:00
|
|
|
KERNWARN=
|
2001-01-23 09:52:50 +00:00
|
|
|
.else
|
2001-01-22 07:29:48 +00:00
|
|
|
KERNCONF?= GENERIC
|
2001-01-23 09:52:50 +00:00
|
|
|
.endif
|
2000-09-03 02:58:39 +00:00
|
|
|
INSTKERNNAME?= kernel
|
2000-01-09 17:56:40 +00:00
|
|
|
|
2003-04-16 21:05:06 +00:00
|
|
|
KERNSRCDIR?= ${.CURDIR}/sys
|
|
|
|
KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf
|
|
|
|
KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR}
|
2001-08-27 12:01:46 +00:00
|
|
|
KERNCONFDIR?= ${KRNLCONFDIR}
|
2000-01-09 17:56:40 +00:00
|
|
|
|
|
|
|
BUILDKERNELS=
|
|
|
|
INSTALLKERNEL=
|
2001-01-22 07:29:48 +00:00
|
|
|
.for _kernel in ${KERNCONF}
|
2001-08-27 12:01:46 +00:00
|
|
|
.if exists(${KERNCONFDIR}/${_kernel})
|
2000-01-09 17:56:40 +00:00
|
|
|
BUILDKERNELS+= ${_kernel}
|
|
|
|
.if empty(INSTALLKERNEL)
|
|
|
|
INSTALLKERNEL= ${_kernel}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# buildkernel
|
|
|
|
#
|
|
|
|
# Builds all kernels defined by BUILDKERNELS.
|
|
|
|
#
|
|
|
|
buildkernel:
|
2000-10-25 04:31:32 +00:00
|
|
|
.if empty(BUILDKERNELS)
|
2005-02-27 11:48:45 +00:00
|
|
|
@echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \
|
2004-03-04 09:14:30 +00:00
|
|
|
false
|
2001-01-23 09:52:50 +00:00
|
|
|
.endif
|
|
|
|
.if defined(KERNWARN)
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@sleep 3
|
2000-10-25 04:31:32 +00:00
|
|
|
.endif
|
2000-01-09 17:56:40 +00:00
|
|
|
@echo
|
2001-01-21 23:44:41 +00:00
|
|
|
.for _kernel in ${BUILDKERNELS}
|
2000-01-09 17:56:40 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2001-03-02 16:52:14 +00:00
|
|
|
@echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
|
2000-01-09 17:56:40 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo "===> ${_kernel}"
|
2000-04-27 09:20:18 +00:00
|
|
|
mkdir -p ${KRNLOBJDIR}
|
2000-06-15 10:00:20 +00:00
|
|
|
.if !defined(NO_KERNELCONFIG)
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 1: configuring the kernel"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2000-01-09 17:56:40 +00:00
|
|
|
cd ${KRNLCONFDIR}; \
|
|
|
|
PATH=${TMPPATH} \
|
2001-08-27 12:01:46 +00:00
|
|
|
config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
|
|
|
|
${KERNCONFDIR}/${_kernel}
|
2001-01-22 23:10:01 +00:00
|
|
|
.endif
|
2004-12-21 12:21:26 +00:00
|
|
|
.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 2.1: cleaning up the object tree"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2005-11-22 11:31:03 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
|
2000-06-15 10:00:20 +00:00
|
|
|
.endif
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 2.2: rebuilding the object tree"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2005-11-22 11:31:03 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 2.3: build tools"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2000-01-09 17:56:40 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; \
|
2003-04-16 21:05:06 +00:00
|
|
|
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
|
|
|
|
${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
|
2003-02-21 11:19:25 +00:00
|
|
|
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
|
2003-04-16 21:05:06 +00:00
|
|
|
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
|
2003-02-21 11:19:25 +00:00
|
|
|
.for target in obj depend all
|
2004-11-23 09:09:47 +00:00
|
|
|
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
|
2002-11-03 23:48:14 +00:00
|
|
|
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
|
2003-02-21 11:19:25 +00:00
|
|
|
${MAKE} -DNO_CPU_CFLAGS ${target}
|
|
|
|
.endfor
|
2002-11-03 23:48:14 +00:00
|
|
|
.endif
|
2000-06-15 10:00:20 +00:00
|
|
|
.if !defined(NO_KERNELDEPEND)
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 3.1: making dependencies"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2005-11-22 11:31:03 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
|
2000-06-15 10:00:20 +00:00
|
|
|
.endif
|
2004-03-18 10:17:03 +00:00
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> stage 3.2: building everything"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2005-11-22 11:31:03 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
|
2001-01-21 23:44:41 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2001-03-02 16:52:14 +00:00
|
|
|
@echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
|
2001-01-21 23:44:41 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2000-01-09 17:56:40 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
2004-03-04 09:14:30 +00:00
|
|
|
# installkernel, etc.
|
2000-01-09 17:56:40 +00:00
|
|
|
#
|
|
|
|
# Install the kernel defined by INSTALLKERNEL
|
|
|
|
#
|
2004-03-03 19:36:20 +00:00
|
|
|
installkernel installkernel.debug \
|
2005-11-22 12:02:41 +00:00
|
|
|
reinstallkernel reinstallkernel.debug: installcheck
|
2003-02-07 07:29:57 +00:00
|
|
|
.if empty(INSTALLKERNEL)
|
2005-02-27 11:48:45 +00:00
|
|
|
@echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
|
2004-03-04 09:14:30 +00:00
|
|
|
false
|
2003-02-07 07:29:57 +00:00
|
|
|
.endif
|
2004-03-13 15:46:34 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
@echo ">>> Installing kernel"
|
|
|
|
@echo "--------------------------------------------------------------"
|
2000-09-17 21:02:58 +00:00
|
|
|
cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
|
2002-12-02 14:03:40 +00:00
|
|
|
${CROSSENV} PATH=${TMPPATH} \
|
2003-06-22 10:01:03 +00:00
|
|
|
${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
|
2000-09-03 02:58:39 +00:00
|
|
|
|
2006-05-26 18:10:06 +00:00
|
|
|
#
|
|
|
|
# doxygen
|
|
|
|
#
|
|
|
|
# Build the API documentation with doxygen
|
|
|
|
#
|
|
|
|
doxygen:
|
|
|
|
@if [ ! -x `/usr/bin/which doxygen` ]; then \
|
|
|
|
echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2006-08-02 15:26:15 +00:00
|
|
|
cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all
|
2006-05-26 18:10:06 +00:00
|
|
|
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
|
|
|
# update
|
|
|
|
#
|
2004-12-17 10:11:33 +00:00
|
|
|
# Update the source tree, by running cvsup and/or running cvs to update to the
|
1998-08-31 01:08:08 +00:00
|
|
|
# latest copy.
|
|
|
|
#
|
|
|
|
update:
|
|
|
|
.if defined(SUP_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
1998-09-17 16:32:00 +00:00
|
|
|
@echo ">>> Running ${SUP}"
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
1999-12-16 01:21:48 +00:00
|
|
|
.if defined(SUPFILE)
|
1998-08-31 01:08:08 +00:00
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE}
|
1999-12-16 01:21:48 +00:00
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
.if defined(SUPFILE1)
|
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE1}
|
|
|
|
.endif
|
|
|
|
.if defined(SUPFILE2)
|
|
|
|
@${SUP} ${SUPFLAGS} ${SUPFILE2}
|
|
|
|
.endif
|
2000-08-07 14:35:49 +00:00
|
|
|
.if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE)
|
1999-06-01 02:55:44 +00:00
|
|
|
@${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
|
|
|
|
.endif
|
2000-08-07 14:35:49 +00:00
|
|
|
.if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE)
|
|
|
|
@${SUP} ${SUPFLAGS} ${DOCSUPFILE}
|
|
|
|
.endif
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
|
|
|
.if defined(CVS_UPDATE)
|
|
|
|
@echo "--------------------------------------------------------------"
|
2004-12-17 10:11:33 +00:00
|
|
|
@echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
|
1998-08-31 01:08:08 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2004-08-24 23:12:16 +00:00
|
|
|
cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# From here onwards are utility targets used by the 'make world' and
|
|
|
|
# related targets. If your 'world' breaks, you may like to try to fix
|
|
|
|
# the problem and manually run the following targets to attempt to
|
|
|
|
# complete the build. Beware, this is *not* guaranteed to work, you
|
|
|
|
# need to have a pretty good grip on the current state of the system
|
|
|
|
# to attempt to manually finish it. If in doubt, 'make world' again.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
2003-04-06 21:46:44 +00:00
|
|
|
# legacy: Build compatibility shims for the next three targets
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
2003-04-06 21:46:44 +00:00
|
|
|
legacy:
|
2005-02-27 11:51:46 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 503000
|
|
|
|
@echo "ERROR: Source upgrades from versions prior to 5.3 not supported."; \
|
|
|
|
false
|
|
|
|
.endif
|
2003-04-06 03:50:28 +00:00
|
|
|
.for _tool in tools/build
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
|
2003-04-06 03:50:28 +00:00
|
|
|
cd ${.CURDIR}/${_tool}; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
2003-04-11 17:58:17 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
|
2003-04-06 03:50:28 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ depend; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ all; \
|
2003-04-06 21:46:44 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
|
2003-04-06 03:50:28 +00:00
|
|
|
.endfor
|
|
|
|
|
2003-04-06 21:33:49 +00:00
|
|
|
#
|
|
|
|
# bootstrap-tools: Build tools needed for compatibility
|
|
|
|
#
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_GAMES} != "no"
|
2003-04-06 21:33:49 +00:00
|
|
|
_strfile= games/fortune/strfile
|
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_CXX} != "no"
|
2005-02-27 11:22:58 +00:00
|
|
|
_gperf= gnu/usr.bin/gperf
|
2005-10-20 11:22:30 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 700004
|
2003-04-30 10:58:52 +00:00
|
|
|
_groff= gnu/usr.bin/groff
|
|
|
|
.else
|
|
|
|
_groff= gnu/usr.bin/groff/tmac
|
|
|
|
.endif
|
2003-05-31 21:29:38 +00:00
|
|
|
.endif
|
2003-04-30 10:58:52 +00:00
|
|
|
|
2005-05-23 11:15:16 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600029
|
|
|
|
_texinfo= gnu/usr.bin/texinfo
|
|
|
|
.endif
|
|
|
|
|
2005-02-22 23:29:54 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600015
|
|
|
|
_cap_mkdb= usr.bin/cap_mkdb
|
|
|
|
.endif
|
|
|
|
|
2005-02-27 20:31:13 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600018
|
|
|
|
_colldef= usr.bin/colldef
|
|
|
|
.endif
|
|
|
|
|
2005-02-27 19:13:41 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600017
|
|
|
|
_gencat= usr.bin/gencat
|
|
|
|
.endif
|
|
|
|
|
2005-02-26 21:47:54 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600016
|
|
|
|
_mklocale= usr.bin/mklocale
|
|
|
|
.endif
|
|
|
|
|
2006-03-31 14:10:35 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 700015
|
|
|
|
_gensnmptree= usr.sbin/bsnmpd/gensnmptree
|
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_RESCUE} != "no" && \
|
2005-01-20 10:49:03 +00:00
|
|
|
${BOOTSTRAPPING} < 600008
|
2003-07-01 12:25:11 +00:00
|
|
|
_crunchgen= usr.sbin/crunch/crunchgen
|
|
|
|
.endif
|
|
|
|
|
2005-02-28 22:55:43 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 600020
|
|
|
|
_pwd_mkdb= usr.sbin/pwd_mkdb
|
|
|
|
.endif
|
|
|
|
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
bootstrap-tools:
|
2003-07-01 12:57:53 +00:00
|
|
|
.for _tool in \
|
|
|
|
${_strfile} \
|
|
|
|
${_gperf} \
|
|
|
|
${_groff} \
|
2005-05-23 11:15:16 +00:00
|
|
|
${_texinfo} \
|
2005-02-22 23:29:54 +00:00
|
|
|
${_cap_mkdb} \
|
2005-02-27 20:31:13 +00:00
|
|
|
${_colldef} \
|
2005-02-27 19:13:41 +00:00
|
|
|
${_gencat} \
|
2005-02-19 10:25:42 +00:00
|
|
|
usr.bin/lorder \
|
2003-07-01 12:57:53 +00:00
|
|
|
usr.bin/makewhatis \
|
2005-02-26 21:47:54 +00:00
|
|
|
${_mklocale} \
|
2003-07-01 12:57:53 +00:00
|
|
|
usr.bin/rpcgen \
|
|
|
|
usr.bin/xinstall \
|
2006-03-09 12:55:02 +00:00
|
|
|
${_gensnmptree} \
|
2006-03-31 14:10:35 +00:00
|
|
|
usr.sbin/config \
|
2005-02-28 22:55:43 +00:00
|
|
|
${_crunchgen} \
|
|
|
|
${_pwd_mkdb}
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
|
2002-08-23 12:49:16 +00:00
|
|
|
cd ${.CURDIR}/${_tool}; \
|
2002-05-12 16:01:00 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ depend; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ all; \
|
2003-04-13 11:42:55 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
|
1999-12-08 13:45:11 +00:00
|
|
|
.endfor
|
1999-11-24 06:04:11 +00:00
|
|
|
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
#
|
1999-12-20 10:32:11 +00:00
|
|
|
# build-tools: Build special purpose build tools
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
#
|
2003-04-16 21:05:06 +00:00
|
|
|
.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules)
|
2002-11-03 23:48:14 +00:00
|
|
|
_aicasm= sys/modules/aic7xxx/aicasm
|
|
|
|
.endif
|
|
|
|
|
2004-12-21 12:13:23 +00:00
|
|
|
.if !defined(NO_SHARE)
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
_share= share/syscons/scrnmaps
|
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2004-01-31 08:15:57 +00:00
|
|
|
_kerberos5_tools= kerberos5/tools
|
1999-12-30 10:31:21 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_RESCUE} != "no"
|
2003-07-11 17:01:58 +00:00
|
|
|
_rescue= rescue/rescue
|
|
|
|
.endif
|
|
|
|
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
build-tools:
|
2003-07-01 12:57:53 +00:00
|
|
|
.for _tool in \
|
|
|
|
bin/csh \
|
|
|
|
bin/sh \
|
2003-07-11 17:01:58 +00:00
|
|
|
${_rescue} \
|
2003-07-01 12:57:53 +00:00
|
|
|
lib/libncurses \
|
|
|
|
${_share} \
|
|
|
|
${_aicasm} \
|
|
|
|
usr.bin/awk \
|
2004-08-09 10:51:01 +00:00
|
|
|
lib/libmagic \
|
2003-07-01 12:57:53 +00:00
|
|
|
usr.sbin/sysinstall
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
|
2003-02-24 20:09:16 +00:00
|
|
|
cd ${.CURDIR}/${_tool}; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ build-tools
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
.endfor
|
2004-01-31 08:15:57 +00:00
|
|
|
.for _tool in \
|
2004-08-18 13:21:40 +00:00
|
|
|
gnu/usr.bin/cc/cc_tools \
|
2004-01-31 08:15:57 +00:00
|
|
|
${_kerberos5_tools}
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
|
2004-01-31 08:15:57 +00:00
|
|
|
cd ${.CURDIR}/${_tool}; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ depend; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ all
|
|
|
|
.endfor
|
o Add games/caesar to the list of bootstrap-tools so that a
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
1999-12-16 13:47:34 +00:00
|
|
|
|
1999-12-20 10:32:11 +00:00
|
|
|
#
|
|
|
|
# cross-tools: Build cross-building tools
|
|
|
|
#
|
2005-12-07 20:01:12 +00:00
|
|
|
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
|
|
|
|
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
|
2003-07-01 12:57:53 +00:00
|
|
|
_btxld= usr.sbin/btxld
|
|
|
|
.endif
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_RESCUE} != "no" || defined(RELEASEDIR)
|
2003-07-01 12:25:11 +00:00
|
|
|
_crunchide= usr.sbin/crunch/crunchide
|
|
|
|
.endif
|
2005-12-07 20:01:12 +00:00
|
|
|
.if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR)
|
2003-07-01 12:57:53 +00:00
|
|
|
_kgzip= usr.sbin/kgzip
|
|
|
|
.endif
|
2005-12-07 20:01:12 +00:00
|
|
|
.endif
|
2002-03-20 18:25:50 +00:00
|
|
|
|
1999-12-20 10:32:11 +00:00
|
|
|
cross-tools:
|
2003-07-01 12:57:53 +00:00
|
|
|
.for _tool in \
|
|
|
|
gnu/usr.bin/binutils \
|
|
|
|
gnu/usr.bin/cc \
|
|
|
|
usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
|
|
|
|
${_btxld} \
|
|
|
|
${_crunchide} \
|
|
|
|
${_kgzip}
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
|
2002-08-23 12:49:16 +00:00
|
|
|
cd ${.CURDIR}/${_tool}; \
|
2002-05-12 16:01:00 +00:00
|
|
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ depend; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ all; \
|
|
|
|
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
|
1999-12-20 10:32:11 +00:00
|
|
|
.endfor
|
|
|
|
|
1999-11-24 06:04:11 +00:00
|
|
|
#
|
1999-12-08 13:45:11 +00:00
|
|
|
# hierarchy - ensure that all the needed directories are present
|
1999-11-24 06:04:11 +00:00
|
|
|
#
|
1999-12-08 13:45:11 +00:00
|
|
|
hierarchy:
|
|
|
|
cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
|
1998-08-31 01:08:08 +00:00
|
|
|
|
|
|
|
#
|
1999-12-08 13:45:11 +00:00
|
|
|
# libraries - build all libraries, and install them under ${DESTDIR}.
|
1999-11-24 06:04:11 +00:00
|
|
|
#
|
2002-04-12 19:46:25 +00:00
|
|
|
# The list of libraries with dependents (${_prebuild_libs}) and their
|
|
|
|
# interdependencies (__L) are built automatically by the
|
|
|
|
# ${.CURDIR}/tools/make_libdeps.sh script.
|
1998-08-31 01:08:08 +00:00
|
|
|
#
|
2002-04-12 19:46:25 +00:00
|
|
|
libraries:
|
|
|
|
cd ${.CURDIR}; \
|
|
|
|
${MAKE} -f Makefile.inc1 _startup_libs; \
|
|
|
|
${MAKE} -f Makefile.inc1 _prebuild_libs; \
|
|
|
|
${MAKE} -f Makefile.inc1 _generic_libs;
|
|
|
|
|
2002-04-16 14:38:15 +00:00
|
|
|
# These dependencies are not automatically generated:
|
|
|
|
#
|
2002-05-12 13:37:59 +00:00
|
|
|
# gnu/lib/csu, gnu/lib/libgcc and lib/csu must be built before all
|
2002-04-16 14:38:15 +00:00
|
|
|
# shared libraries for ELF.
|
|
|
|
#
|
2002-05-12 13:37:59 +00:00
|
|
|
_startup_libs= gnu/lib/csu gnu/lib/libgcc
|
2002-09-17 01:49:00 +00:00
|
|
|
.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
|
|
|
|
_startup_libs+= lib/csu/${MACHINE_ARCH}-elf
|
1998-08-31 01:08:08 +00:00
|
|
|
.else
|
2002-05-12 13:37:59 +00:00
|
|
|
_startup_libs+= lib/csu/${MACHINE_ARCH}
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
|
|
|
|
2006-10-07 19:26:46 +00:00
|
|
|
_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \
|
|
|
|
${_kerberos5_lib_libroken} \
|
|
|
|
lib/libbz2 lib/libcom_err lib/libcrypt lib/libexpat \
|
|
|
|
${_lib_libgssapi} ${_lib_libipx} \
|
2006-03-20 14:24:58 +00:00
|
|
|
lib/libkiconv lib/libkvm lib/libmd \
|
2006-10-07 18:34:08 +00:00
|
|
|
lib/libncurses lib/libopie lib/libpam \
|
2006-10-07 19:26:46 +00:00
|
|
|
lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
|
|
|
|
${_lib_libypclnt} lib/libz lib/msun \
|
|
|
|
${_secure_lib_libcrypto} ${_secure_lib_libssh} \
|
|
|
|
${_secure_lib_libssl}
|
2002-07-01 17:51:43 +00:00
|
|
|
|
2006-10-07 19:26:46 +00:00
|
|
|
_generic_libs= gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2006-10-07 19:26:46 +00:00
|
|
|
lib/libopie__L lib/libtacplus__L: lib/libmd__L
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_CRYPT} != "no"
|
|
|
|
.if ${MK_OPENSSL} != "no"
|
2006-10-07 19:26:46 +00:00
|
|
|
_secure_lib_libcrypto= secure/lib/libcrypto
|
|
|
|
_secure_lib_libssl= secure/lib/libssl
|
2005-11-10 18:07:07 +00:00
|
|
|
lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_OPENSSH} != "no"
|
2006-10-07 19:26:46 +00:00
|
|
|
_secure_lib_libssh= secure/lib/libssh
|
2004-05-12 07:02:17 +00:00
|
|
|
secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_KERBEROS} != "no"
|
2006-10-07 18:34:08 +00:00
|
|
|
secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \
|
|
|
|
kerberos5/lib/libasn1__L lib/libcom_err__L lib/libmd__L \
|
|
|
|
kerberos5/lib/libroken__L
|
2004-05-12 07:02:17 +00:00
|
|
|
.endif
|
1999-12-17 11:23:56 +00:00
|
|
|
.endif
|
2002-06-21 08:54:03 +00:00
|
|
|
.endif
|
2006-10-07 19:26:46 +00:00
|
|
|
_secure_lib= secure/lib
|
2002-04-16 14:38:15 +00:00
|
|
|
.endif
|
1999-12-17 11:23:56 +00:00
|
|
|
|
2006-10-07 19:26:46 +00:00
|
|
|
.if ${MK_IPX} != "no"
|
|
|
|
_lib_libipx= lib/libipx
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${MK_KERBEROS} != "no"
|
|
|
|
_kerberos5_lib= kerberos5/lib
|
|
|
|
_kerberos5_lib_libasn1= kerberos5/lib/libasn1
|
|
|
|
_kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
|
|
|
|
_kerberos5_lib_libroken= kerberos5/lib/libroken
|
|
|
|
_lib_libgssapi= lib/libgssapi
|
2004-04-27 15:00:29 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_NIS} != "no"
|
2006-10-07 19:26:46 +00:00
|
|
|
_lib_libypclnt= lib/libypclnt
|
2004-11-13 20:40:32 +00:00
|
|
|
.endif
|
|
|
|
|
2006-10-07 19:26:46 +00:00
|
|
|
.if ${MK_OPENSSL} == "no"
|
|
|
|
lib/libradius__L: lib/libmd__L
|
|
|
|
.endif
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2002-11-14 19:24:51 +00:00
|
|
|
.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
|
2002-04-12 19:46:25 +00:00
|
|
|
${_lib}__L: .PHONY
|
1999-11-24 06:04:11 +00:00
|
|
|
.if exists(${.CURDIR}/${_lib})
|
2006-08-24 17:02:26 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
|
2002-08-23 12:49:16 +00:00
|
|
|
cd ${.CURDIR}/${_lib}; \
|
2006-08-24 17:02:26 +00:00
|
|
|
${MAKE} DIRPRFX=${_lib}/ obj; \
|
2002-05-12 16:01:00 +00:00
|
|
|
${MAKE} DIRPRFX=${_lib}/ depend; \
|
|
|
|
${MAKE} DIRPRFX=${_lib}/ all; \
|
|
|
|
${MAKE} DIRPRFX=${_lib}/ install
|
1999-01-07 06:26:33 +00:00
|
|
|
.endif
|
1999-07-07 04:46:46 +00:00
|
|
|
.endfor
|
1998-09-01 00:39:02 +00:00
|
|
|
|
2002-11-14 19:24:51 +00:00
|
|
|
# libpam is special: we need to build static PAM modules before
|
|
|
|
# static PAM library, and dynamic PAM library before dynamic PAM
|
|
|
|
# modules.
|
|
|
|
lib/libpam__L: .PHONY
|
2006-08-24 17:02:26 +00:00
|
|
|
${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
|
2002-11-14 19:24:51 +00:00
|
|
|
cd ${.CURDIR}/lib/libpam; \
|
2006-08-24 17:02:26 +00:00
|
|
|
${MAKE} DIRPRFX=lib/libpam/ obj; \
|
2002-11-14 19:24:51 +00:00
|
|
|
${MAKE} DIRPRFX=lib/libpam/ depend; \
|
|
|
|
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
|
|
|
|
${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
|
|
|
|
|
2002-04-12 19:46:25 +00:00
|
|
|
_startup_libs: ${_startup_libs:S/$/__L/}
|
|
|
|
_prebuild_libs: ${_prebuild_libs:S/$/__L/}
|
|
|
|
_generic_libs: ${_generic_libs:S/$/__L/}
|
|
|
|
|
2003-04-01 11:39:04 +00:00
|
|
|
.for __target in all clean cleandepend cleandir depend includes obj
|
1998-08-31 01:08:08 +00:00
|
|
|
.for entry in ${SUBDIR}
|
|
|
|
${entry}.${__target}__D: .PHONY
|
2004-08-09 11:38:41 +00:00
|
|
|
${_+_}@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
|
2004-09-07 15:19:40 +00:00
|
|
|
${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \
|
1998-08-31 20:48:13 +00:00
|
|
|
edir=${entry}.${MACHINE_ARCH}; \
|
1998-08-31 01:08:08 +00:00
|
|
|
cd ${.CURDIR}/$${edir}; \
|
|
|
|
else \
|
2004-09-07 15:19:40 +00:00
|
|
|
${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \
|
1998-08-31 01:08:08 +00:00
|
|
|
edir=${entry}; \
|
|
|
|
cd ${.CURDIR}/$${edir}; \
|
|
|
|
fi; \
|
|
|
|
${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
|
|
|
|
.endfor
|
|
|
|
par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.subdir.mk>
|
2005-07-23 14:23:30 +00:00
|
|
|
|
2005-07-30 18:02:20 +00:00
|
|
|
.if make(delete-old) || make(delete-old-libs) || make(check-old)
|
|
|
|
|
2005-07-23 14:23:30 +00:00
|
|
|
#
|
|
|
|
# check for / delete old files section
|
|
|
|
#
|
|
|
|
|
|
|
|
.include "ObsoleteFiles.inc"
|
|
|
|
|
|
|
|
OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \
|
|
|
|
else you can not start such an application. Consult UPDATING for more \
|
|
|
|
information regarding how to cope with the removal/revision bump of a \
|
|
|
|
specific library."
|
|
|
|
|
|
|
|
.if !defined(BATCH_DELETE_OLD_FILES)
|
|
|
|
RM_I=-i
|
2005-07-30 18:02:20 +00:00
|
|
|
.else
|
|
|
|
RM_I=-v
|
2005-07-23 14:23:30 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
delete-old-files:
|
|
|
|
@echo ">>> Removing old files (only deletes safe to delete libs)"
|
|
|
|
.for file in ${OLD_FILES}
|
|
|
|
# Ask for every old file if the user really wants to remove it.
|
2005-08-23 07:58:55 +00:00
|
|
|
# It's annoying, but better safe than sorry.
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then \
|
|
|
|
rm ${RM_I} "${DESTDIR}/${file}" || true; \
|
|
|
|
if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then\
|
|
|
|
echo "Removing schg flag on ${DESTDIR}/${file}"; \
|
|
|
|
chflags noschg "${DESTDIR}/${file}"; \
|
|
|
|
rm ${RM_I} "${DESTDIR}/${file}"; \
|
|
|
|
fi; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
2005-08-07 13:47:25 +00:00
|
|
|
# Remove catpages without corresponding manpages.
|
2005-11-12 19:31:30 +00:00
|
|
|
@3<&0; \
|
|
|
|
find ${DESTDIR}/usr/share/man/cat* ! -type d | \
|
|
|
|
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
|
|
|
|
while read catpage; do \
|
|
|
|
read manpage; \
|
|
|
|
if [ ! -e "$${manpage}" ]; then \
|
|
|
|
rm ${RM_I} $${catpage} <&3 ; \
|
|
|
|
fi; \
|
2005-08-07 13:47:25 +00:00
|
|
|
done
|
2005-07-23 14:23:30 +00:00
|
|
|
@echo ">>> Old files removed"
|
|
|
|
|
|
|
|
check-old-files:
|
|
|
|
@echo ">>> Checking for old files"
|
|
|
|
.for file in ${OLD_FILES}
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then \
|
|
|
|
echo "${DESTDIR}/${file}"; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
2005-08-07 13:47:25 +00:00
|
|
|
# Check for catpages without corresponding manpages.
|
2005-11-12 19:31:30 +00:00
|
|
|
@find ${DESTDIR}/usr/share/man/cat* ! -type d | \
|
|
|
|
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
|
|
|
|
while read catpage; do \
|
|
|
|
read manpage; \
|
|
|
|
if [ ! -e "$${manpage}" ]; then \
|
|
|
|
echo $${catpage} ; \
|
|
|
|
fi; \
|
2005-08-07 13:47:25 +00:00
|
|
|
done
|
2005-07-23 14:23:30 +00:00
|
|
|
|
|
|
|
delete-old-libs:
|
|
|
|
@echo ">>> Removing old libraries"
|
|
|
|
@echo "${OLD_LIBS_MESSAGE}" | fmt
|
|
|
|
.for file in ${OLD_LIBS}
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then \
|
|
|
|
rm ${RM_I} "${DESTDIR}/${file}" || true; \
|
|
|
|
if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then\
|
|
|
|
echo "Removing schg flag on ${DESTDIR}/${file}"; \
|
|
|
|
chflags noschg "${DESTDIR}/${file}"; \
|
|
|
|
rm ${RM_I} "${DESTDIR}/${file}"; \
|
|
|
|
fi; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
|
|
|
@echo ">>> Old libraries removed"
|
|
|
|
|
|
|
|
check-old-libs:
|
|
|
|
@echo ">>> Checking for old libraries"
|
|
|
|
.for file in ${OLD_LIBS}
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -f "${DESTDIR}/${file}" -o -L "${DESTDIR}/${file}" ]; then \
|
|
|
|
echo "${DESTDIR}/${file}"; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
delete-old-dirs:
|
|
|
|
@echo ">>> Removing old directories"
|
|
|
|
.for dir in ${OLD_DIRS}
|
|
|
|
# Don't fail if an old directory isn't empty.
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -d "${DESTDIR}/${dir}" ]; then \
|
|
|
|
rmdir -v "${DESTDIR}/${dir}" || true; \
|
|
|
|
else \
|
|
|
|
if [ -L "${DESTDIR}/${dir}" ]; then \
|
|
|
|
echo "${DESTDIR}/${dir} is a link, please remove everything manually."; \
|
|
|
|
fi; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
|
|
|
@echo ">>> Old directories removed"
|
|
|
|
|
|
|
|
check-old-dirs:
|
|
|
|
@echo ">>> Checking for old directories"
|
|
|
|
.for dir in ${OLD_DIRS}
|
2006-02-18 16:58:21 +00:00
|
|
|
@if [ -d "${DESTDIR}/${dir}" ]; then \
|
|
|
|
echo "${DESTDIR}/${dir}"; \
|
|
|
|
else \
|
|
|
|
if [ -L "${DESTDIR}/${dir}" ]; then \
|
|
|
|
echo "${DESTDIR}/${dir} is a link, please remove everything manually."; \
|
|
|
|
fi; \
|
|
|
|
fi
|
2005-07-23 14:23:30 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
delete-old: delete-old-files delete-old-dirs
|
|
|
|
@echo "To remove old libraries run '${MAKE} delete-old-libs'."
|
|
|
|
|
|
|
|
check-old: check-old-files check-old-libs check-old-dirs
|
|
|
|
@echo "To remove old files and directories run '${MAKE} delete-old'."
|
|
|
|
@echo "To remove old libraries run '${MAKE} delete-old-libs'."
|
|
|
|
|
2005-07-30 18:02:20 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-18 14:30:23 +00:00
|
|
|
#
|
|
|
|
# showconfig - show build configuration.
|
|
|
|
#
|
|
|
|
showconfig:
|
|
|
|
@${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
|