Skip to content
This repository
Browse code

first commit - FreeBSD 8.0 original source.

  • Loading branch information...
commit d87002eddac7bfac8ff7190c40b333ff2bed989f 0 parents
authored March 22, 2010

Showing 92 changed files with 45,016 additions and 0 deletions. Show diff stats Hide diff stats

  1. 126  COPYRIGHT
  2. 13  LOCKS
  3. 140  MAINTAINERS
  4. 347  Makefile
  5. 1,421  Makefile.inc1
  6. 5,102  ObsoleteFiles.inc
  7. 87  README
  8. 1,690  UPDATING
  9. 58  sys/Makefile
  10. 39  sys/amd64/Makefile
  11. 33  sys/amd64/acpica/Makefile
  12. 71  sys/amd64/acpica/OsdEnvironment.c
  13. 140  sys/amd64/acpica/acpi_machdep.c
  14. 190  sys/amd64/acpica/acpi_switch.S
  15. 286  sys/amd64/acpica/acpi_wakecode.S
  16. 421  sys/amd64/acpica/acpi_wakeup.c
  17. 6  sys/amd64/acpica/genwakecode.sh
  18. 9  sys/amd64/acpica/genwakedata.sh
  19. 788  sys/amd64/acpica/madt.c
  20. 720  sys/amd64/amd64/amd64_mem.c
  21. 253  sys/amd64/amd64/apic_vector.S
  22. 49  sys/amd64/amd64/atomic.c
  23. 132  sys/amd64/amd64/autoconf.c
  24. 95  sys/amd64/amd64/bios.c
  25. 521  sys/amd64/amd64/bpf_jit_machdep.c
  26. 449  sys/amd64/amd64/bpf_jit_machdep.h
  27. 1,198  sys/amd64/amd64/busdma_machdep.c
  28. 424  sys/amd64/amd64/cpu_switch.S
  29. 1,510  sys/amd64/amd64/db_disasm.c
  30. 149  sys/amd64/amd64/db_interface.c
  31. 696  sys/amd64/amd64/db_trace.c
  32. 363  sys/amd64/amd64/dump_machdep.c
  33. 272  sys/amd64/amd64/elf_machdep.c
  34. 803  sys/amd64/amd64/exception.S
  35. 577  sys/amd64/amd64/fpu.c
  36. 117  sys/amd64/amd64/gdb_machdep.c
  37. 250  sys/amd64/amd64/genassym.c
  38. 659  sys/amd64/amd64/identcpu.c
  39. 241  sys/amd64/amd64/in_cksum.c
  40. 174  sys/amd64/amd64/initcpu.c
  41. 536  sys/amd64/amd64/intr_machdep.c
  42. 78  sys/amd64/amd64/io.c
  43. 896  sys/amd64/amd64/io_apic.c
  44. 322  sys/amd64/amd64/legacy.c
  45. 1,390  sys/amd64/amd64/local_apic.c
  46. 88  sys/amd64/amd64/locore.S
  47. 2,364  sys/amd64/amd64/machdep.c
  48. 529  sys/amd64/amd64/mca.c
  49. 223  sys/amd64/amd64/mem.c
  50. 405  sys/amd64/amd64/minidump_machdep.c
  51. 1,442  sys/amd64/amd64/mp_machdep.c
  52. 211  sys/amd64/amd64/mp_watchdog.c
  53. 236  sys/amd64/amd64/mpboot.S
  54. 1,042  sys/amd64/amd64/mptable.c
  55. 200  sys/amd64/amd64/mptable_pci.c
  56. 602  sys/amd64/amd64/msi.c
  57. 692  sys/amd64/amd64/nexus.c
  58. 4,771  sys/amd64/amd64/pmap.c
  59. 400  sys/amd64/amd64/prof_machdep.c
  60. 56  sys/amd64/amd64/sigtramp.S
  61. 87  sys/amd64/amd64/stack_machdep.c
  62. 763  sys/amd64/amd64/support.S
  63. 683  sys/amd64/amd64/sys_machdep.c
  64. 1,082  sys/amd64/amd64/trap.c
  65. 231  sys/amd64/amd64/tsc.c
  66. 120  sys/amd64/amd64/uio_machdep.c
  67. 88  sys/amd64/amd64/uma_machdep.c
  68. 631  sys/amd64/amd64/vm_machdep.c
  69. 1  sys/amd64/conf/.cvsignore
  70. 23  sys/amd64/conf/DEFAULTS
  71. 320  sys/amd64/conf/GENERIC
  72. 29  sys/amd64/conf/GENERIC.hints
  73. 3  sys/amd64/conf/Makefile
  74. 505  sys/amd64/conf/NOTES
  75. 161  sys/amd64/conf/XENHVM
  76. 74  sys/amd64/ia32/ia32_exception.S
  77. 71  sys/amd64/ia32/ia32_misc.c
  78. 232  sys/amd64/ia32/ia32_reg.c
  79. 758  sys/amd64/ia32/ia32_signal.c
  80. 80  sys/amd64/ia32/ia32_sigtramp.S
  81. 279  sys/amd64/ia32/ia32_syscall.c
  82. 46  sys/amd64/include/_bus.h
  83. 220  sys/amd64/include/_inttypes.h
  84. 92  sys/amd64/include/_limits.h
  85. 171  sys/amd64/include/_stdint.h
  86. 117  sys/amd64/include/_types.h
  87. 81  sys/amd64/include/acpica_machdep.h
  88. 442  sys/amd64/include/apicreg.h
  89. 230  sys/amd64/include/apicvar.h
  90. 91  sys/amd64/include/asm.h
  91. 203  sys/amd64/include/asmacros.h
126  COPYRIGHT
... ...
@@ -0,0 +1,126 @@
13  LOCKS
... ...
@@ -0,0 +1,13 @@
  1
+$FreeBSD: src/LOCKS,v 1.5.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
  2
+
  3
+This file documents formal review/approval requirements that have been
  4
+approved by core.
  5
+
  6
+subsystem       login   expires  notes
  7
+--------------------------------------
  8
+
  9
+Special cases:
  10
+releng/4.*	Requires Security Officer approval.
  11
+releng/5.*	Requires Security Officer approval.
  12
+releng/6.*	Requires Security Officer approval.
  13
+releng/7.*	Requires Security Officer approval.
140  MAINTAINERS
... ...
@@ -0,0 +1,140 @@
  1
+$FreeBSD: src/MAINTAINERS,v 1.154.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
  2
+
  3
+Please note that the content of this file is strictly advisory.
  4
+No locks listed here are valid.  The only strict review requirements
  5
+are granted by core.  These are documented in head/LOCKS and enforced
  6
+by CVSROOT/approvers.
  7
+
  8
+The source tree is a community effort.  However, some folks go to the
  9
