Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit - FreeBSD 8.0 original source.

  • Loading branch information...
commit d87002eddac7bfac8ff7190c40b333ff2bed989f 0 parents
Tsuyoshi Ozawa authored
Showing with 45,016 additions and 0 deletions.
  1. +126 −0 COPYRIGHT
  2. +13 −0 LOCKS
  3. +140 −0 MAINTAINERS
  4. +347 −0 Makefile
  5. +1,421 −0 Makefile.inc1
  6. +5,102 −0 ObsoleteFiles.inc
  7. +87 −0 README
  8. +1,690 −0 UPDATING
  9. +58 −0 sys/Makefile
  10. +39 −0 sys/amd64/Makefile
  11. +33 −0 sys/amd64/acpica/Makefile
  12. +71 −0 sys/amd64/acpica/OsdEnvironment.c
  13. +140 −0 sys/amd64/acpica/acpi_machdep.c
  14. +190 −0 sys/amd64/acpica/acpi_switch.S
  15. +286 −0 sys/amd64/acpica/acpi_wakecode.S
  16. +421 −0 sys/amd64/acpica/acpi_wakeup.c
  17. +6 −0 sys/amd64/acpica/genwakecode.sh
  18. +9 −0 sys/amd64/acpica/genwakedata.sh
  19. +788 −0 sys/amd64/acpica/madt.c
  20. +720 −0 sys/amd64/amd64/amd64_mem.c
  21. +253 −0 sys/amd64/amd64/apic_vector.S
  22. +49 −0 sys/amd64/amd64/atomic.c
  23. +132 −0 sys/amd64/amd64/autoconf.c
  24. +95 −0 sys/amd64/amd64/bios.c
  25. +521 −0 sys/amd64/amd64/bpf_jit_machdep.c
  26. +449 −0 sys/amd64/amd64/bpf_jit_machdep.h
  27. +1,198 −0 sys/amd64/amd64/busdma_machdep.c
  28. +424 −0 sys/amd64/amd64/cpu_switch.S
  29. +1,510 −0 sys/amd64/amd64/db_disasm.c
  30. +149 −0 sys/amd64/amd64/db_interface.c
  31. +696 −0 sys/amd64/amd64/db_trace.c
  32. +363 −0 sys/amd64/amd64/dump_machdep.c
  33. +272 −0 sys/amd64/amd64/elf_machdep.c
  34. +803 −0 sys/amd64/amd64/exception.S
  35. +577 −0 sys/amd64/amd64/fpu.c
  36. +117 −0 sys/amd64/amd64/gdb_machdep.c
  37. +250 −0 sys/amd64/amd64/genassym.c
  38. +659 −0 sys/amd64/amd64/identcpu.c
  39. +241 −0 sys/amd64/amd64/in_cksum.c
  40. +174 −0 sys/amd64/amd64/initcpu.c
  41. +536 −0 sys/amd64/amd64/intr_machdep.c
  42. +78 −0 sys/amd64/amd64/io.c
  43. +896 −0 sys/amd64/amd64/io_apic.c
  44. +322 −0 sys/amd64/amd64/legacy.c
  45. +1,390 −0 sys/amd64/amd64/local_apic.c
  46. +88 −0 sys/amd64/amd64/locore.S
  47. +2,364 −0 sys/amd64/amd64/machdep.c
  48. +529 −0 sys/amd64/amd64/mca.c
  49. +223 −0 sys/amd64/amd64/mem.c
  50. +405 −0 sys/amd64/amd64/minidump_machdep.c
  51. +1,442 −0 sys/amd64/amd64/mp_machdep.c
  52. +211 −0 sys/amd64/amd64/mp_watchdog.c
  53. +236 −0 sys/amd64/amd64/mpboot.S
  54. +1,042 −0 sys/amd64/amd64/mptable.c
  55. +200 −0 sys/amd64/amd64/mptable_pci.c
  56. +602 −0 sys/amd64/amd64/msi.c
  57. +692 −0 sys/amd64/amd64/nexus.c
  58. +4,771 −0 sys/amd64/amd64/pmap.c
  59. +400 −0 sys/amd64/amd64/prof_machdep.c
  60. +56 −0 sys/amd64/amd64/sigtramp.S
  61. +87 −0 sys/amd64/amd64/stack_machdep.c
  62. +763 −0 sys/amd64/amd64/support.S
  63. +683 −0 sys/amd64/amd64/sys_machdep.c
  64. +1,082 −0 sys/amd64/amd64/trap.c
  65. +231 −0 sys/amd64/amd64/tsc.c
  66. +120 −0 sys/amd64/amd64/uio_machdep.c
  67. +88 −0 sys/amd64/amd64/uma_machdep.c
  68. +631 −0 sys/amd64/amd64/vm_machdep.c
  69. +1 −0  sys/amd64/conf/.cvsignore
  70. +23 −0 sys/amd64/conf/DEFAULTS
  71. +320 −0 sys/amd64/conf/GENERIC
  72. +29 −0 sys/amd64/conf/GENERIC.hints
  73. +3 −0  sys/amd64/conf/Makefile
  74. +505 −0 sys/amd64/conf/NOTES
  75. +161 −0 sys/amd64/conf/XENHVM
  76. +74 −0 sys/amd64/ia32/ia32_exception.S
  77. +71 −0 sys/amd64/ia32/ia32_misc.c
  78. +232 −0 sys/amd64/ia32/ia32_reg.c
  79. +758 −0 sys/amd64/ia32/ia32_signal.c
  80. +80 −0 sys/amd64/ia32/ia32_sigtramp.S
  81. +279 −0 sys/amd64/ia32/ia32_syscall.c
  82. +46 −0 sys/amd64/include/_bus.h
  83. +220 −0 sys/amd64/include/_inttypes.h
  84. +92 −0 sys/amd64/include/_limits.h
  85. +171 −0 sys/amd64/include/_stdint.h
  86. +117 −0 sys/amd64/include/_types.h
  87. +81 −0 sys/amd64/include/acpica_machdep.h
  88. +442 −0 sys/amd64/include/apicreg.h
  89. +230 −0 sys/amd64/include/apicvar.h
  90. +91 −0 sys/amd64/include/asm.h
  91. +203 −0 sys/amd64/include/asmacros.h
