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:
|
2003-11-16 21:17:43 +00:00
|
|
|
# -DNO_DYNAMICROOT do not link /bin and /sbin dynamically
|
2003-05-05 08:44:40 +00:00
|
|
|
# -DNO_KERBEROS Do not build Heimdal (Kerberos 5)
|
2003-07-14 16:21:16 +00:00
|
|
|
# -DNO_RESCUE do not build rescue binaries
|
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 10:16:04 +00:00
|
|
|
# -DNO_CRYPT will prevent building of crypt versions
|
2004-12-21 08:47:35 +00:00
|
|
|
# -DNO_MAN do not build the manual pages
|
2005-02-28 07:16:39 +00:00
|
|
|
# -DNO_NLS do not build Native Language Support files
|
2004-12-21 09:33:47 +00:00
|
|
|
# -DNO_PROFILE do not build profiled libraries
|
2004-12-21 10:36:54 +00:00
|
|
|
# -DNO_GAMES do not go into games subdir
|
2004-12-21 12:13:23 +00:00
|
|
|
# -DNO_SHARE do not go into share subdir
|
2004-12-21 09:33:47 +00:00
|
|
|
# -DNO_INFO do not make or install info files
|
2004-12-21 09:00:26 +00:00
|
|
|
# -DNO_LIBC_R do not build libc_r.
|
1999-05-03 17:54:59 +00:00
|
|
|
# -DNO_FORTRAN do not build g77 and related libraries.
|
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
|
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
|
|
|
# TARGET_ARCH="arch" to crossbuild world to a different arch
|
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"
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
#
|
2003-12-09 00:42:44 +00:00
|
|
|
# We must do lib and libexec before bin, because if installworld
|
|
|
|
# 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
|
|
|
#
|
|
|
|
# We must do etc last for install/distribute to work.
|
|
|
|
#
|
|
|
|
SUBDIR= share/info include lib libexec bin
|
2004-12-21 10:36:54 +00:00
|
|
|
.if !defined(NO_GAMES)
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=games
|
2001-12-06 07:44:47 +00:00
|
|
|
.endif
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=gnu
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=kerberos5
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
2004-02-13 21:52:08 +00:00
|
|
|
.if !defined(NO_RESCUE)
|
|
|
|
SUBDIR+=rescue
|
1998-08-31 01:08:08 +00:00
|
|
|
.endif
|
2004-02-13 21:52:08 +00:00
|
|
|
SUBDIR+=sbin
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_CRYPT)
|
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
|
2004-08-16 18:17:14 +00:00
|
|
|
SUBDIR+=sys usr.bin usr.sbin 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!
|
2001-11-13 15:47:40 +00:00
|
|
|
SUP?= /usr/local/bin/cvsup
|
1998-08-31 01:08:08 +00:00
|
|
|
SUPFLAGS?= -g -L 2 -P -
|
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
|
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
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
2002-04-11 13:43:50 +00:00
|
|
|
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
|
2001-10-25 07:28:55 +00:00
|
|
|
TARGET?= ${MACHINE}
|
2002-08-02 18:04:22 +00:00
|
|
|
TARGET_CPUTYPE?=${CPUTYPE}
|
2002-04-11 13:43:50 +00:00
|
|
|
.else
|
|
|
|
TARGET?= ${TARGET_ARCH}
|
2002-07-31 03:56:03 +00:00
|
|
|
TARGET_CPUTYPE?=
|
2002-04-11 13:43:50 +00:00
|
|
|
.endif
|
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)
|
1999-12-10 10:48:20 +00:00
|
|
|
BUILD_ARCH!= sysctl -n hw.machine_arch
|
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} \
|
2005-02-28 07:16:39 +00:00
|
|
|
-DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_NLS -DNO_PIC \
|
|
|
|
-DNO_PROFILE -DNO_SHARED -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 \
|
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
|
2003-04-30 12:38:20 +00:00
|
|
|
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_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
|
|
|
|
|
|
|
|
LIB32PREFLAGS= -m32 -march=athlon-xp -msse2 -mfancy-math-387 -DCOMPAT_32BIT
|
|
|
|
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 \
|
2005-02-28 07:16:39 +00:00
|
|
|
-DNO_BIND -DNO_MAN -DNO_NLS -DNO_INFO -DNO_HTML \
|
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
|
|
|
|
.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}
|
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}
|
2002-04-11 14:49:32 +00:00
|
|
|
.else
|
2003-04-06 23:46:02 +00:00
|
|
|
rm -rf ${WORLDTMP}/legacy/usr/include
|
2002-04-11 14:49:32 +00:00
|
|
|
# XXX - These two can depend on any header file.
|
|
|
|
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}
|
2004-09-27 08:23:43 +00:00
|
|
|
.if defined(WITH_BIND_LIBS) && !defined(NO_BIND)
|
|
|
|
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-/}
|
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}; \
|
2005-02-28 07:16:39 +00:00
|
|
|
${WMAKE} -DNO_FSCHG -DNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN \
|
|
|
|
-DNO_NLS -DNO_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
|
|
|
|
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
|
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}
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_CRYPT)
|
2004-11-06 03:14:26 +00:00
|
|
|
cd ${.CURDIR}/secure/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
.endif
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
|
2004-11-15 05:59:10 +00:00
|
|
|
cd ${.CURDIR}/kerberos5/lib; \
|
|
|
|
${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
|
|
|
|
.endif
|
2004-11-06 03:14:26 +00:00
|
|
|
.endfor
|
2004-12-01 23:23:14 +00:00
|
|
|
.for _dir in usr.sbin/pcvt/keycap usr.bin/lex/lib
|
|
|
|
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
|
|
|
|
cd ${.CURDIR}/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
|
|
|
|
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_CRYPT)
|
2005-06-16 18:16:14 +00:00
|
|
|
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
|
2004-11-06 03:14:26 +00:00
|
|
|
.endif
|
2005-06-16 18:16:14 +00:00
|
|
|
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} ${.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
|
2005-04-06 01:55:43 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
|
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
|
|
|
|
|
|
|
buildworld: ${WMAKE_TGTS}
|
|
|
|
.ORDER: ${WMAKE_TGTS}
|
1998-08-31 01:08:08 +00:00
|
|
|
|
2005-02-26 22:02:18 +00:00
|
|
|
buildenv:
|
|
|
|
@echo Entering world for ${TARGET_ARCH}:${TARGET}
|
|
|
|
@cd ${.CURDIR} && env ${WMAKEENV} sh || true
|
|
|
|
|
2004-04-13 13:42:01 +00:00
|
|
|
TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything}
|
|
|
|
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
|
|
|
#
|
|
|
|
# Use this to add checks to installworld/installkernel targets.
|
|
|
|
#
|
|
|
|
SPECIAL_INSTALLCHECKS=
|
|
|
|
|
2002-04-20 19:04:59 +00:00
|
|
|
#
|
|
|
|
# installcheck
|
|
|
|
#
|
|
|
|
# Checks to be sure system is ready for installworld
|
|
|
|
#
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS=
|
|
|
|
CHECK_GIDS=
|
2002-04-20 19:04:59 +00:00
|
|
|
.if !defined(NO_SENDMAIL)
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS+= smmsp
|
|
|
|
CHECK_GIDS+= smmsp
|
2002-04-20 19:04:59 +00:00
|
|
|
.endif
|
2004-03-10 16:34:11 +00:00
|
|
|
.if !defined(NO_PF)
|
2004-03-12 13:20:24 +00:00
|
|
|
CHECK_UIDS+= proxy
|
|
|
|
CHECK_GIDS+= proxy authpf
|
|
|
|
.endif
|
|
|
|
installcheck: ${SPECIAL_INSTALLCHECKS}
|
|
|
|
.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 \
|
2002-05-27 15:51:38 +00:00
|
|
|
ln 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.
|
|
|
|
#
|
2004-03-03 19:36:20 +00:00
|
|
|
reinstall: ${SPECIAL_INSTALLCHECKS}
|
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
|
2005-04-06 01:55:43 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
|
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
|
2005-06-16 18:16:14 +00:00
|
|
|
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
|
|
|
|
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
|
|
|
|
.endif
|
2000-11-21 04:37:30 +00:00
|
|
|
|
2005-02-27 12:11:35 +00:00
|
|
|
distribution:
|
|
|
|
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} distribution
|
|
|
|
|
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 "--------------------------------------------------------------"
|
2001-11-15 07:04:23 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; \
|
2003-03-03 08:50:32 +00:00
|
|
|
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${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 "--------------------------------------------------------------"
|
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; \
|
|
|
|
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj
|
|
|
|
@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 "--------------------------------------------------------------"
|
2000-06-15 10:00:20 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; \
|
2002-11-03 23:48:14 +00:00
|
|
|
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} 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 "--------------------------------------------------------------"
|
2000-06-15 10:00:20 +00:00
|
|
|
cd ${KRNLOBJDIR}/${_kernel}; \
|
2002-11-03 23:48:14 +00:00
|
|
|
${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} 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 \
|
|
|
|
reinstallkernel reinstallkernel.debug: ${SPECIAL_INSTALLCHECKS}
|
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 ">>> Making hierarchy"
|
|
|
|
@echo "--------------------------------------------------------------"
|
|
|
|
cd ${.CURDIR}; \
|
|
|
|
${CROSSENV} PATH=${TMPPATH} ${MAKE} -f Makefile.inc1 hierarchy
|
|
|
|
@echo
|
|
|
|
@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
|
|
|
|
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
|
|
|
|
#
|
2004-12-21 10:36:54 +00:00
|
|
|
.if !defined(NO_GAMES)
|
2003-04-06 21:33:49 +00:00
|
|
|
_strfile= games/fortune/strfile
|
|
|
|
.endif
|
|
|
|
|
2003-05-31 21:29:38 +00:00
|
|
|
.if !defined(NO_CXX)
|
2005-02-27 11:22:58 +00:00
|
|
|
_gperf= gnu/usr.bin/gperf
|
2003-05-01 20:41:03 +00:00
|
|
|
.if ${BOOTSTRAPPING} < 500113
|
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
|
|
|
|
|
2003-07-14 16:21:16 +00:00
|
|
|
.if !defined(NO_RESCUE) && \
|
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 \
|
|
|
|
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
|
|
|
|
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
|
2004-01-31 08:15:57 +00:00
|
|
|
_kerberos5_tools= kerberos5/tools
|
1999-12-30 10:31:21 +00:00
|
|
|
.endif
|
|
|
|
|
2004-02-13 21:52:08 +00:00
|
|
|
.if !defined(NO_RESCUE)
|
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-02-19 10:23:34 +00:00
|
|
|
.if (${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386") && \
|
|
|
|
${TARGET_ARCH} != ${MACHINE_ARCH}
|
2003-07-01 12:57:53 +00:00
|
|
|
_btxld= usr.sbin/btxld
|
|
|
|
.endif
|
|
|
|
|
2005-02-27 11:22:58 +00:00
|
|
|
.if (!defined(NO_RESCUE) || defined(RELEASEDIR)) && \
|
|
|
|
${TARGET_ARCH} != ${MACHINE_ARCH}
|
2003-07-01 12:25:11 +00:00
|
|
|
_crunchide= usr.sbin/crunch/crunchide
|
|
|
|
.endif
|
|
|
|
|
2003-07-01 12:57:53 +00:00
|
|
|
.if ${TARGET_ARCH} == "alpha" && ${TARGET_ARCH} != ${MACHINE_ARCH}
|
|
|
|
_elf2exe= usr.sbin/elf2exe
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${TARGET_ARCH} == "i386" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \
|
|
|
|
defined(RELEASEDIR)
|
|
|
|
_kgzip= usr.sbin/kgzip
|
|
|
|
.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} \
|
|
|
|
${_elf2exe} \
|
|
|
|
${_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
|
|
|
|
|
2003-06-14 17:50:13 +00:00
|
|
|
_prebuild_libs=
|
2003-09-15 21:18:30 +00:00
|
|
|
|
2002-04-16 14:38:15 +00:00
|
|
|
_generic_libs= gnu/lib
|
1998-11-20 02:03:52 +00:00
|
|
|
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
|
2002-04-12 19:46:25 +00:00
|
|
|
_prebuild_libs+= kerberos5/lib/libasn1
|
|
|
|
_prebuild_libs+= kerberos5/lib/libgssapi
|
|
|
|
_prebuild_libs+= kerberos5/lib/libkrb5
|
|
|
|
_prebuild_libs+= kerberos5/lib/libroken
|
|
|
|
_generic_libs+= kerberos5/lib
|
|
|
|
.endif
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2003-05-18 00:40:22 +00:00
|
|
|
_prebuild_libs+= lib/libcom_err lib/libcrypt lib/libexpat \
|
2003-05-17 23:07:09 +00:00
|
|
|
lib/libkvm lib/libmd \
|
2003-11-12 17:09:13 +00:00
|
|
|
lib/libncurses lib/libnetgraph lib/libopie lib/libpam \
|
2004-05-12 07:02:17 +00:00
|
|
|
lib/libradius \
|
2004-11-13 20:40:32 +00:00
|
|
|
lib/libsbuf lib/libtacplus lib/libutil \
|
2002-07-01 17:51:43 +00:00
|
|
|
lib/libz lib/msun
|
|
|
|
|
2004-04-27 15:00:29 +00:00
|
|
|
lib/libopie__L lib/libtacplus__L: lib/libmd__L
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2004-09-21 19:01:48 +00:00
|
|
|
.if !defined(NO_BIND)
|
2004-09-21 21:47:05 +00:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
|
|
|
|
_prebuild_libs+= lib/libc_r
|
|
|
|
.else
|
2004-09-21 19:01:48 +00:00
|
|
|
_prebuild_libs+= lib/libpthread
|
2004-09-21 21:47:05 +00:00
|
|
|
.endif
|
2004-09-21 19:01:48 +00:00
|
|
|
.endif
|
|
|
|
|
2002-04-16 14:38:15 +00:00
|
|
|
_generic_libs+= lib
|
|
|
|
|
2004-12-21 10:16:04 +00:00
|
|
|
.if !defined(NO_CRYPT)
|
2002-06-06 13:45:46 +00:00
|
|
|
.if !defined(NO_OPENSSL)
|
|
|
|
_prebuild_libs+= secure/lib/libcrypto secure/lib/libssl
|
2004-04-27 15:00:29 +00:00
|
|
|
lib/libradius__L: secure/lib/libssl__L
|
2004-05-13 07:51:47 +00:00
|
|
|
secure/lib/libssl__L: secure/lib/libcrypto__L
|
2002-06-21 08:54:03 +00:00
|
|
|
.if !defined(NO_OPENSSH)
|
2002-04-12 19:46:25 +00:00
|
|
|
_prebuild_libs+= 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
|
|
|
|
.if !defined(NO_KERBEROS)
|
|
|
|
secure/lib/libssh__L: kerberos5/lib/libgssapi__L kerberos5/lib/libkrb5__L \
|
|
|
|
kerberos5/lib/libasn1__L lib/libcom_err__L lib/libmd__L \
|
|
|
|
kerberos5/lib/libroken__L
|
|
|
|
.endif
|
1999-12-17 11:23:56 +00:00
|
|
|
.endif
|
2002-06-21 08:54:03 +00:00
|
|
|
.endif
|
2002-04-12 19:46:25 +00:00
|
|
|
_generic_libs+= secure/lib
|
2002-04-16 14:38:15 +00:00
|
|
|
.endif
|
1999-12-17 11:23:56 +00:00
|
|
|
|
2004-12-21 10:16:04 +00:00
|
|
|
.if defined(NO_CRYPT) || defined(NO_OPENSSL)
|
2004-04-27 15:00:29 +00:00
|
|
|
lib/libradius__L: lib/libmd__L
|
|
|
|
.endif
|
|
|
|
|
2004-11-13 20:40:32 +00:00
|
|
|
.if !defined(NO_NIS)
|
|
|
|
_prebuild_libs+= lib/libypclnt
|
|
|
|
.endif
|
|
|
|
|
2002-04-12 19:46:25 +00:00
|
|
|
_generic_libs+= usr.bin/lex/lib
|
2002-04-16 14:38:15 +00:00
|
|
|
|
2002-04-12 19:46:25 +00:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
_generic_libs+= usr.sbin/pcvt/keycap
|
2000-11-20 02:17:34 +00:00
|
|
|
.endif
|
|
|
|
|
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})
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> ${_lib} (depend,all,install)"; \
|
2002-08-23 12:49:16 +00:00
|
|
|
cd ${.CURDIR}/${_lib}; \
|
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
|
2004-09-07 15:19:40 +00:00
|
|
|
${_+_}@${ECHODIR} "===> lib/libpam (depend,all,install)"; \
|
2002-11-14 19:24:51 +00:00
|
|
|
cd ${.CURDIR}/lib/libpam; \
|
|
|
|
${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>
|