+trouble of looking after particular areas of the tree.  In return for
  10
+their active caretaking of the code it is polite to coordinate changes
  11
+with them.  This is a list of people who have expressed an interest in
  12
+part of the code or listed their active caretaking role so that other
  13
+committers can easily find somebody who is familiar with it.  The notes
  14
+should specify if there is a 3rd party source tree involved or other
  15
+things that should be kept in mind.
  16
+
  17
+However, this is not a 'big stick', it is an offer to help and a source
  18
+of guidance.  It does not override the communal nature of the tree.
  19
+It is not a registry of 'turf' or private property.
  20
+
  21
+subsystem	login	notes
  22
+-----------------------------
  23
+kqueue		jmg	Pre-commit review requested.
  24
+mergemaster	dougb	Prefers to pre-approve commits
  25
+libc/posix1e	rwatson	Pre-commit review requested.
  26
+POSIX.1e ACLs	rwatson	Pre-commit review requested.
  27
+UFS EAs		rwatson	Pre-commit review requested.
  28
+MAC Framework	rwatson	Pre-commit review requested.
  29
+MAC Modules	rwatson	Pre-commit review requested.
  30
+contrib/openbsm	rwatson	Pre-commit review requested.
  31
+sys/security/audit	rwatson	Pre-commit review requested.
  32
+ahc(4)		gibbs	Pre-commit review requested.
  33
+ahd(4)		gibbs	Pre-commit review requested.
  34
+NEWCARD		imp	Pre-commit review requested.
  35
+pci bus		imp,jhb	Pre-commit review requested.
  36
+cdboot		jhb	Pre-commit review requested.
  37
+pxeboot		jhb	Pre-commit review requested.
  38
+witness		jhb	Pre-commit review requested.
  39
+twe		aradford@amcc.com	Pre-commit review requested
  40
+twa		aradford@amcc.com	Pre-commit review requested
  41
+CAM		gibbs,
  42
+		ken	Pre-commit review requested. send to scsi@freebsd.org
  43
+devstat(9)	ken	Pre-commit review requested.
  44
+camcontrol(8)	ken	Pre-commit review requested.
  45
+libcam		ken	Pre-commit review requested.
  46
+libdevstat	ken	Pre-commit review requested.
  47
+iostat(8)	ken	Pre-commit review requested.
  48
+cd(4)		ken	Pre-commit review requested.
  49
+pass(4)		ken	Pre-commit review requested.
  50
+ch(4)		ken	Pre-commit review requested.
  51
+isp(4)		mjacob	Pre-commit review requested.
  52
+em(4)		jfv	Pre-commit review requested.
  53
+tdfx(4)		cokane  Just keep me informed of changes, try not to break it.
  54
+sendmail	gshapiro	Pre-commit review requested.
  55
+etc/mail	gshapiro	Pre-commit review requested.
  56
+				Keep in sync with -STABLE.
  57
+etc/sendmail	gshapiro	Pre-commit review requested.
  58
+				Keep in sync with -STABLE.
  59
+libfetch	des	Advance notification requested.
  60
+fetch		des	Advance notification requested.
  61
+libpam		des	Pre-commit review requested.
  62
+openssh		des	Pre-commit review requested.
  63
+pseudofs	des	Advance notification requested.
  64
+procfs		des	Advance notification requested.
  65
+linprocfs	des	Advance notification requested.
  66
+lpr		gad	Pre-commit review requested, particularly for
  67
+			lpd/recvjob.c and lpd/printjob.c.
  68
+newsyslog(8)	gad	Heads-up appreciated.  I'm going thru the PR's for it.
  69
+pkill		gad	Heads-up appreciated.
  70
+ps		gad	I am working on a number of changes to this.  Would
  71
+			like advance notice of major changes planned to it.
  72
+cvs		peter	Heads-up appreciated, try not to break it.
  73
+nvi		peter	Try not to break it.
  74
+libz		peter	Try not to break it.
  75
+groff		ru	Recommends pre-commit review.
  76
+share/mk	ru	This is a vital component of the build system, so I
  77
+			offer a pre-commit review for anything non-trivial.
  78
+ipfw		ipfw	Pre-commit review preferred. send to ipfw@freebsd.org
  79
+drm		rnoland	Just keep me informed of changes, try not to break it.
  80
+libufs		jmallett	Willing to handle problems, help with work.
  81
+fdc(4)		joerg	Just keep me informed of changes, try not to break it.
  82
+sppp(4)		joerg	Just keep me informed of changes, try not to break it.
  83
+unifdef(1)	fanf	Pre-commit review requested.
  84
+ntp         	roberto	Pre-commit review requested.
  85
+inetd		dwmalone	Recommends pre-commit review.
  86
+nwfs		bp	In case of functional changes pre-commit review
  87
+			requested.
  88
+contrib/smbfs	bp	Open for in-tree committs. In case of functional
  89
+			changes pre-commit review requested.
  90
+contrib/pf	mlaier	Pre-commit review requested.
  91
+binutils	obrien	Insists on BU blocked from unapproved commits
  92
+file		obrien	Insists to keep file blocked from other's unapproved
  93
+			commits
  94
+contrib/bzip2	obrien	Pre-commit review required.
  95
+lukemftpd	obrien	Pre-commit review required.
  96
+geom_concat	pjd	Pre-commit review preferred.
  97
+geom_eli	pjd	Pre-commit review preferred.
  98
+geom_gate	pjd	Pre-commit review preferred.
  99
+geom_label	pjd	Pre-commit review preferred.
  100
+geom_mirror	pjd	Pre-commit review preferred.
  101
+geom_nop	pjd	Pre-commit review preferred.
  102
+geom_raid3	pjd	Pre-commit review preferred.
  103
+geom_shsec	pjd	Pre-commit review preferred.
  104
+geom_stripe	pjd	Pre-commit review preferred.
  105
+geom_zero	pjd	Pre-commit review preferred.
  106
+sbin/geom	pjd	Pre-commit review preferred.
  107
+zfs		pjd	Pre-commit review preferred.
  108
+nfs		alfred	Will be happy to review code, but not mandatory.
  109
+rpc.lockd	alfred	Will be happy to review code, but not mandatory.
  110
+truss		alfred	Will be happy to review code, but not mandatory.
  111
+rpc		alfred	Pre-commit review requested.
  112
+xfs		kan@FreeBSD.org,rodrigc@FreeBSD.org,cattelan@xfs.org
  113
+			Pre-commit review preferred.
  114
+pkg_install	portmgr	Pre-commit review or approval from portmgr@ requested.
  115
+linux emul	emulation	Please discuss changes here.
  116
+bs{diff,patch}	cperciva	Pre-commit review requested.
  117
+portsnap	cperciva	Pre-commit review requested.
  118