Sorry, we could not display the entire diff because too many files (8,229) changed.
126 COPYRIGHT
@@ -0,0 +1,126 @@
+# $FreeBSD: src/COPYRIGHT,v 1.11.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+# @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94
+
+The compilation of software known as FreeBSD is distributed under the
+following terms:
+
+Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The 4.4BSD and 4.4BSD-Lite software is distributed under the following
+terms:
+
+All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite
+Releases is copyrighted by The Regents of the University of California.
+
+Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
+ The Regents of the University of California. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+This product includes software developed by the University of
+California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+The Institute of Electrical and Electronics Engineers and the American
+National Standards Committee X3, on Information Processing Systems have
+given us permission to reprint portions of their documentation.
+
+In the following statement, the phrase ``this text'' refers to portions
+of the system documentation.
+
+Portions of this text are reprinted and reproduced in electronic form in
+the second BSD Networking Software Release, from IEEE Std 1003.1-1988, IEEE
+Standard Portable Operating System Interface for Computer Environments
+(POSIX), copyright C 1988 by the Institute of Electrical and Electronics
+Engineers, Inc. In the event of any discrepancy between these versions
+and the original IEEE Standard, the original IEEE Standard is the referee
+document.
+
+In the following statement, the phrase ``This material'' refers to portions
+of the system documentation.
+
+This material is reproduced with permission from American National
+Standards Committee X3, on Information Processing Systems. Computer and
+Business Equipment Manufacturers Association (CBEMA), 311 First St., NW,
+Suite 500, Washington, DC 20001-2178. The developmental work of
+Programming Language C was completed by the X3J11 Technical Committee.
+
+The views and conclusions contained in the software and documentation are
+those of the authors and should not be interpreted as representing official
+policies, either expressed or implied, of the Regents of the University
+of California.
+
+
+NOTE: The copyright of UC Berkeley's Berkeley Software Distribution ("BSD")
+source has been updated. The copyright addendum may be found at
+ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change and is
+included below.
+
+July 22, 1999
+
+To All Licensees, Distributors of Any Version of BSD:
+
+As you know, certain of the Berkeley Software Distribution ("BSD") source
+code files require that further distributions of products containing all or
+portions of the software, acknowledge within their advertising materials
+that such products contain software developed by UC Berkeley and its
+contributors.
+
+Specifically, the provision reads:
+
+" * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors."
+
+Effective immediately, licensees and distributors are no longer required to
+include the acknowledgement within advertising materials. Accordingly, the
+foregoing paragraph of those BSD Unix files containing it is hereby deleted
+in its entirety.
+
+William Hoskins
+Director, Office of Technology Licensing
+University of California, Berkeley
13 LOCKS
@@ -0,0 +1,13 @@
+$FreeBSD: src/LOCKS,v 1.5.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+
+This file documents formal review/approval requirements that have been
+approved by core.
+
+subsystem login expires notes
+--------------------------------------
+
+Special cases:
+releng/4.* Requires Security Officer approval.
+releng/5.* Requires Security Officer approval.
+releng/6.* Requires Security Officer approval.
+releng/7.* Requires Security Officer approval.
140 MAINTAINERS
@@ -0,0 +1,140 @@
+$FreeBSD: src/MAINTAINERS,v 1.154.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+
+Please note that the content of this file is strictly advisory.
+No locks listed here are valid. The only strict review requirements
+are granted by core. These are documented in head/LOCKS and enforced
+by CVSROOT/approvers.
+
+The source tree is a community effort. However, some folks go to the
+trouble of looking after particular areas of the tree. In return for
+their active caretaking of the code it is polite to coordinate changes
+with them. This is a list of people who have expressed an interest in
+part of the code or listed their active caretaking role so that other
+committers can easily find somebody who is familiar with it. The notes
+should specify if there is a 3rd party source tree involved or other
+things that should be kept in mind.
+
+However, this is not a 'big stick', it is an offer to help and a source
+of guidance. It does not override the communal nature of the tree.
+It is not a registry of 'turf' or private property.
+
+subsystem login notes
+-----------------------------
+kqueue jmg Pre-commit review requested.
+mergemaster dougb Prefers to pre-approve commits
+libc/posix1e rwatson Pre-commit review requested.
+POSIX.1e ACLs rwatson Pre-commit review requested.
+UFS EAs rwatson Pre-commit review requested.
+MAC Framework rwatson Pre-commit review requested.
+MAC Modules rwatson Pre-commit review requested.
+contrib/openbsm rwatson Pre-commit review requested.
+sys/security/audit rwatson Pre-commit review requested.
+ahc(4) gibbs Pre-commit review requested.
+ahd(4) gibbs Pre-commit review requested.
+NEWCARD imp Pre-commit review requested.
+pci bus imp,jhb Pre-commit review requested.
+cdboot jhb Pre-commit review requested.
+pxeboot jhb Pre-commit review requested.
+witness jhb Pre-commit review requested.
+twe aradford@amcc.com Pre-commit review requested
+twa aradford@amcc.com Pre-commit review requested
+CAM gibbs,
+ ken Pre-commit review requested. send to scsi@freebsd.org
+devstat(9) ken Pre-commit review requested.
+camcontrol(8) ken Pre-commit review requested.
+libcam ken Pre-commit review requested.
+libdevstat ken Pre-commit review requested.
+iostat(8) ken Pre-commit review requested.
+cd(4) ken Pre-commit review requested.
+pass(4) ken Pre-commit review requested.
+ch(4) ken Pre-commit review requested.
+isp(4) mjacob Pre-commit review requested.
+em(4) jfv Pre-commit review requested.
+tdfx(4) cokane Just keep me informed of changes, try not to break it.
+sendmail gshapiro Pre-commit review requested.
+etc/mail gshapiro Pre-commit review requested.
+ Keep in sync with -STABLE.
+etc/sendmail gshapiro Pre-commit review requested.
+ Keep in sync with -STABLE.
+libfetch des Advance notification requested.
+fetch des Advance notification requested.
+libpam des Pre-commit review requested.
+openssh des Pre-commit review requested.
+pseudofs des Advance notification requested.
+procfs des Advance notification requested.
+linprocfs des Advance notification requested.
+lpr gad Pre-commit review requested, particularly for
+ lpd/recvjob.c and lpd/printjob.c.
+newsyslog(8) gad Heads-up appreciated. I'm going thru the PR's for it.
+pkill gad Heads-up appreciated.
+ps gad I am working on a number of changes to this. Would
+ like advance notice of major changes planned to it.
+cvs peter Heads-up appreciated, try not to break it.
+nvi peter Try not to break it.
+libz peter Try not to break it.
+groff ru Recommends pre-commit review.
+share/mk ru This is a vital component of the build system, so I
+ offer a pre-commit review for anything non-trivial.
+ipfw ipfw Pre-commit review preferred. send to ipfw@freebsd.org
+drm rnoland Just keep me informed of changes, try not to break it.
+libufs jmallett Willing to handle problems, help with work.
+fdc(4) joerg Just keep me informed of changes, try not to break it.
+sppp(4) joerg Just keep me informed of changes, try not to break it.
+unifdef(1) fanf Pre-commit review requested.
+ntp roberto Pre-commit review requested.
+inetd dwmalone Recommends pre-commit review.
+nwfs bp In case of functional changes pre-commit review
+ requested.
+contrib/smbfs bp Open for in-tree committs. In case of functional
+ changes pre-commit review requested.
+contrib/pf mlaier Pre-commit review requested.
+binutils obrien Insists on BU blocked from unapproved commits
+file obrien Insists to keep file blocked from other's unapproved
+ commits
+contrib/bzip2 obrien Pre-commit review required.
+lukemftpd obrien Pre-commit review required.
+geom_concat pjd Pre-commit review preferred.
+geom_eli pjd Pre-commit review preferred.
+geom_gate pjd Pre-commit review preferred.
+geom_label pjd Pre-commit review preferred.
+geom_mirror pjd Pre-commit review preferred.
+geom_nop pjd Pre-commit review preferred.
+geom_raid3 pjd Pre-commit review preferred.
+geom_shsec pjd Pre-commit review preferred.
+geom_stripe pjd Pre-commit review preferred.
+geom_zero pjd Pre-commit review preferred.
+sbin/geom pjd Pre-commit review preferred.
+zfs pjd Pre-commit review preferred.
+nfs alfred Will be happy to review code, but not mandatory.
+rpc.lockd alfred Will be happy to review code, but not mandatory.
+truss alfred Will be happy to review code, but not mandatory.
+rpc alfred Pre-commit review requested.
+xfs kan@FreeBSD.org,rodrigc@FreeBSD.org,cattelan@xfs.org
+ Pre-commit review preferred.
+pkg_install portmgr Pre-commit review or approval from portmgr@ requested.
+linux emul emulation Please discuss changes here.
+bs{diff,patch} cperciva Pre-commit review requested.
+portsnap cperciva Pre-commit review requested.
+freebsd-update cperciva Pre-commit review requested.
+openssl simon Pre-commit review requested.
+sys/netgraph/bluetooth emax Pre-commit review preferred.
+lib/libbluetooth emax Pre-commit review preferred.
+lib/libsdp emax Pre-commit review preferred.
+usr.bin/bluetooth emax Pre-commit review preferred.
+usr.sbin/bluetooth emax Pre-commit review preferred.
+gnu/usr.bin/send-pr bugmaster Pre-commit review requested.
+ncurses rafan Heads-up appreciated, try not to break it.
+
+Following are the entries from the Makefiles, and a few other sources.
+Please remove stale entries from both their origin, and this file.
+
+Please also consider removing the lines from the files listed below and
+stating your preferences here instead.
+
+List below generated with:
+$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ <tab>]*='
+
+sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org
+sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
+tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org
+usr.sbin/zic/Makefile:MAINTAINER= wollman@FreeBSD.org
347 Makefile
@@ -0,0 +1,347 @@
+#
+# $FreeBSD: src/Makefile,v 1.358.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+#
+# The user-driven targets are:
+#
+# universe - *Really* build *everything* (buildworld and
+# all kernels on all architectures).
+# buildworld - Rebuild *everything*, including glue to help do
+# upgrades.
+# installworld - Install everything built by "buildworld".
+# world - buildworld + installworld, no kernel.
+# buildkernel - Rebuild the kernel and the kernel-modules.
+# installkernel - Install the kernel and the kernel-modules.
+# installkernel.debug
+# reinstallkernel - Reinstall the kernel and the kernel-modules.
+# reinstallkernel.debug
+# kernel - buildkernel + installkernel.
+# doxygen - Build API documentation of the kernel, needs doxygen.
+# update - Convenient way to update your source tree (cvs).
+# check-old - List obsolete directories/files/libraries.
+# check-old-dirs - List obsolete directories.
+# check-old-files - List obsolete files.
+# check-old-libs - List obsolete libraries.
+# delete-old - Delete obsolete directories/files/libraries.
+# delete-old-dirs - Delete obsolete directories.
+# delete-old-files - Delete obsolete files.
+# delete-old-libs - Delete obsolete libraries.
+#
+# This makefile is simple by design. The FreeBSD make automatically reads
+# the /usr/share/mk/sys.mk unless the -m argument is specified on the
+# command line. By keeping this makefile simple, it doesn't matter too
+# much how different the installed mk files are from those in the source
+# tree. This makefile executes a child make process, forcing it to use
+# the mk files from the source tree which are supposed to DTRT.
+#
+# The user-driven targets (as listed above) are implemented in Makefile.inc1.
+#
+# If you want to build your system from source be sure that /usr/obj has
+# at least 800MB of diskspace available.
+#
+# For individuals wanting to build from the sources currently on their
+# system, the simple instructions are:
+#
+# 1. `cd /usr/src' (or to the directory containing your source tree).
+# 2. Define `HISTORICAL_MAKE_WORLD' variable (see README).
+# 3. `make world'
+#
+# For individuals wanting to upgrade their sources (even if only a
+# delta of a few days):
+#
+# 1. `cd /usr/src' (or to the directory containing your source tree).
+# 2. `make buildworld'
+# 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
+# 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
+# [steps 3. & 4. can be combined by using the "kernel" target]
+# 5. `reboot' (in single user mode: boot -s from the loader prompt).
+# 6. `mergemaster -p'
+# 7. `make installworld'
+# 8. `make delete-old'
+# 9. `mergemaster' (you may wish to use -U or -ai).
+# 10. `reboot'
+# 11. `make delete-old-libs' (in case no 3rd party program uses them anymore)
+#
+# See src/UPDATING `COMMON ITEMS' for more complete information.
+#
+# If TARGET=machine (e.g. ia64, sparc64, ...) is specified you can
+# cross build world for other machine types using the buildworld target,
+# and once the world is built you can cross build a kernel using the
+# buildkernel target.
+#
+# Define the user-driven targets. These are listed here in alphabetical
+# order, but that's not important.
+#
+# Targets that begin with underscore are internal targets intended for
+# developer convenience only. They are intentionally not documented and
+# completely subject to change without notice.
+#
+# For more information, see the build(7) manual page.
+#
+TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
+ check-old check-old-dirs check-old-files check-old-libs \
+ checkdpadd clean cleandepend cleandir \
+ delete-old delete-old-dirs delete-old-files delete-old-libs \
+ depend distribute distributeworld distrib-dirs distribution doxygen \
+ everything hierarchy install installcheck installkernel \
+ installkernel.debug reinstallkernel reinstallkernel.debug \
+ installworld kernel-toolchain libraries lint maninstall \
+ obj objlink regress rerelease showconfig tags toolchain update \
+ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \
+ _build-tools _cross-tools _includes _libraries _depend \
+ build32 distribute32 install32 xdev xdev-build xdev-install
+TGTS+= ${SUBDIR_TARGETS}
+
+BITGTS= files includes
+BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
+TGTS+= ${BITGTS}
+
+.ORDER: buildworld installworld
+.ORDER: buildworld distributeworld
+.ORDER: buildworld buildkernel
+.ORDER: buildkernel installkernel
+.ORDER: buildkernel installkernel.debug
+.ORDER: buildkernel reinstallkernel
+.ORDER: buildkernel reinstallkernel.debug
+
+PATH= /sbin:/bin:/usr/sbin:/usr/bin
+MAKEOBJDIRPREFIX?= /usr/obj
+_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
+ ${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
+ -f /dev/null -V MAKEOBJDIRPREFIX dummy
+.if !empty(_MAKEOBJDIRPREFIX)
+.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
+ (in make.conf(5)) or command-line variable.
+.endif
+MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}
+BINMAKE= \
+ `if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \
+ -m ${.CURDIR}/share/mk
+_MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1
+
+#
+# Make sure we have an up-to-date make(1). Only world and buildworld
+# should do this as those are the initial targets used for upgrades.
+# The user can define ALWAYS_CHECK_MAKE to have this check performed
+# for all targets.
+#
+.if defined(ALWAYS_CHECK_MAKE)
+${TGTS}: upgrade_checks
+.else
+buildworld: upgrade_checks
+.endif
+
+#
+# This 'cleanworld' target is not included in TGTS, because it is not a
+# recursive target. All of the work for it is done right here. It is
+# expected that BW_CANONICALOBJDIR == the CANONICALOBJDIR as would be
+# created by bsd.obj.mk, except that we don't want to .include that file
+# in this makefile.
+#
+# In the following, the first 'rm' in a series will usually remove all
+# files and directories. If it does not, then there are probably some
+# files with chflags set, so this unsets them and tries the 'rm' a
+# second time. There are situations where this target will be cleaning
+# some directories via more than one method, but that duplication is
+# needed to correctly handle all the possible situations.
+#
+BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR}
+cleanworld:
+.if ${.CURDIR} == ${.OBJDIR} || ${.CURDIR}/obj == ${.OBJDIR}
+.if exists(${BW_CANONICALOBJDIR}/)
+ -rm -rf ${BW_CANONICALOBJDIR}/*
+ -chflags -R 0 ${BW_CANONICALOBJDIR}
+ rm -rf ${BW_CANONICALOBJDIR}/*
+.endif
+ # To be safe in this case, fall back to a 'make cleandir'
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
+.else
+ -rm -rf ${.OBJDIR}/*
+ -chflags -R 0 ${.OBJDIR}
+ rm -rf ${.OBJDIR}/*
+.endif
+
+#
+# Handle the user-driven targets, using the source relative mk files.
+#
+
+${TGTS}:
+ ${_+_}@cd ${.CURDIR}; \
+ ${_MAKE} ${.TARGET}
+
+# Set a reasonable default
+.MAIN: all
+
+STARTTIME!= LC_ALL=C date
+CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0
+.if !empty(CHECK_TIME)
+.error check your date/time: ${STARTTIME}
+.endif
+
+.if defined(HISTORICAL_MAKE_WORLD) || defined(DESTDIR)
+#
+# world
+#
+# Attempt to rebuild and reinstall everything. This target is not to be
+# used for upgrading an existing FreeBSD system, because the kernel is
+# not included. One can argue that this target doesn't build everything
+# then.
+#
+world: upgrade_checks
+ @echo "--------------------------------------------------------------"
+ @echo ">>> make world started on ${STARTTIME}"
+ @echo "--------------------------------------------------------------"
+.if target(pre-world)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Making 'pre-world' target"
+ @echo "--------------------------------------------------------------"
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} pre-world
+.endif
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} buildworld
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} -B installworld
+.if target(post-world)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Making 'post-world' target"
+ @echo "--------------------------------------------------------------"
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} post-world
+.endif
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> make world completed on `LC_ALL=C date`"
+ @echo " (started ${STARTTIME})"
+ @echo "--------------------------------------------------------------"
+.else
+world:
+ @echo "WARNING: make world will overwrite your existing FreeBSD"
+ @echo "installation without also building and installing a new"
+ @echo "kernel. This can be dangerous. Please read the handbook,"
+ @echo "'Rebuilding world', for how to upgrade your system."
+ @echo "Define DESTDIR to where you want to install FreeBSD,"
+ @echo "including /, to override this warning and proceed as usual."
+ @echo ""
+ @echo "Bailing out now..."
+ @false
+.endif
+
+#
+# kernel
+#
+# Short hand for `make buildkernel installkernel'
+#
+kernel: buildkernel installkernel
+
+#
+# Perform a few tests to determine if the installed tools are adequate
+# for building the world.
+#
+upgrade_checks:
+ @if ! (cd ${.CURDIR}/tools/build/make_check && \
+ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \
+ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \
+ then \
+ (cd ${.CURDIR} && ${MAKE} make); \
+ fi
+
+#
+# Upgrade make(1) to the current version using the installed
+# headers, libraries and tools. Also, allow the location of
+# the system bsdmake-like utility to be overridden.
+#
+MMAKEENV= MAKEOBJDIRPREFIX=${MAKEPATH} \
+ DESTDIR= \
+ INSTALL="sh ${.CURDIR}/tools/install.sh"
+MMAKE= ${MMAKEENV} ${MAKE} \
+ -D_UPGRADING \
+ -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED \
+ -DNO_CPU_CFLAGS -DNO_WERROR
+
+make: .PHONY
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Building an up-to-date make(1)"
+ @echo "--------------------------------------------------------------"
+ ${_+_}@cd ${.CURDIR}/usr.bin/make; \
+ ${MMAKE} obj && \
+ ${MMAKE} depend && \
+ ${MMAKE} all && \
+ ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
+
+tinderbox:
+ cd ${.CURDIR} && \
+ DOING_TINDERBOX=YES ${MAKE} ${JFLAG} universe
+
+#
+# universe
+#
+# Attempt to rebuild *everything* for all supported architectures,
+# with a reasonable chance of success, regardless of how old your
+# existing system is.
+#
+.if make(universe) || make(tinderbox)
+TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
+
+.if defined(DOING_TINDERBOX)
+FAILFILE=tinderbox.failed
+MAKEFAIL=tee -a ${FAILFILE}
+.else
+MAKEFAIL=cat
+.endif
+
+universe: universe_prologue
+universe_prologue:
+ @echo "--------------------------------------------------------------"
+ @echo ">>> make universe started on ${STARTTIME}"
+ @echo "--------------------------------------------------------------"
+.if defined(DOING_TINDERBOX)
+ rm -f ${FAILFILE}
+.endif
+.for target in ${TARGETS}
+KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \
+ find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
+ ! -name DEFAULTS ! -name LINT
+KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/}
+universe: universe_${target}
+.ORDER: universe_prologue universe_${target} universe_epilogue
+universe_${target}:
+.if !defined(MAKE_JUST_KERNELS)
+ @echo ">> ${target} started on `LC_ALL=C date`"
+ @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
+ ${MAKE} ${JFLAG} buildworld \
+ TARGET=${target} \
+ > _.${target}.buildworld 2>&1 || \
+ (echo "${target} world failed," \
+ "check _.${target}.buildworld for details" | ${MAKEFAIL}))
+ @echo ">> ${target} buildworld completed on `LC_ALL=C date`"
+.endif
+.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
+ @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
+ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
+ (echo "${target} 'make LINT' failed," \
+ "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
+.endif
+.for kernel in ${KERNCONFS}
+ @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
+ ${MAKE} ${JFLAG} buildkernel \
+ TARGET=${target} \
+ KERNCONF=${kernel} \
+ > _.${target}.${kernel} 2>&1 || \
+ (echo "${target} ${kernel} kernel failed," \
+ "check _.${target}.${kernel} for details"| ${MAKEFAIL}))
+.endfor
+ @echo ">> ${target} completed on `LC_ALL=C date`"
+.endfor
+universe: universe_epilogue
+universe_epilogue:
+ @echo "--------------------------------------------------------------"
+ @echo ">>> make universe completed on `LC_ALL=C date`"
+ @echo " (started ${STARTTIME})"
+ @echo "--------------------------------------------------------------"
+.if defined(DOING_TINDERBOX)
+ @if [ -e ${FAILFILE} ] ; then \
+ echo "Tinderbox failed:" ;\
+ cat ${FAILFILE} ;\
+ exit 1 ;\
+ fi
+.endif
+.endif
1,421 Makefile.inc1
@@ -0,0 +1,1421 @@
+#
+# $FreeBSD: src/Makefile.inc1,v 1.628.2.3.2.2 2009/11/09 23:55:49 kensmith Exp $
+#
+# Make command line options:
+# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
+# -DNO_CLEAN do not clean at all
+# -DNO_SHARE do not go into share subdir
+# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG
+# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
+# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
+# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
+# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
+# -DNO_DOCUPDATE do not update doc in ${MAKE} update
+# -DNO_CTF do not run the DTrace CTF conversion tools on built objects
+# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
+# TARGET="machine" to crossbuild world for a different machine type
+
+#
+# The intended user-driven targets are:
+# buildworld - rebuild *everything*, including glue to help do upgrades
+# installworld- install everything built by "buildworld"
+# doxygen - build API documentation of the kernel
+# update - convenient way to update your source tree (eg: cvsup/cvs)
+#
+# Standard targets (not defined here) are documented in the makefiles in
+# /usr/share/mk. These include:
+# obj depend all install clean cleandepend cleanobj
+
+.include <bsd.own.mk>
+
+.if ${MACHINE_ARCH} == "mips"
+MK_RESCUE=no # not yet
+.endif
+
+# 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.
+#
+# 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.
+#
+SUBDIR= share/info lib libexec
+SUBDIR+=bin
+.if ${MK_GAMES} != "no"
+SUBDIR+=games
+.endif
+.if ${MK_CDDL} != "no"
+SUBDIR+=cddl
+.else
+NO_CTF=1
+.endif
+SUBDIR+=gnu include
+.if ${MK_KERBEROS} != "no"
+SUBDIR+=kerberos5
+.endif
+.if ${MK_RESCUE} != "no"
+SUBDIR+=rescue
+.endif
+SUBDIR+=sbin
+.if ${MK_CRYPT} != "no"
+SUBDIR+=secure
+.endif
+.if !defined(NO_SHARE)
+SUBDIR+=share
+.endif
+SUBDIR+=sys usr.bin usr.sbin
+#
+# We must do etc/ last for install/distribute to work.
+#
+SUBDIR+=etc
+
+# These are last, since it is nice to at least get the base system
+# rebuilt before you do them.
+.for _DIR in ${LOCAL_DIRS}
+.if exists(${.CURDIR}/${_DIR}/Makefile)
+SUBDIR+= ${_DIR}
+.endif
+.endfor
+
+.if defined(SUBDIR_OVERRIDE)
+SUBDIR= ${SUBDIR_OVERRIDE}
+.endif
+
+.if defined(NOCLEAN)
+NO_CLEAN= ${NOCLEAN}
+.endif
+.if defined(NO_CLEANDIR)
+CLEANDIR= clean cleandepend
+.else
+CLEANDIR= cleandir
+.endif
+
+CVS?= cvs
+CVSFLAGS?= -r RELENG_8_0 -P -d -I!
+SVN?= svn
+SVNFLAGS?= -r HEAD
+SUP?= /usr/bin/csup
+SUPFLAGS?= -g -L 2
+.if defined(SUPHOST)
+SUPFLAGS+= -h ${SUPHOST}
+.endif
+
+MAKEOBJDIRPREFIX?= /usr/obj
+.if !defined(OSRELDATE)
+.if exists(/usr/include/osreldate.h)
+OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
+ /usr/include/osreldate.h
+.else
+OSRELDATE= 0
+.endif
+.endif
+
+.if !defined(VERSION)
+VERSION!= uname -srp
+VERSION+= ${OSRELDATE}
+.endif
+
+# Guess machine architecture from machine type, and vice versa.
+.if !defined(TARGET_ARCH) && defined(TARGET)
+TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/}
+.elif !defined(TARGET) && defined(TARGET_ARCH) && \
+ ${TARGET_ARCH} != ${MACHINE_ARCH}
+TARGET= ${TARGET_ARCH}
+.endif
+# Otherwise, default to current machine type and architecture.
+TARGET?= ${MACHINE}
+TARGET_ARCH?= ${MACHINE_ARCH}
+
+KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v
+.if ${TARGET} == ${TARGET_ARCH}
+_t= ${TARGET}
+.else
+_t= ${TARGET_ARCH}/${TARGET}
+.endif
+.for _t in ${_t}
+.if empty(KNOWN_ARCHES:M${_t})
+.error Unknown target ${TARGET_ARCH}:${TARGET}.
+.endif
+.endfor
+
+.if ${TARGET} == ${MACHINE}
+TARGET_CPUTYPE?=${CPUTYPE}
+.else
+TARGET_CPUTYPE?=
+.endif
+
+.if !empty(TARGET_CPUTYPE)
+_TARGET_CPUTYPE=${TARGET_CPUTYPE}
+.else
+_TARGET_CPUTYPE=dummy
+.endif
+_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
+ -f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
+.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
+.error CPUTYPE global should be set with ?=.
+.endif
+.if make(buildworld)
+BUILD_ARCH!= uname -p
+.if ${MACHINE_ARCH} != ${BUILD_ARCH}
+.error To cross-build, set TARGET_ARCH.
+.endif
+.endif
+.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
+OBJTREE= ${MAKEOBJDIRPREFIX}
+.else
+OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
+.endif
+WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
+# /usr/games added for fortune which depend on strfile
+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}
+TMPPATH= ${STRICTTMPPATH}:${PATH}
+
+#
+# Avoid running mktemp(1) unless actually needed.
+# It may not be functional, e.g., due to new ABI
+# when in the middle of installing over this system.
+#
+.if make(distributeworld) || make(installworld)
+INSTALLTMP!= /usr/bin/mktemp -d -u -t install
+.endif
+
+#
+# Building a world goes through the following stages
+#
+# 1. legacy stage [BMAKE]
+# 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]
+# This stage is responsible for creating programs that
+# are needed for backward compatibility reasons. They
+# are not built as cross-tools.
+# 2. build-tools stage [TMAKE]
+# This stage is responsible for creating the object
+# tree and building any tools that are needed during
+# the build process.
+# 3. cross-tools stage [XMAKE]
+# This stage is responsible for creating any tools that
+# are needed for cross-builds. A cross-compiler is one
+# of them.
+# 4. world stage [WMAKE]
+# This stage actually builds the world.
+# 5. install stage (optional) [IMAKE]
+# This stage installs a previously built world.
+#
+
+BOOTSTRAPPING?= 0
+
+# Common environment for world related stages
+CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
+ MACHINE_ARCH=${TARGET_ARCH} \
+ MACHINE=${TARGET} \
+ CPUTYPE=${TARGET_CPUTYPE} \
+ GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
+ GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
+ GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
+.if ${OSRELDATE} < 700044
+CROSSENV+= AR=gnu-ar RANLIB=gnu-ranlib
+.endif
+
+# bootstrap-tools stage
+BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \
+ PATH=${BPATH}:${PATH} \
+ WORLDTMP=${WORLDTMP} \
+ VERSION="${VERSION}" \
+ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
+BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
+ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \
+ DESTDIR= \
+ BOOTSTRAPPING=${OSRELDATE} \
+ SSP_CFLAGS= \
+ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
+ -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
+ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
+
+# build-tools stage
+TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
+ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \
+ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ DESTDIR= \
+ SSP_CFLAGS= \
+ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
+ -DNO_WARNS -DNO_CTF
+
+# cross-tools stage
+XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
+ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
+ -DWITHOUT_GDB
+
+# world stage
+WMAKEENV= ${CROSSENV} \
+ _SHLIBDIRPREFIX=${WORLDTMP} \
+ VERSION="${VERSION}" \
+ INSTALL="sh ${.CURDIR}/tools/install.sh" \
+ PATH=${TMPPATH}
+.if ${MK_CDDL} == "no" || defined(NO_CTF)
+WMAKEENV+= NO_CTF=1
+.endif
+WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
+
+.if ${TARGET_ARCH} == "amd64"
+# 32 bit world
+LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
+
+.if empty(TARGET_CPUTYPE)
+LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2
+.else
+LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
+.endif
+LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \
+ -iprefix ${LIB32TMP}/usr/ \
+ -L${LIB32TMP}/usr/lib32 \
+ -B${LIB32TMP}/usr/lib32
+
+# Yes, the flags are redundant.
+LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
+ _SHLIBDIRPREFIX=${LIB32TMP} \
+ VERSION="${VERSION}" \
+ MACHINE=i386 \
+ MACHINE_ARCH=i386 \
+ INSTALL="sh ${.CURDIR}/tools/install.sh" \
+ PATH=${TMPPATH} \
+ CC="${CC} ${LIB32FLAGS}" \
+ CXX="${CXX} ${LIB32FLAGS}" \
+ OBJC="${OBJC} ${LIB32FLAGS}" \
+ LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
+ AS="${AS} --32" \
+ LIBDIR=/usr/lib32 \
+ SHLIBDIR=/usr/lib32
+
+LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
+ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
+ -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP}
+LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS
+.endif
+
+# install stage
+IMAKEENV= ${CROSSENV}
+IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
+.if empty(.MAKEFLAGS:M-n)
+IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
+ LD_LIBRARY_PATH=${INSTALLTMP} \
+ PATH_LOCALE=${INSTALLTMP}/locale
+IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh
+.else
+IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP}
+.endif
+
+# kernel stage
+KMAKEENV= ${WMAKEENV}
+KMAKE= ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME}
+
+#
+# buildworld
+#
+# Attempt to rebuild the entire system, with reasonable chance of
+# success, regardless of how old your existing system is.
+#
+_worldtmp:
+.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
+ false
+.endif
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Rebuilding the temporary build tree"
+ @echo "--------------------------------------------------------------"
+.if !defined(NO_CLEAN)
+ rm -rf ${WORLDTMP}
+.if ${TARGET_ARCH} == "amd64"
+ rm -rf ${LIB32TMP}
+.endif
+.else
+ rm -rf ${WORLDTMP}/legacy/usr/include
+# XXX - These three can depend on any header file.
+ rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c
+ rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c
+ rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c
+.endif
+.for _dir in \
+ lib usr legacy/usr
+ mkdir -p ${WORLDTMP}/${_dir}
+.endfor
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${WORLDTMP}/legacy/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${WORLDTMP}/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+ -p ${WORLDTMP}/usr/include >/dev/null
+ ln -sf ${.CURDIR}/sys ${WORLDTMP}
+.if ${MK_BIND_LIBS} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
+ -p ${WORLDTMP}/usr/include >/dev/null
+.endif
+_legacy:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 1.1: legacy release compatibility shims"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${BMAKE} legacy
+_bootstrap-tools:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 1.2: bootstrap tools"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools
+_cleanobj:
+.if !defined(NO_CLEAN)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.1: cleaning up the object tree"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
+.if ${TARGET_ARCH} == "amd64"
+ ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/}
+.endif
+.endif
+_obj:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.2: rebuilding the object tree"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${WMAKE} par-obj
+_build-tools:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.3: build tools"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${TMAKE} build-tools
+_cross-tools:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 3: cross tools"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools
+_includes:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 4.1: building includes"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
+_libraries:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 4.2: building libraries"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; \
+ ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+ -DWITHOUT_MAN -DWITHOUT_PROFILE libraries
+_depend:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 4.3: make dependencies"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${WMAKE} par-depend
+everything:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 4.4: building everything"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${WMAKE} par-all
+.if ${TARGET_ARCH} == "amd64"
+build32:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 5.1: building 32 bit shim libraries"
+ @echo "--------------------------------------------------------------"
+ mkdir -p ${LIB32TMP}/usr/lib32
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${LIB32TMP}/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+ -p ${LIB32TMP}/usr/include >/dev/null
+ mkdir -p ${WORLDTMP}
+ ln -sf ${.CURDIR}/sys ${WORLDTMP}
+.if ${MK_KERBEROS} != "no"
+.for _t in obj depend all
+ cd ${.CURDIR}/kerberos5/tools; \
+ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
+ ${_t}
+.endfor
+.endif
+.for _t in obj includes
+ cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t}
+ cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t}
+.if ${MK_CDDL} != "no"
+ cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t}
+.endif
+ cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t}
+.if ${MK_CRYPT} != "no"
+ cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t}
+.endif
+.if ${MK_KERBEROS} != "no"
+ cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t}
+.endif
+.endfor
+.for _dir in usr.bin/lex/lib
+ cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj
+.endfor
+.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
+ cd ${.CURDIR}/${_dir}; \
+ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
+ build-tools
+.endfor
+ cd ${.CURDIR}; \
+ ${LIB32WMAKE} -f Makefile.inc1 libraries
+.for _t in obj depend all
+ cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
+ cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t}
+.endfor
+
+distribute32 install32:
+.if make(distribute32)
+ mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree
+ mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32/dtrace # XXX add to mtree
+.else
+ mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree
+ mkdir -p ${DESTDIR}/usr/lib32/dtrace # XXX add to mtree
+.endif
+ cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+.if ${MK_CDDL} != "no"
+ cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+.endif
+ cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+.if ${MK_CRYPT} != "no"
+ cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+.endif
+.if ${MK_KERBEROS} != "no"
+ cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+.endif
+ cd ${.CURDIR}/libexec/rtld-elf; \
+ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
+ cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
+.endif
+
+WMAKE_TGTS=
+.if !defined(SUBDIR_OVERRIDE)
+WMAKE_TGTS+= _worldtmp _legacy _bootstrap-tools
+.endif
+WMAKE_TGTS+= _cleanobj _obj _build-tools
+.if !defined(SUBDIR_OVERRIDE)
+WMAKE_TGTS+= _cross-tools
+.endif
+WMAKE_TGTS+= _includes _libraries _depend everything
+.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
+WMAKE_TGTS+= build32
+.endif
+
+buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
+.ORDER: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue
+
+buildworld_prologue:
+ @echo "--------------------------------------------------------------"
+ @echo ">>> World build started on `LC_ALL=C date`"
+ @echo "--------------------------------------------------------------"
+
+buildworld_epilogue:
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> World build completed on `LC_ALL=C date`"
+ @echo "--------------------------------------------------------------"
+
+#
+# We need to have this as a target because the indirection between Makefile
+# and Makefile.inc1 causes the correct PATH to be used, rather than a
+# modification of the current environment's PATH. In addition, we need
+# to quote multiword values.
+#
+buildenvvars:
+ @echo ${WMAKEENV:Q}
+
+buildenv:
+ @echo Entering world for ${TARGET_ARCH}:${TARGET}
+ @cd ${.CURDIR} && env ${WMAKEENV} sh || true
+
+TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
+toolchain: ${TOOLCHAIN_TGTS}
+kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
+
+#
+# installcheck
+#
+# Checks to be sure system is ready for installworld/installkernel.
+#
+installcheck:
+
+#
+# Require DESTDIR to be set if installing for a different architecture.
+#
+.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE}
+.if !make(distributeworld)
+installcheck: installcheck_DESTDIR
+installcheck_DESTDIR:
+.if !defined(DESTDIR) || empty(DESTDIR)
+ @echo "ERROR: Please set DESTDIR!"; \
+ false
+.endif
+.endif
+.endif
+
+#
+# Check for missing UIDs/GIDs.
+#
+CHECK_UIDS=
+CHECK_GIDS= audit
+.if ${MK_SENDMAIL} != "no"
+CHECK_UIDS+= smmsp
+CHECK_GIDS+= smmsp
+.endif
+.if ${MK_PF} != "no"
+CHECK_UIDS+= proxy
+CHECK_GIDS+= proxy authpf
+.endif
+installcheck: installcheck_UGID
+installcheck_UGID:
+.for uid in ${CHECK_UIDS}
+ @if ! `id -u ${uid} >/dev/null 2>&1`; then \
+ echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \
+ false; \
+ fi
+.endfor
+.for gid in ${CHECK_GIDS}
+ @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
+ echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \
+ false; \
+ fi
+.endfor
+
+#
+# Required install tools to be saved in a scratch dir for safety.
+#
+.if ${MK_INFO} != "no"
+_install-info= install-info
+.endif
+
+ITOOLS= [ awk cap_mkdb cat chflags chmod chown \
+ date echo egrep find grep ${_install-info} \
+ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
+ test true uname wc zic
+
+#
+# distributeworld
+#
+# Distributes everything compiled by a `buildworld'.
+#
+# installworld
+#
+# Installs everything compiled by a 'buildworld'.
+#
+distributeworld installworld: installcheck
+ mkdir -p ${INSTALLTMP}
+ progs=$$(for prog in ${ITOOLS}; do \
+ if progpath=`which $$prog`; then \
+ echo $$progpath; \
+ else \
+ echo "Required tool $$prog not found in PATH." >&2; \
+ exit 1; \
+ fi; \
+ done); \
+ libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
+ while read line; do \
+ set -- $$line; \
+ if [ "$$2 $$3" != "not found" ]; then \
+ echo $$2; \
+ else \
+ echo "Required library $$1 not found." >&2; \
+ exit 1; \
+ fi; \
+ done); \
+ cp $$libs $$progs ${INSTALLTMP}
+ cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
+ ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
+ ${IMAKEENV} rm -rf ${INSTALLTMP}
+
+#
+# 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.
+#
+reinstall:
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Making hierarchy"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Installing everything"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
+.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
+.endif
+
+redistribute:
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Distributing everything"
+ @echo "--------------------------------------------------------------"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
+.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no"
+ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \
+ DISTRIBUTION=lib32
+.endif
+
+distrib-dirs distribution:
+ cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET}
+
+#
+# buildkernel and installkernel
+#
+# Which kernels to build and/or install is specified by setting
+# KERNCONF. If not defined a GENERIC kernel is built/installed.
+# Only the existing (depending TARGET) config files are used
+# for building kernels and only the first of these is designated
+# as the one being installed.
+#
+# Note that we have to use TARGET instead of TARGET_ARCH when
+# we're in kernel-land. Since only TARGET_ARCH is (expected) to
+# be set to cross-build, we have to make sure TARGET is set
+# properly.
+
+.if defined(KERNFAST)
+NO_KERNELCLEAN= t
+NO_KERNELCONFIG= t
+NO_KERNELDEPEND= t
+# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
+.if !defined(KERNCONF) && ${KERNFAST} != "1"
+KERNCONF=${KERNFAST}
+.endif
+.endif
+.if !defined(KERNCONF) && defined(KERNEL)
+KERNCONF= ${KERNEL}
+KERNWARN=
+.else
+KERNCONF?= GENERIC
+.endif
+INSTKERNNAME?= kernel
+
+KERNSRCDIR?= ${.CURDIR}/sys
+KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf
+KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR}
+KERNCONFDIR?= ${KRNLCONFDIR}
+
+BUILDKERNELS=
+INSTALLKERNEL=
+.for _kernel in ${KERNCONF}
+.if exists(${KERNCONFDIR}/${_kernel})
+BUILDKERNELS+= ${_kernel}
+.if empty(INSTALLKERNEL)
+INSTALLKERNEL= ${_kernel}
+.endif
+.endif
+.endfor
+
+#
+# buildkernel
+#
+# Builds all kernels defined by BUILDKERNELS.
+#
+buildkernel:
+.if empty(BUILDKERNELS)
+ @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \
+ false
+.endif
+.if defined(KERNWARN)
+ @echo "--------------------------------------------------------------"
+ @echo ">>> WARNING: KERNEL= setting should be changed to KERNCONF="
+ @echo "--------------------------------------------------------------"
+ @sleep 3
+.endif
+ @echo
+.for _kernel in ${BUILDKERNELS}
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`"
+ @echo "--------------------------------------------------------------"
+ @echo "===> ${_kernel}"
+ mkdir -p ${KRNLOBJDIR}
+.if !defined(NO_KERNELCONFIG)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 1: configuring the kernel"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLCONFDIR}; \
+ PATH=${TMPPATH} \
+ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
+ ${KERNCONFDIR}/${_kernel}
+.endif
+.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.1: cleaning up the object tree"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
+.endif
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.2: rebuilding the object tree"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 2.3: build tools"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${_kernel}; \
+ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
+ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
+ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
+# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
+.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
+.for target in obj depend all
+ cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
+ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
+ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target}
+.endfor
+.endif
+.if !defined(NO_KERNELDEPEND)
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 3.1: making dependencies"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
+.endif
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo ">>> stage 3.2: building everything"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`"
+ @echo "--------------------------------------------------------------"
+.endfor
+
+#
+# installkernel, etc.
+#
+# Install the kernel defined by INSTALLKERNEL
+#
+installkernel installkernel.debug \
+reinstallkernel reinstallkernel.debug: installcheck
+.if empty(INSTALLKERNEL)
+ @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \
+ false
+.endif
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Installing kernel"
+ @echo "--------------------------------------------------------------"
+ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \
+ ${CROSSENV} PATH=${TMPPATH} \
+ ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
+
+#
+# doxygen
+#
+# Build the API documentation with doxygen
+#
+doxygen:
+ @if [ ! -x `/usr/bin/which doxygen` ]; then \
+ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \
+ exit 1; \
+ fi
+ cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all
+
+#
+# update
+#
+# Update the source tree, by running cvsup and/or running cvs to update to the
+# latest copy.
+#
+update:
+.if defined(SUP_UPDATE)
+ @echo "--------------------------------------------------------------"
+ @echo ">>> Running ${SUP}"
+ @echo "--------------------------------------------------------------"
+.if defined(SUPFILE)
+ @${SUP} ${SUPFLAGS} ${SUPFILE}
+.endif
+.if defined(SUPFILE1)
+ @${SUP} ${SUPFLAGS} ${SUPFILE1}
+.endif
+.if defined(SUPFILE2)
+ @${SUP} ${SUPFLAGS} ${SUPFILE2}
+.endif
+.if defined(PORTSSUPFILE) && !defined(NO_PORTSUPDATE)
+ @${SUP} ${SUPFLAGS} ${PORTSSUPFILE}
+.endif
+.if defined(DOCSUPFILE) && !defined(NO_DOCUPDATE)
+ @${SUP} ${SUPFLAGS} ${DOCSUPFILE}
+.endif
+.endif
+.if defined(CVS_UPDATE)
+ @cd ${.CURDIR} ; \
+ if [ -d CVS ] ; then \
+ echo "--------------------------------------------------------------" ; \
+ echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT} ; \
+ echo "--------------------------------------------------------------" ; \
+ echo ${CVS} -R -q update ${CVSFLAGS} ; \
+ ${CVS} -R -q update ${CVSFLAGS} ; \
+ fi
+.endif
+.if defined(SVN_UPDATE)
+ @cd ${.CURDIR} ; \
+ if [ -d .svn ] ; then \
+ echo "--------------------------------------------------------------" ; \
+ echo ">>> Updating ${.CURDIR} using Subversion" ; \
+ echo "--------------------------------------------------------------" ; \
+ echo ${SVN} update ${SVNFLAGS} ; \
+ ${SVN} update ${SVNFLAGS} ; \
+ fi
+.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.
+#
+
+#
+# legacy: Build compatibility shims for the next three targets
+#
+legacy:
+.if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0
+ @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \
+ false
+.endif
+.for _tool in tools/build
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${MAKE} DIRPRFX=${_tool}/ obj; \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
+ ${MAKE} DIRPRFX=${_tool}/ depend; \
+ ${MAKE} DIRPRFX=${_tool}/ all; \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
+.endfor
+
+#
+# bootstrap-tools: Build tools needed for compatibility
+#
+.if ${MK_GAMES} != "no"
+_strfile= games/fortune/strfile
+.endif
+
+.if ${MK_CXX} != "no"
+_gperf= gnu/usr.bin/gperf
+.if ${BOOTSTRAPPING} < 700004
+_groff= gnu/usr.bin/groff
+.else
+_groff= gnu/usr.bin/groff/tmac
+.endif
+.endif
+
+.if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022
+_ar= usr.bin/ar
+.endif
+
+.if ${BOOTSTRAPPING} < 800013
+_mklocale= usr.bin/mklocale
+.endif
+
+.if ${BOOTSTRAPPING} < 700018
+_gensnmptree= usr.sbin/bsnmpd/gensnmptree
+.endif
+
+.if ${MK_RESCUE} != "no" && \
+ ${BOOTSTRAPPING} < 700026
+_crunchgen= usr.sbin/crunch/crunchgen
+.endif
+
+.if ${MK_CDDL} != "no"
+_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
+ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
+.endif
+
+bootstrap-tools:
+.for _tool in \
+ ${_dtrace_tools} \
+ ${_strfile} \
+ ${_gperf} \
+ ${_groff} \
+ ${_ar} \
+ usr.bin/lorder \
+ usr.bin/makewhatis \
+ ${_mklocale} \
+ usr.bin/rpcgen \
+ usr.bin/xinstall \
+ ${_gensnmptree} \
+ usr.sbin/config \
+ ${_crunchgen}
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${MAKE} DIRPRFX=${_tool}/ obj; \
+ ${MAKE} DIRPRFX=${_tool}/ depend; \
+ ${MAKE} DIRPRFX=${_tool}/ all; \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
+.endfor
+
+#
+# build-tools: Build special purpose build tools
+#
+.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules)
+_aicasm= sys/modules/aic7xxx/aicasm
+.endif
+
+.if !defined(NO_SHARE)
+_share= share/syscons/scrnmaps
+.endif
+
+.if ${MK_KERBEROS} != "no"
+_kerberos5_tools= kerberos5/tools
+.endif
+
+.if ${MK_RESCUE} != "no"
+_rescue= rescue/rescue
+.endif
+
+build-tools:
+.for _tool in \
+ bin/csh \
+ bin/sh \
+ ${_rescue} \
+ lib/ncurses/ncurses \
+ lib/ncurses/ncursesw \
+ ${_share} \
+ ${_aicasm} \
+ usr.bin/awk \
+ lib/libmagic \
+ usr.sbin/sysinstall
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${MAKE} DIRPRFX=${_tool}/ obj; \
+ ${MAKE} DIRPRFX=${_tool}/ build-tools
+.endfor
+.for _tool in \
+ gnu/usr.bin/cc/cc_tools \
+ ${_kerberos5_tools}
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${MAKE} DIRPRFX=${_tool}/ obj; \
+ ${MAKE} DIRPRFX=${_tool}/ depend; \
+ ${MAKE} DIRPRFX=${_tool}/ all
+.endfor
+
+#
+# cross-tools: Build cross-building tools
+#
+.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035
+.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
+_btxld= usr.sbin/btxld
+.endif
+.endif
+.if ${TARGET_ARCH} != ${MACHINE_ARCH}
+.if ${MK_RESCUE} != "no" || defined(RELEASEDIR)
+_crunchide= usr.sbin/crunch/crunchide
+.endif
+.if ${TARGET_ARCH} == "i386" && defined(RELEASEDIR)
+_kgzip= usr.sbin/kgzip
+.endif
+.endif
+
+cross-tools:
+.for _tool in \
+ gnu/usr.bin/binutils \
+ gnu/usr.bin/cc \
+ usr.bin/sed \
+ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \
+ ${_btxld} \
+ ${_crunchide} \
+ ${_kgzip}
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${MAKE} DIRPRFX=${_tool}/ obj; \
+ ${MAKE} DIRPRFX=${_tool}/ depend; \
+ ${MAKE} DIRPRFX=${_tool}/ all; \
+ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
+.endfor
+
+#
+# hierarchy - ensure that all the needed directories are present
+#
+hierarchy:
+ cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
+
+#
+# libraries - build all libraries, and install them under ${DESTDIR}.
+#
+# The list of libraries with dependents (${_prebuild_libs}) and their
+# interdependencies (__L) are built automatically by the
+# ${.CURDIR}/tools/make_libdeps.sh script.
+#
+libraries:
+ cd ${.CURDIR}; \
+ ${MAKE} -f Makefile.inc1 _prereq_libs; \
+ ${MAKE} -f Makefile.inc1 _startup_libs; \
+ ${MAKE} -f Makefile.inc1 _prebuild_libs; \
+ ${MAKE} -f Makefile.inc1 _generic_libs;
+
+#
+# static libgcc.a prerequisite for shared libc
+#
+_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc
+
+# These dependencies are not automatically generated:
+#
+# gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before
+# all shared libraries for ELF.
+#
+_startup_libs= gnu/lib/csu
+.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
+_startup_libs+= lib/csu/${MACHINE_ARCH}-elf
+.else
+_startup_libs+= lib/csu/${MACHINE_ARCH}
+.endif
+_startup_libs+= gnu/lib/libgcc
+_startup_libs+= lib/libc
+
+gnu/lib/libgcc__L: lib/libc__L
+
+_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \
+ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libroken} \
+ ${_kerberos5_lib_libheimntlm} ${_kerberos5_lib_libgssapi_krb5} \
+ lib/libbz2 lib/libcom_err lib/libcrypt lib/libelf \
+ lib/libexpat \
+ ${_lib_cddl} ${_lib_libgssapi} ${_lib_libipx} \
+ lib/libkiconv lib/libkvm lib/libmd \
+ lib/ncurses/ncurses lib/ncurses/ncursesw \
+ lib/libopie lib/libpam ${_lib_libthr} \
+ lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
+ ${_lib_libypclnt} lib/libz lib/msun \
+ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \
+ ${_secure_lib_libssl} lib/libdwarf lib/libproc
+
+.if ${MK_LIBTHR} != "no"
+_lib_libthr= lib/libthr
+.endif
+
+_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
+
+lib/libopie__L lib/libtacplus__L: lib/libmd__L
+
+.if ${MK_CDDL} != "no"
+_cddl_lib= cddl/lib
+.endif
+
+.if ${MK_CRYPT} != "no"
+.if ${MK_OPENSSL} != "no"
+_secure_lib_libcrypto= secure/lib/libcrypto
+_secure_lib_libssl= secure/lib/libssl
+lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L
+.if ${MK_OPENSSH} != "no"
+_secure_lib_libssh= secure/lib/libssh
+secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L
+.if ${MK_KERBEROS} != "no"
+kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \
+ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \
+ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \
+ lib/libcrypt__L
+secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L
+.endif
+.endif
+.endif
+_secure_lib= secure/lib
+.endif
+
+.if ${MK_IPX} != "no"
+_lib_libipx= lib/libipx
+.endif
+
+.if ${MK_KERBEROS} != "no"
+_kerberos5_lib= kerberos5/lib
+_kerberos5_lib_libasn1= kerberos5/lib/libasn1
+_kerberos5_lib_libkrb5= kerberos5/lib/libkrb5
+_kerberos5_lib_libhx509= kerberos5/lib/libhx509
+_kerberos5_lib_libroken= kerberos5/lib/libroken
+_kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm
+_kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5
+_lib_libgssapi= lib/libgssapi
+.endif
+
+.if ${MK_NIS} != "no"
+_lib_libypclnt= lib/libypclnt
+.endif
+
+.if ${MK_OPENSSL} == "no"
+lib/libradius__L: lib/libmd__L
+.endif
+
+.for _lib in ${_prereq_libs}
+${_lib}__PL: .PHONY
+.if exists(${.CURDIR}/${_lib})
+ ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
+ cd ${.CURDIR}/${_lib}; \
+ ${MAKE} DIRPRFX=${_lib}/ obj; \
+ ${MAKE} DIRPRFX=${_lib}/ depend; \
+ ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all; \
+ ${MAKE} -DWITHOUT_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
+.endif
+.endfor
+
+.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
+${_lib}__L: .PHONY
+.if exists(${.CURDIR}/${_lib})
+ ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
+ cd ${.CURDIR}/${_lib}; \
+ ${MAKE} DIRPRFX=${_lib}/ obj; \
+ ${MAKE} DIRPRFX=${_lib}/ depend; \
+ ${MAKE} DIRPRFX=${_lib}/ all; \
+ ${MAKE} DIRPRFX=${_lib}/ install
+.endif
+.endfor
+
+# 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
+ ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
+ cd ${.CURDIR}/lib/libpam; \
+ ${MAKE} DIRPRFX=lib/libpam/ obj; \
+ ${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
+
+_prereq_libs: ${_prereq_libs:S/$/__PL/}
+_startup_libs: ${_startup_libs:S/$/__L/}
+_prebuild_libs: ${_prebuild_libs:S/$/__L/}
+_generic_libs: ${_generic_libs:S/$/__L/}
+
+.for __target in all clean cleandepend cleandir depend includes obj
+.for entry in ${SUBDIR}
+${entry}.${__target}__D: .PHONY
+ ${_+_}@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \
+ ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \
+ edir=${entry}.${MACHINE_ARCH}; \
+ cd ${.CURDIR}/$${edir}; \
+ else \
+ ${ECHODIR} "===> ${DIRPRFX}${entry} (${__target})"; \
+ edir=${entry}; \
+ cd ${.CURDIR}/$${edir}; \
+ fi; \
+ ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
+.endfor
+par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
+.endfor
+
+.include <bsd.subdir.mk>
+
+.if make(check-old) || make(check-old-dirs) || \
+ make(check-old-files) || make(check-old-libs) || \
+ make(delete-old) || make(delete-old-dirs) || \
+ make(delete-old-files) || make(delete-old-libs)
+
+#
+# check for / delete old files section
+#
+
+.include "ObsoleteFiles.inc"
+
+OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \
+else you can not start such an application. Consult UPDATING for more \
+information regarding how to cope with the removal/revision bump of a \
+specific library."
+
+.if !defined(BATCH_DELETE_OLD_FILES)
+RM_I=-i
+.else
+RM_I=-v
+.endif
+
+delete-old-files:
+ @echo ">>> Removing old files (only deletes safe to delete libs)"
+# Ask for every old file if the user really wants to remove it.
+# It's annoying, but better safe than sorry.
+ @for file in ${OLD_FILES}; do \
+ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
+ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
+ rm ${RM_I} "${DESTDIR}/$${file}"; \
+ fi; \
+ done
+# Remove catpages without corresponding manpages.
+ @3<&0; \
+ find ${DESTDIR}/usr/share/man/cat* ! -type d | \
+ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
+ while read catpage; do \
+ read manpage; \
+ if [ ! -e "$${manpage}" ]; then \
+ rm ${RM_I} $${catpage} <&3 ; \
+ fi; \
+ done
+ @echo ">>> Old files removed"
+
+check-old-files:
+ @echo ">>> Checking for old files"
+ @for file in ${OLD_FILES}; do \
+ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
+ echo "${DESTDIR}/$${file}"; \
+ fi; \
+ done
+# Check for catpages without corresponding manpages.
+ @find ${DESTDIR}/usr/share/man/cat* ! -type d | \
+ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
+ while read catpage; do \
+ read manpage; \
+ if [ ! -e "$${manpage}" ]; then \
+ echo $${catpage} ; \
+ fi; \
+ done
+
+delete-old-libs:
+ @echo ">>> Removing old libraries"
+ @echo "${OLD_LIBS_MESSAGE}" | fmt
+ @for file in ${OLD_LIBS}; do \
+ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
+ chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
+ rm ${RM_I} "${DESTDIR}/$${file}"; \
+ fi; \
+ done
+ @echo ">>> Old libraries removed"
+
+check-old-libs:
+ @echo ">>> Checking for old libraries"
+ @for file in ${OLD_LIBS}; do \
+ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
+ echo "${DESTDIR}/$${file}"; \
+ fi; \
+ done
+
+delete-old-dirs:
+ @echo ">>> Removing old directories"
+ @for dir in ${OLD_DIRS}; do \
+ if [ -d "${DESTDIR}/$${dir}" ]; then \
+ rmdir -v "${DESTDIR}/$${dir}" || true; \
+ elif [ -L "${DESTDIR}/$${dir}" ]; then \
+ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
+ fi; \
+ done
+ @echo ">>> Old directories removed"
+
+check-old-dirs:
+ @echo ">>> Checking for old directories"
+ @for dir in ${OLD_DIRS}; do \
+ if [ -d "${DESTDIR}/$${dir}" ]; then \
+ echo "${DESTDIR}/$${dir}"; \
+ elif [ -L "${DESTDIR}/$${dir}" ]; then \
+ echo "${DESTDIR}/$${dir} is a link, please remove everything manually."; \
+ fi; \
+ done
+
+delete-old: delete-old-files delete-old-dirs
+ @echo "To remove old libraries run '${MAKE} delete-old-libs'."
+
+check-old: check-old-files check-old-libs check-old-dirs
+ @echo "To remove old files and directories run '${MAKE} delete-old'."
+ @echo "To remove old libraries run '${MAKE} delete-old-libs'."
+
+.endif
+
+#
+# showconfig - show build configuration.
+#
+showconfig:
+ @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort
+
+
+###############
+
+.if defined(XDEV) && defined(XDEV_ARCH)
+
+NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \
+ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \
+ -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS
+
+XDDIR=${XDEV}-freebsd
+XDTP=/usr/${XDDIR}
+CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
+ TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH}
+CDENV= ${CDBENV} \
+ _SHLIBDIRPREFIX=${XDTP} \
+ TOOLS_PREFIX=${XDTP}
+CD2ENV=${CDENV} \
+ MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH}
+
+CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp
+CDMAKE=${CDENV} ${MAKE} ${NOFUN}
+CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
+XDDESTDIR=${DESTDIR}${XDTP}
+.if !defined(OSREL)
+OSREL!= uname -r | sed -e 's/[-(].*//'
+.endif
+
+.ORDER: xdev-build xdev-install
+xdev: xdev-build xdev-install
+
+.ORDER: _xb-build-tools _xb-cross-tools
+xdev-build: _xb-build-tools _xb-cross-tools
+
+_xb-build-tools:
+ ${_+_}cd ${.CURDIR}; \
+ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
+
+_xb-cross-tools:
+.for _tool in \
+ gnu/usr.bin/binutils \
+ gnu/usr.bin/cc
+ ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${CDMAKE} DIRPRFX=${_tool}/ obj; \
+ ${CDMAKE} DIRPRFX=${_tool}/ depend; \
+ ${CDMAKE} DIRPRFX=${_tool}/ all
+.endfor
+
+_xi-mtree:
+ ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}"
+ mkdir -p ${XDDESTDIR}
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
+ -p ${XDDESTDIR} >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
+ -p ${XDDESTDIR}/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
+ -p ${XDDESTDIR}/usr/include >/dev/null
+
+.ORDER: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+xdev-install: _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links
+
+_xi-cross-tools:
+ @echo "_xi-cross-tools"
+.for _tool in \
+ gnu/usr.bin/binutils \
+ gnu/usr.bin/cc
+ ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \
+ cd ${.CURDIR}/${_tool}; \
+ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR}
+.endfor
+
+_xi-includes:
+ ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \
+ DESTDIR=${XDDESTDIR}
+
+_xi-libraries:
+ ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \
+ DESTDIR=${XDDESTDIR}
+
+_xi-links:
+ ${_+_}cd ${XDDESTDIR}/usr/bin; \
+ for i in *; do \
+ ln -sf ../../${XDTP}/usr/bin/$$i \
+ ../../../../usr/bin/${XDDIR}-$$i; \
+ ln -sf ../../${XDTP}/usr/bin/$$i \
+ ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \
+ done
+.endif
5,102 ObsoleteFiles.inc
5,102 additions, 0 deletions not shown
87 README
@@ -0,0 +1,87 @@
+This is the top level of the FreeBSD source directory. This file
+was last revised on:
+$FreeBSD: src/README,v 1.24.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+
+For copyright information, please see the file COPYRIGHT in this
+directory (additional copyright information also exists for some
+sources in this tree - please see the specific source directories for
+more information).
+
+The Makefile in this directory supports a number of targets for
+building components (or all) of the FreeBSD source tree, the most
+commonly used one being ``world'', which rebuilds and installs
+everything in the FreeBSD system from the source tree except the
+kernel, the kernel-modules and the contents of /etc. The ``world''
+target should only be used in cases where the source tree has not
+changed from the currently running version. See:
+http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
+for more information, including setting make(1) variables.
+
+The ``buildkernel'' and ``installkernel'' targets build and install
+the kernel and the modules (see below). Please see the top of
+the Makefile in this directory for more information on the
+standard build targets and compile-time flags.
+
+Building a kernel is a somewhat more involved process, documentation
+for which can be found at:
+ http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
+And in the config(8) man page.
+Note: If you want to build and install the kernel with the
+``buildkernel'' and ``installkernel'' targets, you might need to build
+world before. More information is available in the handbook.
+
+The sample kernel configuration files reside in the sys/<arch>/conf
+sub-directory (assuming that you've installed the kernel sources), the
+file named GENERIC being the one used to build your initial installation
+kernel. The file NOTES contains entries and documentation for all possible
+devices, not just those commonly used. It is the successor of the ancient
+LINT file, but in contrast to LINT, it is not buildable as a kernel but a
+pure reference and documentation file.
+
+
+Source Roadmap:
+---------------
+bin System/user commands.
+
+contrib Packages contributed by 3rd parties.
+
+crypto Cryptography stuff (see crypto/README).
+
+etc Template files for /etc.
+
+games Amusements.
+
+gnu Various commands and libraries under the GNU Public License.
+ Please see gnu/COPYING* for more information.
+
+include System include files.
+
+kerberos5 Kerberos5 (Heimdal) package.
+
+lib System libraries.
+
+libexec System daemons.
+
+release Release building Makefile & associated tools.
+
+rescue Build system for statically linked /rescue utilities.
+
+sbin System commands.
+
+secure Cryptographic libraries and commands.
+
+share Shared resources.
+
+sys Kernel sources.
+
+tools Utilities for regression testing and miscellaneous tasks.
+
+usr.bin User commands.
+
+usr.sbin System administration commands.
+
+
+For information on synchronizing your source tree with one or more of
+the FreeBSD Project's development branches, please see:
+
+ http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
1,690 UPDATING
@@ -0,0 +1,1690 @@
+Updating Information for FreeBSD current users
+
+This file is maintained and copyrighted by M. Warner Losh
+<imp@village.org>. See end of file for further details. For commonly
+done items, please see the COMMON ITEMS: section later in the file.
+
+Items affecting the ports and packages system can be found in
+/usr/ports/UPDATING. Please read that file before running
+portupgrade.
+
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
+ For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options
+ were left in the GENERIC kernel because the kernel does not
+ work properly without them. For sun4v all of the normal kernel
+ debugging tools present in HEAD were left in place because
+ sun4v support still needs work to become production ready.
+
+20091125:
+ 8.0-RELEASE.
+
+20090929:
+ 802.11s D3.03 support was committed. This is incompatible with
+ the previous code, which was based on D3.0.
+
+20090915:
+ ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
+ mount(8) and -a option for df(1) to see them.
+
+20090813:
+ Remove the option STOP_NMI. The default action is now to use NMI
+ only for KDB via the newly introduced function stop_cpus_hard()
+ and maintain stop_cpus() to just use a normal IPI_STOP on ia32
+ and amd64.
+
+20090803:
+ RELENG_8 branched.
+
+20090719:
+ Bump the shared library version numbers for all libraries that
+ do not use symbol versioning as part of the 8.0-RELEASE cycle.
+ Bump __FreeBSD_version to 800105.
+
+20090714:
+ Due to changes in the implementation of virtual network stack
+ support, all network-related kernel modules must be recompiled.
+ As this change breaks the ABI, bump __FreeBSD_version to 800104.
+
+20090713:
+ The TOE interface to the TCP syncache has been modified to remove struct
+ tcpopt (<netinet/tcp_var.h>) from the ABI of the network stack. The
+ cxgb driver is the only TOE consumer affected by this change, and needs
+ to be recompiled along with the kernel. As this change breaks the ABI,
+ bump __FreeBSD_version to 800103.
+
+20090712:
+ Padding has been added to struct tcpcb, sackhint and tcpstat in
+ <netinet/tcp_var.h> to facilitate future MFCs and bug fixes whilst
+ maintainig the ABI. However, this change breaks the ABI, so bump
+ __FreeBSD_version to 800102. User space tools that rely on the size of
+ any of these structs (e.g. sockstat) need to be recompiled.
+
+20090630:
+ The NFS_LEGACYRPC option has been removed along with the old
+ kernel RPC implementation that this option selected. Kernel
+ configurations may need to be adjusted.
+
+20090629:
+ The network interface device nodes at /dev/net/<interface> have
+ been removed. All ioctl operations can be performed the normal
+ way using routing sockets. The kqueue functionality can
+ generally be replaced with routing sockets.
+
+20090628:
+ The documentation from the FreeBSD Documentation Project
+ (Handbook, FAQ, etc.) is now installed via packages by
+ sysinstall(8) and under the /usr/local/share/doc/freebsd
+ directory instead of /usr/share/doc.
+
+20090624:
+ The ABI of various structures related to the SYSV IPC API have
+ been changed. As a result, the COMPAT_FREEBSD[456] and COMPAT_43
+ kernel options now all require COMPAT_FREEBSD7.
+ Bump __FreeBSD_version to 800100.
+
+20090622:
+ Layout of struct vnet has changed as routing related variables
+ were moved to their own Vimage module. Modules need to be
+ recompiled. Bump __FreeBSD_version to 800099.
+
+20090619:
+ NGROUPS_MAX and NGROUPS have been increased from 16 to 1023
+ and 1024 respectively. As long as no more than 16 groups per
+ process are used, no changes should be visible. When more
+ than 16 groups are used, old binaries may fail if they call
+ getgroups() or getgrouplist() with statically sized storage.
+ Recompiling will work around this, but applications should be
+ modified to use dynamically allocated storage for group arrays
+ as POSIX.1-2008 does not cap an implementation's number of
+ supported groups at NGROUPS_MAX+1 as previous versions did.
+
+ NFS and portalfs mounts may also be affected as the list of
+ groups is truncated to 16. Users of NFS who use more than 16
+ groups, should take care that negative group permissions are not
+ used on the exported file systems as they will not be reliable
+ unless a GSSAPI based authentication method is used.
+
+20090616:
+ The compiling option ADAPTIVE_LOCKMGRS has been introduced.
+ This option compiles in the support for adaptive spinning for lockmgrs
+ which want to enable it. The lockinit() function now accepts the
+ flag LK_ADAPTIVE in order to make the lock object subject to
+ adaptive spinning when both held in write and read mode.
+
+20090613:
+ The layout of the structure returned by IEEE80211_IOC_STA_INFO
+ has changed. User applications that use this ioctl need to be
+ rebuilt.
+
+20090611:
+ The layout of struct thread has changed. Kernel and modules
+ need to be rebuilt.
+
+20090608:
+ The layout of structs ifnet, domain, protosw and vnet_net has
+ changed. Kernel modules need to be rebuilt.
+ Bump __FreeBSD_version to 800097.
+
+20090602:
+ window(1) has been removed from the base system. It can now be
+ installed from ports. The port is called misc/window.
+
+20090601:
+ The way we are storing and accessing `routing table' entries
+ has changed. Programs reading the FIB, like netstat, need to
+ be re-compiled.
+
+20090601:
+ A new netisr implementation has been added for FreeBSD 8. Network
+ file system modules, such as igmp, ipdivert, and others, should be
+ rebuilt.
+ Bump __FreeBSD_version to 800096.
+
+20090530:
+ Remove the tunable/sysctl debug.mpsafevfs as its initial purpose
+ is no more valid.
+
+20090530:
+ Add VOP_ACCESSX(9). File system modules need to be rebuilt.
+ Bump __FreeBSD_version to 800094.
+
+20090529:
+ Add mnt_xflag field to 'struct mount'. File system modules
+ need to be rebuilt.
+ Bump __FreeBSD_version to 800093.
+
+20090528:
+ The compiling option ADAPTIVE_SX has been retired while it has been
+ introduced the option NO_ADAPTIVE_SX which handles the reversed logic.
+ The KPI for sx_init_flags() changes as accepting flags:
+ SX_ADAPTIVESPIN flag has been retired while the SX_NOADAPTIVE flag
+ has been introduced in order to handle the reversed logic.
+ Bump __FreeBSD_version to 800092.
+
+20090527:
+ Add support for hierarchical jails. Remove global securelevel.
+ Bump __FreeBSD_version to 800091.
+
+20090523:
+ The layout of struct vnet_net has changed, therefore modules
+ need to be rebuilt.
+ Bump __FreeBSD_version to 800090.
+
+20090523:
+ The newly imported zic(8) produces a new format in the
+ output. Please run tzsetup(8) to install the newly created
+ data to /etc/localtime.
+
+20090520:
+ The sysctl tree for the usb stack has renamed from hw.usb2.* to
+ hw.usb.* and is now consistent again with previous releases.
+
+20090520:
+ 802.11 monitor mode support was revised and driver api's
+ were changed. Drivers dependent on net80211 now support
+ DLT_IEEE802_11_RADIO instead of DLT_IEEE802_11. No
+ user-visible data structures were changed but applications
+ that use DLT_IEEE802_11 may require changes.
+ Bump __FreeBSD_version to 800088.
+
+20090430:
+ The layout of the following structs has changed: sysctl_oid,
+ socket, ifnet, inpcbinfo, tcpcb, syncache_head, vnet_inet,
+ vnet_inet6 and vnet_ipfw. Most modules need to be rebuild or
+ panics may be experienced. World rebuild is required for
+ correctly checking networking state from userland.
+ Bump __FreeBSD_version to 800085.
+
+20090429:
+ MLDv2 and Source-Specific Multicast (SSM) have been merged
+ to the IPv6 stack. VIMAGE hooks are in but not yet used.
+ The implementation of SSM within FreeBSD's IPv6 stack closely
+ follows the IPv4 implementation.
+
+ For kernel developers:
+
+ * The most important changes are that the ip6_output() and
+ ip6_input() paths no longer take the IN6_MULTI_LOCK,
+ and this lock has been downgraded to a non-recursive mutex.
+
+ * As with the changes to the IPv4 stack to support SSM, filtering
+ of inbound multicast traffic must now be performed by transport
+ protocols within the IPv6 stack. This does not apply to TCP and
+ SCTP, however, it does apply to UDP in IPv6 and raw IPv6.
+
+ * The KPIs used by IPv6 multicast are similar to those used by
+ the IPv4 stack, with the following differences:
+ * im6o_mc_filter() is analogous to imo_multicast_filter().
+ * The legacy KAME entry points in6_joingroup and in6_leavegroup()
+ are shimmed to in6_mc_join() and in6_mc_leave() respectively.
+ * IN6_LOOKUP_MULTI() has been deprecated and removed.
+ * IPv6 relies on MLD for the DAD mechanism. KAME's internal KPIs
+ for MLDv1 have an additional 'timer' argument which is used to
+ jitter the initial membership report for the solicited-node
+ multicast membership on-link.
+ * This is not strictly needed for MLDv2, which already jitters
+ its report transmissions. However, the 'timer' argument is
+ preserved in case MLDv1 is active on the interface.
+
+ * The KAME linked-list based IPv6 membership implementation has
+ been refactored to use a vector similar to that used by the IPv4
+ stack.
+ Code which maintains a list of its own multicast memberships
+ internally, e.g. carp, has been updated to reflect the new
+ semantics.
+
+ * There is a known Lock Order Reversal (LOR) due to in6_setscope()
+ acquiring the IF_AFDATA_LOCK and being called within ip6_output().
+ Whilst MLDv2 tries to avoid this otherwise benign LOR, it is an
+ implementation constraint which needs to be addressed in HEAD.
+
+ For application developers:
+
+ * The changes are broadly similar to those made for the IPv4
+ stack.
+
+ * The use of IPv4 and IPv6 multicast socket options on the same
+ socket, using mapped addresses, HAS NOT been tested or supported.
+
+ * There are a number of issues with the implementation of various
+ IPv6 multicast APIs which need to be resolved in the API surface
+ before the implementation is fully compatible with KAME userland
+ use, and these are mostly to do with interface index treatment.
+
+ * The literature available discusses the use of either the delta / ASM
+ API with setsockopt(2)/getsockopt(2), or the full-state / ASM API
+ using setsourcefilter(3)/getsourcefilter(3). For more information
+ please refer to RFC 3768, 'Socket Interface Extensions for
+ Multicast Source Filters'.
+
+ * Applications which use the published RFC 3678 APIs should be fine.
+
+ For systems administrators:
+
+ * The mtest(8) utility has been refactored to support IPv6, in
+ addition to IPv4. Interface addresses are no longer accepted
+ as arguments, their names must be used instead. The utility
+ will map the interface name to its first IPv4 address as
+ returned by getifaddrs(3).
+
+ * The ifmcstat(8) utility has also been updated to print the MLDv2
+ endpoint state and source filter lists via sysctl(3).
+
+ * The net.inet6.ip6.mcast.loop sysctl may be tuned to 0 to disable
+ loopback of IPv6 multicast datagrams by default; it defaults to 1
+ to preserve the existing behaviour. Disabling multicast loopback is
+ recommended for optimal system performance.
+
+ * The IPv6 MROUTING code has been changed to examine this sysctl
+ instead of attempting to perform a group lookup before looping
+ back forwarded datagrams.
+
+ Bump __FreeBSD_version to 800084.
+
+20090422:
+ Implement low-level Bluetooth HCI API.
+ Bump __FreeBSD_version to 800083.
+
+20090419:
+ The layout of struct malloc_type, used by modules to register new
+ memory allocation types, has changed. Most modules will need to
+ be rebuilt or panics may be experienced.
+ Bump __FreeBSD_version to 800081.
+
+20090415:
+ Anticipate overflowing inp_flags - add inp_flags2.
+ This changes most offsets in inpcb, so checking v4 connection
+ state will require a world rebuild.
+ Bump __FreeBSD_version to 800080.
+
+20090415:
+ Add an llentry to struct route and struct route_in6. Modules
+ embedding a struct route will need to be recompiled.
+ Bump __FreeBSD_version to 800079.
+
+20090414:
+ The size of rt_metrics_lite and by extension rtentry has changed.
+ Networking administration apps will need to be recompiled.
+ The route command now supports show as an alias for get, weighting
+ of routes, sticky and nostick flags to alter the behavior of stateful
+ load balancing.
+ Bump __FreeBSD_version to 800078.
+
+20090408:
+ Do not use Giant for kbdmux(4) locking. This is wrong and
+ apparently causing more problems than it solves. This will
+ re-open the issue where interrupt handlers may race with
+ kbdmux(4) in polling mode. Typical symptoms include (but
+ not limited to) duplicated and/or missing characters when
+ low level console functions (such as gets) are used while
+ interrupts are enabled (for example geli password prompt,
+ mountroot prompt etc.). Disabling kbdmux(4) may help.
+
+20090407:
+ The size of structs vnet_net, vnet_inet and vnet_ipfw has changed;
+ kernel modules referencing any of the above need to be recompiled.
+ Bump __FreeBSD_version to 800075.
+
+20090320:
+ GEOM_PART has become the default partition slicer for storage devices,
+ replacing GEOM_MBR, GEOM_BSD, GEOM_PC98 and GEOM_GPT slicers. It
+ introduces some changes:
+
+ MSDOS/EBR: the devices created from MSDOS extended partition entries
+ (EBR) can be named differently than with GEOM_MBR and are now symlinks
+ to devices with offset-based names. fstabs may need to be modified.
+
+ BSD: the "geometry does not match label" warning is harmless in most
+ cases but it points to problems in file system misalignment with
+ disk geometry. The "c" partition is now implicit, covers the whole
+ top-level drive and cannot be (mis)used by users.
+
+ General: Kernel dumps are now not allowed to be written to devices
+ whose partition types indicate they are meant to be used for file
+ systems (or, in case of MSDOS partitions, as something else than
+ the "386BSD" type).
+
+ Most of these changes date approximately from 200812.
+
+20090319:
+ The uscanner(4) driver has been removed from the kernel. This follows
+ Linux removing theirs in 2.6 and making libusb the default interface
+ (supported by sane).
+
+20090319:
+ The multicast forwarding code has been cleaned up. netstat(1)
+ only relies on KVM now for printing bandwidth upcall meters.
+ The IPv4 and IPv6 modules are split into ip_mroute_mod and
+ ip6_mroute_mod respectively. The config(5) options for statically
+ compiling this code remain the same, i.e. 'options MROUTING'.
+
+20090315:
+ Support for the IFF_NEEDSGIANT network interface flag has been
+ removed, which means that non-MPSAFE network device drivers are no
+ longer supported. In particular, if_ar, if_sr, and network device
+ drivers from the old (legacy) USB stack can no longer be built or
+ used.
+
+20090313:
+ POSIX.1 Native Language Support (NLS) has been enabled in libc and
+ a bunch of new language catalog files have also been added.
+ This means that some common libc messages are now localized and
+ they depend on the LC_MESSAGES environmental variable.
+
+20090313:
+ The k8temp(4) driver has been renamed to amdtemp(4) since
+ support for K10 and K11 CPU families was added.
+
+20090309:
+ IGMPv3 and Source-Specific Multicast (SSM) have been merged
+ to the IPv4 stack. VIMAGE hooks are in but not yet used.
+
+ For kernel developers, the most important changes are that the
+ ip_output() and ip_input() paths no longer take the IN_MULTI_LOCK(),
+ and this lock has been downgraded to a non-recursive mutex.
+
+ Transport protocols (UDP, Raw IP) are now responsible for filtering
+ inbound multicast traffic according to group membership and source
+ filters. The imo_multicast_filter() KPI exists for this purpose.
+ Transports which do not use multicast (SCTP, TCP) already reject
+ multicast by default. Forwarding and receive performance may improve
+ as a mutex acquisition is no longer needed in the ip_input()
+ low-level input path. in_addmulti() and in_delmulti() are shimmed
+ to new KPIs which exist to support SSM in-kernel.
+
+ For application developers, it is recommended that loopback of
+ multicast datagrams be disabled for best performance, as this
+ will still cause the lock to be taken for each looped-back
+ datagram transmission. The net.inet.ip.mcast.loop sysctl may
+ be tuned to 0 to disable loopback by default; it defaults to 1
+ to preserve the existing behaviour.
+
+ For systems administrators, to obtain best performance with
+ multicast reception and multiple groups, it is always recommended
+ that a card with a suitably precise hash filter is used. Hash
+ collisions will still result in the lock being taken within the
+ transport protocol input path to check group membership.
+
+ If deploying FreeBSD in an environment with IGMP snooping switches,
+ it is recommended that the net.inet.igmp.sendlocal sysctl remain
+ enabled; this forces 224.0.0.0/24 group membership to be announced
+ via IGMP.
+
+ The size of 'struct igmpstat' has changed; netstat needs to be
+ recompiled to reflect this.
+ Bump __FreeBSD_version to 800070.
+
+20090309:
+ libusb20.so.1 is now installed as libusb.so.1 and the ports system
+ updated to use it. This requires a buildworld/installworld in order to
+ update the library and dependencies (usbconfig, etc). Its advisable to
+ rebuild all ports which uses libusb. More specific directions are given