+freebsd-update	cperciva	Pre-commit review requested.
  119
+openssl		simon		Pre-commit review requested.
  120
+sys/netgraph/bluetooth	emax	Pre-commit review preferred.
  121
+lib/libbluetooth	emax	Pre-commit review preferred.
  122
+lib/libsdp		emax	Pre-commit review preferred.
  123
+usr.bin/bluetooth	emax	Pre-commit review preferred.
  124
+usr.sbin/bluetooth	emax	Pre-commit review preferred.
  125
+gnu/usr.bin/send-pr	bugmaster	Pre-commit review requested.
  126
+ncurses		rafan	Heads-up appreciated, try not to break it.
  127
+
  128
+Following are the entries from the Makefiles, and a few other sources.
  129
+Please remove stale entries from both their origin, and this file.
  130
+
  131
+Please also consider removing the lines from the files listed below and
  132
+stating your preferences here instead.
  133
+
  134
+List below generated with:
  135
+$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ <tab>]*='
  136
+
  137
+sys/modules/3dfx/Makefile:MAINTAINER=	cokane@FreeBSD.org
  138
+sys/modules/urio/Makefile:MAINTAINER=	Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
  139
+tools/tools/sysdoc/Makefile:MAINTAINER=	trhodes@FreeBSD.org
  140
+usr.sbin/zic/Makefile:MAINTAINER=	wollman@FreeBSD.org
347  Makefile
... ...
@@ -0,0 +1,347 @@
  1
+#
  2
+# $FreeBSD: src/Makefile,v 1.358.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
  3
+#
  4
+# The user-driven targets are:
  5
+#
  6
+# universe            - *Really* build *everything* (buildworld and
  7
+#                       all kernels on all architectures).
  8
+# buildworld          - Rebuild *everything*, including glue to help do
  9
+#                       upgrades.
  10
+# installworld        - Install everything built by "buildworld".
  11
+# world               - buildworld + installworld, no kernel.
  12
+# buildkernel         - Rebuild the kernel and the kernel-modules.
  13
+# installkernel       - Install the kernel and the kernel-modules.
  14
+# installkernel.debug
  15
+# reinstallkernel     - Reinstall the kernel and the kernel-modules.
  16
+# reinstallkernel.debug
  17
+# kernel              - buildkernel + installkernel.
  18
+# doxygen             - Build API documentation of the kernel, needs doxygen.
  19
+# update              - Convenient way to update your source tree (cvs).
  20
+# check-old           - List obsolete directories/files/libraries.
  21
+# check-old-dirs      - List obsolete directories.
  22
+# check-old-files     - List obsolete files.
  23
+# check-old-libs      - List obsolete libraries.
  24
+# delete-old          - Delete obsolete directories/files/libraries.
  25
+# delete-old-dirs     - Delete obsolete directories.
  26
+# delete-old-files    - Delete obsolete files.
  27
+# delete-old-libs     - Delete obsolete libraries.
  28
+#
  29
+# This makefile is simple by design. The FreeBSD make automatically reads
  30
+# the /usr/share/mk/sys.mk unless the -m argument is specified on the
  31
+# command line. By keeping this makefile simple, it doesn't matter too
  32
+# much how different the installed mk files are from those in the source
  33
+# tree. This makefile executes a child make process, forcing it to use
  34
+# the mk files from the source tree which are supposed to DTRT.
  35
+#
  36
+# The user-driven targets (as listed above) are implemented in Makefile.inc1.
  37
+#
  38
+# If you want to build your system from source be sure that /usr/obj has
  39
+# at least 800MB of diskspace available.
  40
+#
  41
+# For individuals wanting to build from the sources currently on their
  42
+# system, the simple instructions are:
  43
+#
  44
+# 1.  `cd /usr/src'  (or to the directory containing your source tree).
  45
+# 2.  Define `HISTORICAL_MAKE_WORLD' variable (see README).
  46
+# 3.  `make world'
  47
+#
  48
+# For individuals wanting to upgrade their sources (even if only a
  49
+# delta of a few days):
  50
+#
  51
+#  1.  `cd /usr/src'       (or to the directory containing your source tree).
  52
+#  2.  `make buildworld'
  53
+#  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE'     (default is GENERIC).
  54
+#  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
  55
+#       [steps 3. & 4. can be combined by using the "kernel" target]
  56
+#  5.  `reboot'        (in single user mode: boot -s from the loader prompt).
  57
+#  6.  `mergemaster -p'
  58
+#  7.  `make installworld'
  59
+#  8.  `make delete-old'
  60
+#  9.  `mergemaster'                         (you may wish to use -U or -ai).
  61
+# 10.  `reboot'
  62
+# 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)
  63
+#
  64
+# See src/UPDATING `COMMON ITEMS' for more complete information.
  65
+#
  66
+# If TARGET=machine (e.g. ia64, sparc64, ...) is specified you can
  67
+# cross build world for other machine types using the buildworld target,
  68
+# and once the world is built you can cross build a kernel using the
  69
+# buildkernel target.
  70
+#
  71
+# Define the user-driven targets. These are listed here in alphabetical
  72
+# order, but that's not important.
  73
+#
  74
+# Targets that begin with underscore are internal targets intended for
  75
+# developer convenience only.  They are intentionally not documented and
  76
+# completely subject to change without notice.
  77
+#
  78
+# For more information, see the build(7) manual page.
  79
+#
  80
+TGTS=	all all-man buildenv buildenvvars buildkernel buildworld \
  81
+	check-old check-old-dirs check-old-files check-old-libs \
  82
+	checkdpadd clean cleandepend cleandir \
  83
+	delete-old delete-old-dirs delete-old-files delete-old-libs \
  84
+	depend distribute distributeworld distrib-dirs distribution doxygen \
  85
+	everything hierarchy install installcheck installkernel \
  86
+	installkernel.debug reinstallkernel reinstallkernel.debug \
  87
+	installworld kernel-toolchain libraries lint maninstall \
  88
+	obj objlink regress rerelease showconfig tags toolchain update \
  89
+	_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
  90
+	_build-tools _cross-tools _includes _libraries _depend \
  91
+	build32 distribute32 install32 xdev xdev-build xdev-install
  92
+TGTS+=	${SUBDIR_TARGETS}
  93
+
  94
+BITGTS=	files includes
  95
+BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
  96
+TGTS+=	${BITGTS}
  97
+
  98
+.ORDER: buildworld installworld
  99
+.ORDER: buildworld distributeworld
  100
+.ORDER: buildworld buildkernel
  101
+.ORDER: buildkernel installkernel
  102
+.ORDER: buildkernel installkernel.debug
  103
+.ORDER: buildkernel reinstallkernel
  104
+.ORDER: buildkernel reinstallkernel.debug
  105
+
  106
+PATH=	/sbin:/bin:/usr/sbin:/usr/bin
  107
+MAKEOBJDIRPREFIX?=	/usr/obj
  108
+_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
  109
+    ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
  110
+    -f /dev/null -V MAKEOBJDIRPREFIX dummy
  111
+.if !empty(_MAKEOBJDIRPREFIX)
  112
+.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
  113
+	(in make.conf(5)) or command-line variable.
  114
+.endif
  115
+MAKEPATH=	${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
  116
+BINMAKE= \
  117
+	`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
  118
+	-m ${.CURDIR}/share/mk
  119
+_MAKE=	PATH=${PATH} ${BINMAKE} -f Makefile.inc1
  120
+
  121
+#
  122
+# Make sure we have an up-to-date make(1). Only world and buildworld
  123
+# should do this as those are the initial targets used for upgrades.
  124
+# The user can define ALWAYS_CHECK_MAKE to have this check performed
  125
+# for all targets.
  126
+#
  127
+.if defined(ALWAYS_CHECK_MAKE)
  128
+${TGTS}: upgrade_checks
  129
+.else
  130
+buildworld: upgrade_checks
  131
+.endif
  132
+
  133
+#
  134
+# This 'cleanworld' target is not included in TGTS, because it is not a
  135
+# recursive target.  All of the work for it is done right here.   It is
  136
+# expected that BW_CANONICALOBJDIR == the CANONICALOBJDIR as would be
  137
+# created by bsd.obj.mk, except that we don't want to .include that file
  138
+# in this makefile.  
  139
+#
  140
+# In the following, the first 'rm' in a series will usually remove all
  141
+# files and directories.  If it does not, then there are probably some
  142
+# files with chflags set, so this unsets them and tries the 'rm' a
  143
+# second time.  There are situations where this target will be cleaning
  144
+# some directories via more than one method, but that duplication is
  145
+# needed to correctly handle all the possible situations.
  146
+#
  147
+BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
  148
+cleanworld:
  149
+.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
  150
+.if exists(${BW_CANONICALOBJDIR}/)
  151
+	-rm -rf ${BW_CANONICALOBJDIR}/*
  152
+	-chflags -R 0 ${BW_CANONICALOBJDIR}
  153
+	rm -rf ${BW_CANONICALOBJDIR}/*
  154
+.endif
  155
+	#   To be safe in this case, fall back to a 'make cleandir'
  156
+	${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
  157
+.else
  158
+	-rm -rf ${.OBJDIR}/*
  159
+	-chflags -R 0 ${.OBJDIR}
  160
+	rm -rf ${.OBJDIR}/*
  161
+.endif
  162
+
  163
+#
  164
+# Handle the user-driven targets, using the source relative mk files.
  165
+#
  166
+
  167
+${TGTS}:
  168
+	${_+_}@cd ${.CURDIR}; \
  169
+		${_MAKE} ${.TARGET}
  170
+
  171
+# Set a reasonable default
  172
+.MAIN:	all
  173
+
  174
+STARTTIME!= LC_ALL=C date
  175
+CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0
  176
+.if !empty(CHECK_TIME)
  177
+.error check your date/time: ${STARTTIME}
  178
+.endif
  179
+
  180
+.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
  181
+#
  182
+# world
  183
+#
  184
+# Attempt to rebuild and reinstall everything. This target is not to be
  185
+# used for upgrading an existing FreeBSD system, because the kernel is
  186
+# not included. One can argue that this target doesn't build everything
  187
+# then.
  188
+#
  189
+world: upgrade_checks
  190
+	@echo "--------------------------------------------------------------"
  191
+	@echo ">>> make world started on ${STARTTIME}"
  192
+	@echo "--------------------------------------------------------------"
  193
+.if target(pre-world)
  194
+	@echo
  195
+	@echo "--------------------------------------------------------------"
  196
+	@echo ">>> Making 'pre-world' target"
  197
+	@echo "--------------------------------------------------------------"
  198
+	${_+_}@cd ${.CURDIR}; ${_MAKE} pre-world
  199
+.endif
  200
+	${_+_}@cd ${.CURDIR}; ${_MAKE} buildworld
  201
+	${_+_}@cd ${.CURDIR}; ${_MAKE} -B installworld
  202
+.if target(post-world)
  203
+	@echo
  204
+	@echo "--------------------------------------------------------------"
  205
+	@echo ">>> Making 'post-world' target"
  206
+	@echo "--------------------------------------------------------------"
  207
+	${_+_}@cd ${.CURDIR}; ${_MAKE} post-world
  208
+.endif
  209
+	@echo
  210
+	@echo "--------------------------------------------------------------"
  211
+	@echo ">>> make world completed on `LC_ALL=C date`"
  212
+	@echo "                   (started ${STARTTIME})"
  213
+	@echo "--------------------------------------------------------------"
  214
+.else
  215
+world:
  216
+	@echo "WARNING: make world will overwrite your existing FreeBSD"
  217
+	@echo "installation without also building and installing a new"
  218
+	@echo "kernel.  This can be dangerous.  Please read the handbook,"
  219
+	@echo "'Rebuilding world', for how to upgrade your system."
  220
+	@echo "Define DESTDIR to where you want to install FreeBSD,"
  221
+	@echo "including /, to override this warning and proceed as usual."
  222
+	@echo ""
  223
+	@echo "Bailing out now..."
  224
+	@false
  225
+.endif
  226
+
  227
+#
  228
+# kernel
  229
+#
  230
+# Short hand for `make buildkernel installkernel'
  231
+#
  232
+kernel: buildkernel installkernel
  233
+
  234
+#
  235
+# Perform a few tests to determine if the installed tools are adequate
  236
+# for building the world.
  237
+#
  238
+upgrade_checks:
  239
+	@if ! (cd ${.CURDIR}/tools/build/make_check && \
  240
+	    PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \
  241
+	    PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \
  242
+	then \
  243
+	    (cd ${.CURDIR} && ${MAKE} make); \
  244
+	fi
  245
+
  246
+#
  247
+# Upgrade make(1) to the current version using the installed
  248
+# headers, libraries and tools.  Also, allow the location of
  249
+# the system bsdmake-like utility to be overridden.
  250
+#
  251
+MMAKEENV=	MAKEOBJDIRPREFIX=${MAKEPATH} \
  252
+		DESTDIR= \
  253
+		INSTALL="sh ${.CURDIR}/tools/install.sh"
  254
+MMAKE=		${MMAKEENV} ${MAKE} \
  255
+		-D_UPGRADING \
  256
+		-DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \
  257
+		-DNO_CPU_CFLAGS -DNO_WERROR
  258
+
  259
+make: .PHONY
  260
+	@echo
  261
+	@echo "--------------------------------------------------------------"
  262
+	@echo ">>> Building an up-to-date make(1)"
  263
+	@echo "--------------------------------------------------------------"
  264
+	${_+_}@cd ${.CURDIR}/usr.bin/make; \
  265
+		${MMAKE} obj && \
  266
+		${MMAKE} depend && \
  267
+		${MMAKE} all && \
  268
+		${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
  269
+
  270
+tinderbox:
  271
+	cd ${.CURDIR} && \
  272
+		DOING_TINDERBOX=YES ${MAKE} ${JFLAG} universe
  273
+
  274
+#
  275
+# universe
  276
+#
  277
+# Attempt to rebuild *everything* for all supported architectures,
  278
+# with a reasonable chance of success, regardless of how old your
  279
+# existing system is.
  280
+#
  281
+.if make(universe) || make(tinderbox)
  282
+TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
  283
+
  284
+.if defined(DOING_TINDERBOX)
  285
+FAILFILE=tinderbox.failed
  286
+MAKEFAIL=tee -a ${FAILFILE}
  287
+.else
  288
+MAKEFAIL=cat
  289
+.endif
  290
+
  291
+universe: universe_prologue
  292
+universe_prologue:
  293
+	@echo "--------------------------------------------------------------"
  294
+	@echo ">>> make universe started on ${STARTTIME}"
  295
+	@echo "--------------------------------------------------------------"
  296
+.if defined(DOING_TINDERBOX)
  297
+	rm -f ${FAILFILE}
  298
+.endif
  299
+.for target in ${TARGETS}
  300
+KERNCONFS!=	cd ${.CURDIR}/sys/${target}/conf && \
  301
+		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
  302
+		! -name DEFAULTS ! -name LINT
  303
+KERNCONFS:=	${KERNCONFS:S/^NOTES$/LINT/}
  304
+universe: universe_${target}
  305
+.ORDER: universe_prologue universe_${target} universe_epilogue
  306
+universe_${target}:
  307
+.if !defined(MAKE_JUST_KERNELS)
  308
+	@echo ">> ${target} started on `LC_ALL=C date`"
  309
+	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
  310
+	    ${MAKE} ${JFLAG} buildworld \
  311
+	    TARGET=${target} \
  312
+	    > _.${target}.buildworld 2>&1 || \
  313
+	    (echo "${target} world failed," \
  314
+	    "check _.${target}.buildworld for details" | ${MAKEFAIL}))
  315
+	@echo ">> ${target} buildworld completed on `LC_ALL=C date`"
  316
+.endif
  317
+.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
  318
+	@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
  319
+	    ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
  320
+	    (echo "${target} 'make LINT' failed," \
  321
+	    "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
  322
+.endif
  323
+.for kernel in ${KERNCONFS}
  324
+	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
  325
+	    ${MAKE} ${JFLAG} buildkernel \
  326
+	    TARGET=${target} \
  327
+	    KERNCONF=${kernel} \
  328
+	    > _.${target}.${kernel} 2>&1 || \
  329
+	    (echo "${target} ${kernel} kernel failed," \
  330
+	    "check _.${target}.${kernel} for details"| ${MAKEFAIL}))
  331
+.endfor
  332
+	@echo ">> ${target} completed on `LC_ALL=C date`"
  333
+.endfor
  334
+universe: universe_epilogue
  335
+universe_epilogue:
  336
+	@echo "--------------------------------------------------------------"
  337
+	@echo ">>> make universe completed on `LC_ALL=C date`"
  338
+	@echo "                      (started ${STARTTIME})"
  339
+	@echo "--------------------------------------------------------------"
  340
+.if defined(DOING_TINDERBOX)
  341
+	@if [ -e ${FAILFILE} ] ; then \
  342
+		echo "Tinderbox failed:" ;\
  343
+		cat ${FAILFILE} ;\
  344
+		exit 1 ;\
  345
+	fi
  346
+.endif
  347
+.endif
1,421  Makefile.inc1
... ...
@@ -0,0 +1,1421 @@
  1
+#
  2
+# $FreeBSD: src/Makefile.inc1,v 1.628.2.3.2.2 2009/11/09 23:55:49 kensmith Exp $
  3
+#
  4
+# Make command line options:
  5
+#	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
  6
+#	-DNO_CLEAN do not clean at all
  7
+#	-DNO_SHARE do not go into share subdir
  8
+#	-DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG
  9
+#	-DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
  10
+#	-DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
  11
+#	-DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
  12
+#	-DNO_PORTSUPDATE do not update ports in ${MAKE} update
  13
+#	-DNO_DOCUPDATE do not update doc in ${MAKE} update
  14
+#	-DNO_CTF do not run the DTrace CTF conversion tools on built objects
  15
+#	LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
  16
+#	TARGET="machine" to crossbuild world for a different machine type
  17
+
  18
+#
  19
+# The intended user-driven targets are:
  20
+# buildworld  - rebuild *everything*, including glue to help do upgrades
  21
+# installworld- install everything built by "buildworld"
  22
+# doxygen     - build API documentation of the kernel
  23
+# update      - convenient way to update your source tree (eg: cvsup/cvs)
  24
+#
  25
+# Standard targets (not defined here) are documented in the makefiles in
  26
+# /usr/share/mk.  These include:
  27
+#		obj depend all install clean cleandepend cleanobj
  28
+
  29
+.include <bsd.own.mk>
  30
+
  31
+.if ${MACHINE_ARCH} == "mips"
  32
+MK_RESCUE=no	# not yet
  33
+.endif
  34
+
  35
+# We must do share/info early so that installation of info `dir'
  36
+# entries works correctly.  Do it first since it is less likely to
  37
+# grow dependencies on include and lib than vice versa.
  38
+#
  39
+# We must do lib/ and libexec/ before bin/, because if installworld
  40
+# installs a new /bin/sh, the 'make' command will *immediately*
  41
+# use that new version.  And the new (dynamically-linked) /bin/sh
  42
+# will expect to find appropriate libraries in /lib and /libexec.
  43
+#
  44
+SUBDIR=	share/info lib libexec
  45
+SUBDIR+=bin
  46
+.if ${MK_GAMES} != "no"
  47
+SUBDIR+=games
  48
+.endif
  49
+.if ${MK_CDDL} != "no"
  50
+SUBDIR+=cddl
  51
+.else
  52
+NO_CTF=1
  53
+.endif
  54
+SUBDIR+=gnu include
  55
+.if ${MK_KERBEROS} != "no"
  56
+SUBDIR+=kerberos5
  57
+.endif
  58
+.if ${MK_RESCUE} != "no"
  59
+SUBDIR+=rescue
  60
+.endif
  61
+SUBDIR+=sbin
  62
+.if ${MK_CRYPT} != "no"
  63
+SUBDIR+=secure
  64
+.endif
  65
+.if !defined(NO_SHARE)
  66
+SUBDIR+=share
  67
+.endif
  68
+SUBDIR+=sys usr.bin usr.sbin
  69
+#
  70
+# We must do etc/ last for install/distribute to work.
  71
+#
  72
+SUBDIR+=etc
  73
+
  74
+# These are last, since it is nice to at least get the base system
  75
+# rebuilt before you do them.
  76
+.for _DIR in ${LOCAL_DIRS}
  77
+.if exists(${.CURDIR}/${_DIR}/Makefile)
  78
+SUBDIR+= ${_DIR}
  79
+.endif
  80
+.endfor
  81
+
  82
+.if defined(SUBDIR_OVERRIDE)
  83
+SUBDIR=		${SUBDIR_OVERRIDE}
  84
+.endif
  85
+
  86
+.if defined(NOCLEAN)
  87
+NO_CLEAN=	${NOCLEAN}
  88
+.endif
  89
+.if defined(NO_CLEANDIR)
  90
+CLEANDIR=	clean cleandepend
  91
+.else
  92
+CLEANDIR=	cleandir
  93
+.endif
  94
+
  95
+CVS?=		cvs
  96
+CVSFLAGS?=	-r RELENG_8_0 -P -d -I!
  97
+SVN?=		svn
  98
+SVNFLAGS?=	-r HEAD
  99
+SUP?=		/usr/bin/csup
  100
+SUPFLAGS?=	-g -L 2
  101
+.if defined(SUPHOST)
  102
+SUPFLAGS+=	-h ${SUPHOST}
  103
+.endif
  104
+
  105
+MAKEOBJDIRPREFIX?=	/usr/obj
  106
+.if !defined(OSRELDATE)
  107
+.if exists(/usr/include/osreldate.h)
  108
+OSRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
  109
+		/usr/include/osreldate.h
  110
+.else
  111
+OSRELDATE=	0
  112
+.endif
  113
+.endif
  114
+
  115
+.if !defined(VERSION)
  116
+VERSION!=	uname -srp
  117
+VERSION+=	${OSRELDATE}
  118
+.endif
  119
+
  120
+# Guess machine architecture from machine type, and vice versa.
  121
+.if !defined(TARGET_ARCH) && defined(TARGET)
  122
+TARGET_ARCH=	${TARGET:S/pc98/i386/:S/sun4v/sparc64/}
  123
+.elif !defined(TARGET) && defined(TARGET_ARCH) && \
  124
+    ${TARGET_ARCH} != ${MACHINE_ARCH}
  125
+TARGET=		${TARGET_ARCH}
  126
+.endif
  127
+# Otherwise, default to current machine type and architecture.
  128
+TARGET?=	${MACHINE}
  129
+TARGET_ARCH?=	${MACHINE_ARCH}
  130
+
  131
+KNOWN_ARCHES?=	amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v
  132
+.if ${TARGET} == ${TARGET_ARCH}
  133
+_t=		${TARGET}
  134
+.else
  135
+_t=		${TARGET_ARCH}/${TARGET}
  136
+.endif
  137
+.for _t in ${_t}
  138
+.if empty(KNOWN_ARCHES:M${_t})
  139
+.error Unknown target ${TARGET_ARCH}:${TARGET}.
  140
+.endif
  141
+.endfor
  142
+
  143
+.if ${TARGET} == ${MACHINE}
  144
+TARGET_CPUTYPE?=${CPUTYPE}
  145
+.else
  146
+TARGET_CPUTYPE?=
  147
+.endif
  148
+
  149
+.if !empty(TARGET_CPUTYPE)
  150
+_TARGET_CPUTYPE=${TARGET_CPUTYPE}
  151
+.else
  152
+_TARGET_CPUTYPE=dummy
  153
+.endif
  154
+_CPUTYPE!=	MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
  155
+		-f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
  156
+.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
  157
+.error CPUTYPE global should be set with ?=.
  158
+.endif
  159
+.if make(buildworld)
  160
+BUILD_ARCH!=	uname -p
  161
+.if ${MACHINE_ARCH} != ${BUILD_ARCH}
  162
+.error To cross-build, set TARGET_ARCH.
  163
+.endif
  164
+.endif
  165
+.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
  166
+OBJTREE=	${MAKEOBJDIRPREFIX}
  167
+.else
  168
+OBJTREE=	${MAKEOBJDIRPREFIX}/${TARGET}
  169
+.endif
  170
+WORLDTMP=	${OBJTREE}${.CURDIR}/tmp
  171
+# /usr/games added for fortune which depend on strfile
  172
+BPATH=		${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
  173
+XPATH=		${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
  174
+STRICTTMPPATH=	${BPATH}:${XPATH}
  175
+TMPPATH=	${STRICTTMPPATH}:${PATH}
  176
+
  177
+#
  178
+# Avoid running mktemp(1) unless actually needed.
  179
+# It may not be functional, e.g., due to new ABI
  180
+# when in the middle of installing over this system.
  181
+#
  182
+.if make(distributeworld) || make(installworld)
  183
+INSTALLTMP!=	/usr/bin/mktemp -d -u -t install
  184
+.endif
  185
+
  186
+#
  187
+# Building a world goes through the following stages
  188
+#
  189
+# 1. legacy stage [BMAKE]
  190
+#	This stage is responsible for creating compatibility
  191
+#	shims that are needed by the bootstrap-tools,
  192
+#	build-tools and cross-tools stages.
  193
+# 1. bootstrap-tools stage [BMAKE]
  194
+#	This stage is responsible for creating programs that
  195
+#	are needed for backward compatibility reasons. They
  196
+#	are not built as cross-tools.
  197
+# 2. build-tools stage [TMAKE]
  198
+#	This stage is responsible for creating the object
  199
+#	tree and building any tools that are needed during
  200
+#	the build process.
  201
+# 3. cross-tools stage [XMAKE]
  202
+#	This stage is responsible for creating any tools that
  203
+#	are needed for cross-builds. A cross-compiler is one
  204
+#	of them.
  205
+# 4. world stage [WMAKE]
  206
+#	This stage actually builds the world.
  207
+# 5. install stage (optional) [IMAKE]
  208
+#	This stage installs a previously built world.
  209
+#
  210
+
  211
+BOOTSTRAPPING?=	0
  212
+
  213
+# Common environment for world related stages
  214
+CROSSENV=	MAKEOBJDIRPREFIX=${OBJTREE} \
  215
+		MACHINE_ARCH=${TARGET_ARCH} \
  216
+		MACHINE=${TARGET} \
  217
+		CPUTYPE=${TARGET_CPUTYPE} \
  218
+		GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
  219
+		GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
  220
+		GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
  221
+.if ${OSRELDATE} < 700044
  222
+CROSSENV+=	AR=gnu-ar RANLIB=gnu-ranlib
  223
+.endif
  224
+
  225
+# bootstrap-tools stage
  226
+BMAKEENV=	INSTALL="sh ${.CURDIR}/tools/install.sh" \
  227
+		PATH=${BPATH}:${PATH} \
  228
+		WORLDTMP=${WORLDTMP} \
  229
+		VERSION="${VERSION}" \
  230
+		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
  231
+BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
  232
+		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
  233
+		DESTDIR= \
  234
+		BOOTSTRAPPING=${OSRELDATE} \
  235
+		SSP_CFLAGS= \
  236
+		-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
  237
+		-DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
  238
+		-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
  239
+
  240
+# build-tools stage
  241
+TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
  242
+		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
  243
+		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
  244
+		DESTDIR= \
  245
+		SSP_CFLAGS= \
  246
+		BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
  247
+		-DNO_WARNS -DNO_CTF
  248
+
  249
+# cross-tools stage
  250
+XMAKE=		TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
  251
+		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
  252
+		-DWITHOUT_GDB
  253
+
  254
+# world stage
  255
+WMAKEENV=	${CROSSENV} \
  256
+		_SHLIBDIRPREFIX=${WORLDTMP} \
  257
+		VERSION="${VERSION}" \
  258
+		INSTALL="sh ${.CURDIR}/tools/install.sh" \
  259
+		PATH=${TMPPATH}
  260
+.if ${MK_CDDL} == "no" || defined(NO_CTF)
  261
+WMAKEENV+=	NO_CTF=1
  262
+.endif
  263
+WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
  264
+
  265
+.if ${TARGET_ARCH} == "amd64"
  266
+# 32 bit world
  267
+LIB32TMP=	${OBJTREE}${.CURDIR}/lib32
  268
+
  269
+.if empty(TARGET_CPUTYPE)
  270
+LIB32CPUFLAGS=	-march=i686 -mmmx -msse -msse2
  271
+.else
  272
+LIB32CPUFLAGS=	-march=${TARGET_CPUTYPE}
  273
+.endif
  274
+LIB32FLAGS=	-m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \
  275
+		-iprefix ${LIB32TMP}/usr/ \
  276
+		-L${LIB32TMP}/usr/lib32 \
  277
+		-B${LIB32TMP}/usr/lib32
  278
+
  279
+# Yes, the flags are redundant.
  280
+LIB32WMAKEENV=	MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
  281
+		_SHLIBDIRPREFIX=${LIB32TMP} \
  282
+		VERSION="${VERSION}" \
  283
+		MACHINE=i386 \
  284
+		MACHINE_ARCH=i386 \
  285
+		INSTALL="sh ${.CURDIR}/tools/install.sh" \
  286
+		PATH=${TMPPATH} \
  287
+		CC="${CC} ${LIB32FLAGS}" \
  288
+		CXX="${CXX} ${LIB32FLAGS}" \
  289
+		OBJC="${OBJC} ${LIB32FLAGS}" \
  290
+		LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
  291
+		AS="${AS} --32" \
  292
+		LIBDIR=/usr/lib32 \
  293
+		SHLIBDIR=/usr/lib32
  294
+
  295
+LIB32WMAKE=	${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
  296
+		-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
  297
+		-DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP}
  298
+LIB32IMAKE=	${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS
  299
+.endif
  300
+
  301
+# install stage
  302
+IMAKEENV=	${CROSSENV}
  303
+IMAKE=		${IMAKEENV} ${MAKE} -f Makefile.inc1
  304
+.if empty(.MAKEFLAGS:M-n)
  305
+IMAKEENV+=	PATH=${STRICTTMPPATH}:${INSTALLTMP} \
  306
+		LD_LIBRARY_PATH=${INSTALLTMP} \
  307
+		PATH_LOCALE=${INSTALLTMP}/locale
  308
+IMAKE+=		__MAKE_SHELL=${INSTALLTMP}/sh
  309
+.else
  310
+IMAKEENV+=	PATH=${TMPPATH}:${INSTALLTMP}
  311
+.endif
  312
+
  313
+# kernel stage
  314
+KMAKEENV=	${WMAKEENV}
  315
+KMAKE=		${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME}
  316
+
  317
+#
  318
+# buildworld
  319
+#
  320
+# Attempt to rebuild the entire system, with reasonable chance of
  321
+# success, regardless of how old your existing system is.
  322
+#
  323
+_worldtmp:
  324
+.if ${.CURDIR:C/[^,]//g} != ""
  325
+#	The m4 build of sendmail files doesn't like it if ',' is used
  326
+#	anywhere in the path of it's files.
  327
+	@echo
  328
+	@echo "*** Error: path to source tree contains a comma ','"
  329
+	@echo
  330
+	false
  331
+.endif
  332
+	@echo
  333
+	@echo "--------------------------------------------------------------"
  334
+	@echo ">>> Rebuilding the temporary build tree"
  335
+	@echo "--------------------------------------------------------------"
  336
+.if !defined(NO_CLEAN)
  337
+	rm -rf ${WORLDTMP}
  338
+.if ${TARGET_ARCH} == "amd64"
  339
+	rm -rf ${LIB32TMP}
  340
+.endif
  341
+.else
  342
+	rm -rf ${WORLDTMP}/legacy/usr/include
  343
+#	XXX - These three can depend on any header file.
  344
+	rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
  345
+	rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c
  346
+	rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
  347
+.endif
  348
+.for _dir in \
  349
+    lib usr legacy/usr
  350
+	mkdir -p ${WORLDTMP}/${_dir}
  351
+.endfor
  352
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
  353
+	    -p ${WORLDTMP}/legacy/usr >/dev/null
  354
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
  355
+	    -p ${WORLDTMP}/usr >/dev/null
  356
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
  357
+	    -p ${WORLDTMP}/usr/include >/dev/null
  358
+	ln -sf ${.CURDIR}/sys ${WORLDTMP}
  359
+.if ${MK_BIND_LIBS} != "no"
  360
+	mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
  361
+	    -p ${WORLDTMP}/usr/include >/dev/null
  362
+.endif
  363
+_legacy:
  364
+	@echo
  365
+	@echo "--------------------------------------------------------------"
  366
+	@echo ">>> stage 1.1: legacy release compatibility shims"
  367
+	@echo "--------------------------------------------------------------"
  368
+	${_+_}cd ${.CURDIR}; ${BMAKE} legacy
  369
+_bootstrap-tools:
  370
+	@echo
  371
+	@echo "--------------------------------------------------------------"
  372
+	@echo ">>> stage 1.2: bootstrap tools"
  373
+	@echo "--------------------------------------------------------------"
  374
+	${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
  375
+_cleanobj:
  376
+.if !defined(NO_CLEAN)
  377
+	@echo
  378
+	@echo "--------------------------------------------------------------"
  379
+	@echo ">>> stage 2.1: cleaning up the object tree"
  380
+	@echo "--------------------------------------------------------------"
  381
+	${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
  382
+.if ${TARGET_ARCH} == "amd64"
  383
+	${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/}
  384
+.endif
  385
+.endif
  386
+_obj:
  387
+	@echo
  388
+	@echo "--------------------------------------------------------------"
  389
+	@echo ">>> stage 2.2: rebuilding the object tree"
  390
+	@echo "--------------------------------------------------------------"
  391
+	${_+_}cd ${.CURDIR}; ${WMAKE} par-obj
  392
+_build-tools:
  393
+	@echo
  394
+	@echo "--------------------------------------------------------------"
  395
+	@echo ">>> stage 2.3: build tools"
  396
+	@echo "--------------------------------------------------------------"
  397
+	${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
  398
+_cross-tools:
  399
+	@echo
  400
+	@echo "--------------------------------------------------------------"
  401
+	@echo ">>> stage 3: cross tools"
  402
+	@echo "--------------------------------------------------------------"
  403
+	${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
  404
+_includes:
  405
+	@echo
  406
+	@echo "--------------------------------------------------------------"
  407
+	@echo ">>> stage 4.1: building includes"
  408
+	@echo "--------------------------------------------------------------"
  409
+	${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
  410
+_libraries:
  411
+	@echo
  412
+	@echo "--------------------------------------------------------------"
  413
+	@echo ">>> stage 4.2: building libraries"
  414
+	@echo "--------------------------------------------------------------"
  415
+	${_+_}cd ${.CURDIR}; \
  416
+	    ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
  417
+	    -DWITHOUT_MAN -DWITHOUT_PROFILE libraries
  418
+_depend:
  419
+	@echo
  420
+	@echo "--------------------------------------------------------------"
  421
+	@echo ">>> stage 4.3: make dependencies"
  422
+	@echo "--------------------------------------------------------------"
  423
+	${_+_}cd ${.CURDIR}; ${WMAKE} par-depend
  424
+everything:
  425
+	@echo
  426
+	@echo "--------------------------------------------------------------"
  427
+	@echo ">>> stage 4.4: building everything"
  428
+	@echo "--------------------------------------------------------------"
  429
+	${_+_}cd ${.CURDIR}; ${WMAKE} par-all
  430
+.if ${TARGET_ARCH} == "amd64"
  431
+build32:
  432
+	@echo
  433
+	@echo "--------------------------------------------------------------"
  434
+	@echo ">>> stage 5.1: building 32 bit shim libraries"
  435
+	@echo "--------------------------------------------------------------"
  436
+	mkdir -p ${LIB32TMP}/usr/lib32
  437
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
  438
+	    -p ${LIB32TMP}/usr >/dev/null
  439
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
  440
+	    -p ${LIB32TMP}/usr/include >/dev/null
  441
+	mkdir -p ${WORLDTMP}
  442
+	ln -sf ${.CURDIR}/sys ${WORLDTMP}
  443
+.if ${MK_KERBEROS} != "no"
  444
+.for _t in obj depend all
  445
+	cd ${.CURDIR}/kerberos5/tools; \
  446
+	    MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
  447
+	    ${_t}
  448
+.endfor
  449
+.endif
  450
+.for _t in obj includes
  451
+	cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t}
  452
+	cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t}
  453
+.if ${MK_CDDL} != "no"
  454
+	cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t}
  455
+.endif
  456
+	cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t}
  457
+.if ${MK_CRYPT} != "no"
  458
+	cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t}
  459
+.endif
  460
+.if ${MK_KERBEROS} != "no"
  461
+	cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t}
  462
+.endif
  463
+.endfor
  464
+.for _dir in usr.bin/lex/lib
  465
+	cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj
  466
+.endfor
  467
+.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
  468
+	cd ${.CURDIR}/${_dir}; \
  469
+	    MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
  470
+	    build-tools
  471
+.endfor
  472
+	cd ${.CURDIR}; \
  473
+	    ${LIB32WMAKE} -f Makefile.inc1 libraries
  474
+.for _t in obj depend all
  475
+	cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
  476
+	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t}
  477
+.endfor
  478
+
  479
+distribute32 install32:
  480
+.if make(distribute32)
  481
+	mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32	# XXX add to mtree
  482
+	mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32/dtrace	# XXX add to mtree
  483
+.else
  484
+	mkdir -p ${DESTDIR}/usr/lib32			# XXX add to mtree
  485
+	mkdir -p ${DESTDIR}/usr/lib32/dtrace		# XXX add to mtree
  486
+.endif
  487
+	cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
  488
+.if ${MK_CDDL} != "no"
  489
+	cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
  490
+.endif
  491
+	cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
  492
+.if ${MK_CRYPT} != "no"
  493
+	cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
  494
+.endif
  495
+.if ${MK_KERBEROS} != "no"
  496
+	cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
  497
+.endif
  498
+	cd ${.CURDIR}/libexec/rtld-elf; \
  499
+	    PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
  500
+	cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
  501
+.endif
  502
+
  503
+WMAKE_TGTS=
  504
+.if !defined(SUBDIR_OVERRIDE)
  505
+WMAKE_TGTS+=	_worldtmp _legacy _bootstrap-tools
  506
+.endif
  507
+WMAKE_TGTS+=	_cleanobj _obj _build-tools
  508
+.if !defined(SUBDIR_OVERRIDE)
  509
+WMAKE_TGTS+=	_cross-tools
  510
+.endif
  511
+WMAKE_TGTS+=	_includes _libraries _depend everything
  512
+.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
  513
+WMAKE_TGTS+=	build32
  514
+.endif
  515
+
  516
+buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
  517
+.ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
  518
+
  519
+buildworld_prologue:
  520
+	@echo "--------------------------------------------------------------"
  521
+	@echo ">>> World build started on `LC_ALL=C date`"
  522
+	@echo "--------------------------------------------------------------"
  523
+
  524
+buildworld_epilogue:
  525
+	@echo
  526
+	@echo "--------------------------------------------------------------"
  527
+	@echo ">>> World build completed on `LC_ALL=C date`"
  528
+	@echo "--------------------------------------------------------------"
  529
+
  530
+#
  531
+# We need to have this as a target because the indirection between Makefile
  532
+# and Makefile.inc1 causes the correct PATH to be used, rather than a
  533
+# modification of the current environment's PATH.  In addition, we need
  534
+# to quote multiword values.
  535
+#
  536
+buildenvvars:
  537
+	@echo ${WMAKEENV:Q}
  538
+
  539
+buildenv:
  540
+	@echo Entering world for ${TARGET_ARCH}:${TARGET}
  541
+	@cd ${.CURDIR} && env ${WMAKEENV} sh || true
  542
+
  543