diff options
author | gjb <gjb@FreeBSD.org> | 2016-03-02 16:14:46 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2016-03-02 16:14:46 +0000 |
commit | 955ce29ea33f5aa2d5477a1fe1a2735ac278cd0d (patch) | |
tree | 9c83d6fb30867514fbcff33f80605a1fb118d720 /share | |
parent | 4719e40f5bedd0f88591120e071741635f07993b (diff) | |
parent | 774a6245596e60bf04f03e8cccab06a3194504f5 (diff) | |
download | FreeBSD-src-955ce29ea33f5aa2d5477a1fe1a2735ac278cd0d.zip FreeBSD-src-955ce29ea33f5aa2d5477a1fe1a2735ac278cd0d.tar.gz |
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'share')
52 files changed, 676 insertions, 249 deletions
diff --git a/share/i18n/csmapper/Makefile b/share/i18n/csmapper/Makefile index 18ee8fc..7c6aca3 100644 --- a/share/i18n/csmapper/Makefile +++ b/share/i18n/csmapper/Makefile @@ -31,8 +31,5 @@ charset.pivot.pvdb: charset.pivot FILES+= charset.pivot charset.pivot.pvdb CLEANFILES+= charset.pivot charset.pivot.pvdb -all: ${FILES} -realall: ${FILES} - .include "./Makefile.inc" .include <bsd.prog.mk> diff --git a/share/i18n/csmapper/Makefile.part b/share/i18n/csmapper/Makefile.part index fe4b084..2f48b70 100644 --- a/share/i18n/csmapper/Makefile.part +++ b/share/i18n/csmapper/Makefile.part @@ -73,8 +73,9 @@ FILES+= ${MAPS} CLEANFILES+= ${MAPS} .endif -realall: all -all: ${FILES} mapper.dir.${ESUBDIR} charset.pivot.${ESUBDIR} - .include "./Makefile.inc" .include <bsd.prog.mk> + +.if !defined(_SKIP_BUILD) +all: mapper.dir.${ESUBDIR} charset.pivot.${ESUBDIR} +.endif diff --git a/share/i18n/esdb/Makefile b/share/i18n/esdb/Makefile index 69d4445..924505b 100644 --- a/share/i18n/esdb/Makefile +++ b/share/i18n/esdb/Makefile @@ -28,8 +28,5 @@ esdb.alias: ${SUBDIR} esdb.alias.db: esdb.alias ${MKESDB} -m -o ${.TARGET} ${.ALLSRC} -all: ${FILES} -realall: ${FILES} - .include "./Makefile.inc" .include <bsd.prog.mk> diff --git a/share/i18n/esdb/Makefile.part b/share/i18n/esdb/Makefile.part index cde0775..60048c2 100644 --- a/share/i18n/esdb/Makefile.part +++ b/share/i18n/esdb/Makefile.part @@ -60,8 +60,7 @@ esdb.alias.${ESUBDIR}: ${PARTFILE} ${ALIASFILE} .endfor echo >>${.TARGET} -all: realall -realall: esdb.dir.${ESUBDIR} esdb.alias.${ESUBDIR} codesets +all: esdb.dir.${ESUBDIR} esdb.alias.${ESUBDIR} codesets codesets: ${ESDB} .if !defined(NO_PREPROC) diff --git a/share/man/man4/aio.4 b/share/man/man4/aio.4 index 8e773d9..f973639 100644 --- a/share/man/man4/aio.4 +++ b/share/man/man4/aio.4 @@ -27,24 +27,116 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2002 +.Dd March 1, 2016 .Dt AIO 4 .Os .Sh NAME .Nm aio .Nd asynchronous I/O -.Sh SYNOPSIS -To link into the kernel: -.Cd "options VFS_AIO" -.Pp -To load as a kernel loadable module: -.Dl kldload aio .Sh DESCRIPTION The .Nm facility provides system calls for asynchronous I/O. -It is available both as a kernel option for static inclusion and as a -dynamic kernel module. +However, asynchronous I/O operations are only enabled for certain file +types by default. +Asynchronous I/O operations for other file types may block an AIO daemon +indefinitely resulting in process and/or system hangs. +Asynchronous I/O operations can be enabled for all file types by setting +the +.Va vfs.aio.enable_unsafe +sysctl node to a non-zero value. +.Pp +Asynchronous I/O operations on sockets and raw disk devices do not block +indefinitely and are enabled by default. +.Pp +The +.Nm +facility uses kernel processes +(also known as AIO daemons) +to service most asynchronous I/O requests. +These processes are grouped into pools containing a variable number of +processes. +Each pool will add or remove processes to the pool based on load. +Pools can be configured by sysctl nodes that define the minimum +and maximum number of processes as well as the amount of time an idle +process will wait before exiting. +.Pp +One pool of AIO daemons is used to service asynchronous I/O requests for +sockets. +These processes are named +.Dq soaiod<N> . +The following sysctl nodes are used with this pool: +.Bl -tag -width indent +.It Va kern.ipc.aio.num_procs +The current number of processes in the pool. +.It Va kern.ipc.aio.target_procs +The minimum number of processes that should be present in the pool. +.It Va kern.ipc.aio.max_procs +The maximum number of processes permitted in the pool. +.It Va kern.ipc.aio.lifetime +The amount of time a process is permitted to idle in clock ticks. +If a process is idle for this amount of time and there are more processes +in the pool than the target minimum, +the process will exit. +.El +.Pp +A second pool of AIO daemons is used to service all other asynchronous I/O +requests except for I/O requests to raw disks. +These processes are named +.Dq aiod<N> . +The following sysctl nodes are used with this pool: +.Bl -tag -width indent +.It Va vfs.aio.num_aio_procs +The current number of processes in the pool. +.It Va vfs.aio.target_aio_procs +The minimum number of processes that should be present in the pool. +.It Va vfs.aio.max_aio_procs +The maximum number of processes permitted in the pool. +.It Va vfs.aio.aiod_lifetime +The amount of time a process is permitted to idle in clock ticks. +If a process is idle for this amount of time and there are more processes +in the pool than the target minimum, +the process will exit. +.El +.Pp +Asynchronous I/O requests for raw disks are queued directly to the disk +device layer after temporarily wiring the user pages associated with the +request. +These requests are not serviced by any of the AIO daemon pools. +.Pp +Several limits on the number of asynchronous I/O requests are imposed both +system-wide and per-process. +These limits are configured via the following sysctls: +.Bl -tag -width indent +.It Va vfs.aio.max_buf_aio +The maximum number of queued asynchronous I/O requests for raw disks permitted +for a single process. +Asynchronous I/O requests that have completed but whose status has not been +retrieved via +.Xr aio_return 2 +or +.Xr aio_waitcomplete 2 +are not counted against this limit. +.It Va vfs.aio.num_buf_aio +The number of queued asynchronous I/O requests for raw disks system-wide. +.It Va vfs.aio.max_aio_queue_per_proc +The maximum number of asynchronous I/O requests for a single process +serviced concurrently by the default AIO daemon pool. +.It Va vfs.aio.max_aio_per_proc +The maximum number of outstanding asynchronous I/O requests permitted for a +single process. +This includes requests that have not been serviced, +requests currently being serviced, +and requests that have completed but whose status has not been retrieved via +.Xr aio_return 2 +or +.Xr aio_waitcomplete 2 . +.It Va vfs.aio.num_queue_count +The number of outstanding asynchronous I/O requests system-wide. +.It Va vfs.aio.max_aio_queue +The maximum number of outstanding asynchronous I/O requests permitted +system-wide. +.El .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -54,9 +146,7 @@ dynamic kernel module. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , -.Xr config 8 , -.Xr kldload 8 , -.Xr kldunload 8 +.Xr sysctl 8 .Sh HISTORY The .Nm @@ -66,3 +156,7 @@ The .Nm kernel module appeared in .Fx 5.0 . +The +.Nm +facility was integrated into all kernels in +.Fx 11.0 . diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4 index 1d208b0..afdf586 100644 --- a/share/man/man4/capsicum.4 +++ b/share/man/man4/capsicum.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2015 +.Dd February 25, 2016 .Dt CAPSICUM 4 .Os .Sh NAME @@ -104,9 +104,8 @@ associated with file descriptors; described in greater detail in .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , -.Xr libcapsicum 3 , +.Xr casper 3 , .Xr procdesc 4 , -.Xr casperd 8 .Sh HISTORY .Nm first appeared in diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4 index d1844b8..c789512 100644 --- a/share/man/man4/carp.4 +++ b/share/man/man4/carp.4 @@ -291,23 +291,23 @@ notify 0 { To see .Nm packets decoded in -.Xr tcpdump 8 +.Xr tcpdump 1 output, one needs to specify .Fl T Ar carp option, otherwise -.Xr tcpdump 8 +.Xr tcpdump 1 tries to interpret them as VRRP packets: .Bd -literal -offset indent tcpdump -npi vlan0 -T carp .Ed .Sh SEE ALSO +.Xr tcpdump 1 , .Xr inet 4 , .Xr pfsync 4 , .Xr devd.conf 5 , .Xr rc.conf 5 , .Xr ifconfig 8 , -.Xr sysctl 8 , -.Xr tcpdump 8 +.Xr sysctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4 index edbc488..3205918 100644 --- a/share/man/man4/enc.4 +++ b/share/man/man4/enc.4 @@ -129,5 +129,4 @@ variables according to your need and run: .Xr ipf 4 , .Xr ipfw 4 , .Xr ipsec 4 , -.Xr pf 4 , -.Xr tcpdump 8 +.Xr pf 4 diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4 index 05d4839..e03b65b 100644 --- a/share/man/man4/geom.4 +++ b/share/man/man4/geom.4 @@ -73,7 +73,6 @@ .Cd options GEOM_SHSEC .Cd options GEOM_STRIPE .Cd options GEOM_SUNLABEL -.Cd options GEOM_UNCOMPRESS .Cd options GEOM_UZIP .Cd options GEOM_VIRSTOR .Cd options GEOM_VOL diff --git a/share/man/man4/man4.powerpc/dtsec.4 b/share/man/man4/man4.powerpc/dtsec.4 new file mode 100644 index 0000000..a057cb2 --- /dev/null +++ b/share/man/man4/man4.powerpc/dtsec.4 @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2016 Justin Hibbits +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 28, 2016 +.Dt DTSEC 4 +.Os +.Sh NAME +.Nm dtsec +.Nd "Freescale Datapath Acceleration Architecture-based Three-Speed Ethernet Controller device driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "include ""dpaa/DPAA"" +.Cd "options QORIQ_DPAA" +.Cd "device dpaa" +.Cd "device dtsec" +.Cd "device miibus" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the DPAA-based gigabit Ethernet controller +integrated in some of the Freescale system-on-chip devices. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width xxxxxxxxxxxxxxxxxxxx +.It autoselect +Enable autoselection of the media type and options +.It 10baseT/UTP +Set 10Mbps operation +.It 100baseTX +Set 100Mbps operation +.It 1000baseT +Set 1000baseT operation +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width xxxxxxxxxxxxxxxxxxxx +.It full-duplex +Set full duplex operation +.El +.Pp +The +.Nm +driver supports two operating modes: +.Bl -tag -width xxxxxxxxxxxxxxxxxxxx +.It Regular +Normal mode, utilizing the full datapath acceleration, Buffer Manager, and Queue +Manager. +.It Independent +Runs disconnected from the Buffer Manager and Queue Manager. +.El +.Sh HARDWARE +Gigabit Ethernet controllers built into the following Freescale +system-on-chip devices are known to work with the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +P2041, P3041 +.It +P5010, P5020 +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh BUGS +The +.Nm +driver assumes that there is only one Frame Manager, and that dtsec0 controls +the MDIO interface. Though this is the case for the supported devices, other +SoCs with the DPAA controller may not work correctly. Particularly, the P5040 +and P4080 SoCs have two frame managers, which breaks this assumption. +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The base version of +.Nm +device driver was written by +.An Semihalf . +This manual page was written by +.An Justin Hibbits . diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4 index 138e049..811deb9 100644 --- a/share/man/man4/uart.4 +++ b/share/man/man4/uart.4 @@ -156,7 +156,7 @@ The .Nm driver can capture PPS timing information as defined in RFC 2783. The API, accessed via -.Xr ioctl 8 , +.Xr ioctl 2 , is available on the tty device. To use the PPS capture feature with .Xr ntpd 8 , diff --git a/share/man/man4/ucom.4 b/share/man/man4/ucom.4 index db67206..6fb0ece 100644 --- a/share/man/man4/ucom.4 +++ b/share/man/man4/ucom.4 @@ -68,7 +68,7 @@ The .Nm driver can capture PPS timing information as defined in RFC 2783. The API, accessed via -.Xr ioctl 8 , +.Xr ioctl 2 , is available on the tty device. To use the PPS capture feature with .Xr ntpd 8 , diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index e890904..6a1b5cd 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -303,6 +303,7 @@ The connector name was found in .Xr vidcontrol 1 , .Xr atkbd 4 , .Xr atkbdc 4 , +.Xr kbdmux 4 , .Xr keyboard 4 , .Xr screen 4 , .Xr splash 4 , @@ -313,7 +314,6 @@ The connector name was found in .Xr ttys 5 , .Xr config 8 , .Xr getty 8 , -.Xr kbdmux 8 , .Xr kldload 8 , .Xr moused 8 , .Xr vtfontcvt 8 diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index dd53992..d1fc461 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2015 +.Dd February 24, 2016 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -141,16 +141,6 @@ Optimization levels other than and .Fl O2 are not supported. -.Va BDECFLAGS -is provided as a set of -.Xr cc 1 -settings suggested by -.An Bruce Evans Aq Mt bde@FreeBSD.org -for developing and testing changes. -They can be used, if set, by: -.Bd -literal -offset indent -CFLAGS+=${BDECFLAGS} -.Ed .It Va CPUTYPE .Pq Vt str Controls which processor should be targeted for generated diff --git a/share/man/man5/portsnap.conf.5 b/share/man/man5/portsnap.conf.5 index f679eda..cef4c24 100644 --- a/share/man/man5/portsnap.conf.5 +++ b/share/man/man5/portsnap.conf.5 @@ -141,7 +141,7 @@ Default location of the portsnap configuration file. .Sh SEE ALSO .Xr egrep 1 , .Xr fetch 1 , -.Xr portsnap 8 , -.Xr sha256 8 +.Xr sha256 1 , +.Xr portsnap 8 .Sh AUTHORS .An Colin Percival Aq Mt cperciva@FreeBSD.org diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 9b1b68c..6025db4 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2016 +.Dd February 28, 2016 .Dt RC.CONF 5 .Os .Sh NAME @@ -2092,25 +2092,25 @@ If set to run the .Xr unbound 8 daemon as a local caching resolver. -.It Va kerberos5_server_enable +.It Va kdc_enable .Pq Vt bool Set to .Dq Li YES to start a Kerberos 5 authentication server at boot time. -.It Va kerberos5_server +.It Va kdc_program .Pq Vt str If -.Va kerberos5_server_enable +.Va kdc_enable is set to .Dq Li YES this is the path to Kerberos 5 Authentication Server. -.It Va kerberos5_server_flags +.It Va kdc_flags .Pq Vt str Empty by default. This variable contains additional flags to be passed to the Kerberos 5 authentication server. -.It Va kadmind5_server_enable +.It Va kadmind_enable .Pq Vt bool Set to .Dq Li YES @@ -2119,14 +2119,14 @@ to start the Kerberos 5 Administration Daemon; set to .Dq Li NO on a slave server. -.It Va kadmind5_server +.It Va kadmind_program .Pq Vt str If -.Va kadmind5_server_enable +.Va kadmind_enable is set to .Dq Li YES this is the path to Kerberos 5 Administration Daemon. -.It Va kpasswdd_server_enable +.It Va kpasswdd_enable .Pq Vt bool Set to .Dq Li YES @@ -2135,10 +2135,10 @@ to start the Kerberos 5 Password-Changing Daemon; set to .Dq Li NO on a slave server. -.It Va kpasswdd_server +.It Va kpasswdd_program .Pq Vt str If -.Va kpasswdd_server_enable +.Va kpasswdd_enable is set to .Dq Li YES this is the path to Kerberos 5 Password-Changing Daemon. diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 60bf53a..62c288b 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery .\" $FreeBSD$ -.Dd January 9, 2016 +.Dd March 1, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -138,9 +138,9 @@ Set to not build audit support into system programs. Set to not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS -.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 277728 2015-01-26 07:15:49Z ngie +.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz Set to not build -.Xr autofs 4 +.Xr autofs 5 related programs, libraries, and kernel modules. .It Va WITH_AUTO_OBJ .\" from FreeBSD: head/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg @@ -165,10 +165,16 @@ The resulting system cannot build programs from source. .Pp It is a default setting on arm64/aarch64. +.It Va WITH_BINUTILS +.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste +Set to build and install binutils (as, ld, objcopy, and objdump) as part +of the normal system build. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp -Set to not build binutils (as, c++-filt, gconv, -ld, nm, objcopy, objdump, readelf, size and strip) +.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste +Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic The option does not work for build targets unless some alternative @@ -177,6 +183,13 @@ toolchain is provided. .Pp It is a default setting on arm64/aarch64. +.It Va WITH_BINUTILS_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +Set build binutils (as, ld, objcopy and objdump) +as part of the bootstrap process. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. @@ -504,6 +517,8 @@ When set, it also enforces the following options: .Pp .Bl -item -compact .It +.Va WITH_FAST_DEPEND +.It .Va WITH_INSTALL_AS_USER .El .Pp @@ -586,21 +601,19 @@ and related programs. .\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 286030 2015-07-29 18:45:38Z emaste +.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste Set to build and install .Xr objcopy 1 from GNU Binutils, instead of the one from ELF Tool Chain. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -.It Va WITH_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: head/tools/build/options/WITH_ELFCOPY_AS_OBJCOPY 286030 2015-07-29 18:45:38Z emaste -Set to build and install ELF Tool Chain's elfcopy as -.Xr objcopy 1 , -instead of the one from GNU Binutils. -.Pp -It is a default setting on -arm64/aarch64. +This option is provided as a transition aid and will be removed in due time. +.It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP +.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste +Set to not build ELF Tool Chain tools +(addr2line, nm, size, strings and strip) +as part of the bootstrap process. +.Bf -symbolic +An alternate bootstrap tool chain must be provided. +.Ef .It Va WITHOUT_EXAMPLES .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to @@ -702,6 +715,13 @@ Set to not build .Pp It is a default setting on arm64/aarch64. +.It Va WITH_GDB +.\" from FreeBSD: head/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste +Set to build +.Xr gdb 1 . +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. @@ -917,11 +937,11 @@ Setting this variable will prevent building the LDNS utilities and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 249966 2013-04-27 04:09:09Z eadler +.\" from FreeBSD: head/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz Set to not build programs that support a legacy PC console; e.g., -.Xr kbdcontrol 8 +.Xr kbdcontrol 1 and -.Xr vidcontrol 8 . +.Xr vidcontrol 1 . .It Va WITHOUT_LIB32 .\" from FreeBSD: head/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp On 64-bit platforms, set to not build 32-bit library set and a @@ -1206,9 +1226,9 @@ and related programs. .\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 296264 2016-03-01 11:36:10Z trasz Set to not build -.Xr quota 8 +.Xr quota 1 and related programs. .It Va WITHOUT_RADIUS_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_RADIUS_SUPPORT 278182 2015-02-04 06:53:45Z ngie @@ -1371,9 +1391,9 @@ Set to not build and install (which is .Xr tcsh 1 ) . .It Va WITHOUT_TELNET -.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_TELNET 296264 2016-03-01 11:36:10Z trasz Set to not build -.Xr telnet 8 +.Xr telnet 1 and related programs. .It Va WITHOUT_TESTS .\" from FreeBSD: head/tools/build/options/WITHOUT_TESTS 268778 2014-07-16 21:40:11Z jmmv diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index b32d7ed..985c165 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2015 +.Dd February 26, 2016 .Dt BUILD 7 .Os .Sh NAME @@ -107,6 +107,8 @@ section below, and by the variables documented in The following list provides the names and actions for the targets supported by the build system: .Bl -tag -width ".Cm cleandepend" +.It Cm analyze +Run Clang static analyzer against all objects and present output on stdout. .It Cm check Run tests for a given subdirectory. The default directory used is diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 33b0c0f..78d932f 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -743,11 +743,11 @@ over services you export from your box (web services, email). .Xr systat 1 , .Xr sendfile 2 , .Xr ata 4 , +.Xr eventtimers 4 , .Xr dummynet 4 , .Xr login.conf 5 , .Xr rc.conf 5 , .Xr sysctl.conf 5 , -.Xr eventtimers 7 , .Xr firewall 7 , .Xr hier 7 , .Xr ports 7 , diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 796c0ce..fa768f5 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1055,6 +1055,7 @@ MLINKS+=\ mbuf.9 m_append.9 \ mbuf.9 m_apply.9 \ mbuf.9 m_cat.9 \ + mbuf.9 m_catpkt.9 \ mbuf.9 MCHTYPE.9 \ mbuf.9 MCLGET.9 \ mbuf.9 m_collapse.9 \ @@ -1707,7 +1708,6 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_drain_all.9 \ taskqueue.9 taskqueue_drain_timeout.9 \ taskqueue.9 taskqueue_enqueue.9 \ - taskqueue.9 taskqueue_enqueue_fast.9 \ taskqueue.9 taskqueue_enqueue_timeout.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE_THREAD.9 \ diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9 index d579f9a..92c589d 100644 --- a/share/man/man9/bus_alloc_resource.9 +++ b/share/man/man9/bus_alloc_resource.9 @@ -34,6 +34,7 @@ .Sh NAME .Nm bus_alloc_resource , .Nm bus_alloc_resource_any +.Nm bus_alloc_resource_anywhere .Nd allocate resources from a parent bus .Sh SYNOPSIS .In sys/param.h @@ -49,6 +50,10 @@ .Fc .Ft struct resource * .Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags" +.Fc +.Ft struct resource * +.Fn bus_alloc_resource_anywhere +.Fa "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags" .Sh DESCRIPTION This is an easy interface to the resource-management functions. It hides the indirection through the parent's method table. @@ -57,9 +62,12 @@ rare cases) never earlier. .Pp The .Fn bus_alloc_resource_any -function is a convenience wrapper for +and +.Fn bus_alloc_resource_anywhere +functions are convenience wrappers for .Fn bus_alloc_resource . -It sets the values for +.Fn bus_alloc_resource_any +sets .Fa start , .Fa end , and @@ -67,6 +75,14 @@ and to the default resource (see description of .Fa start below). +.Fn bus_alloc_resource_anywhere +sets +.Fa start +and +.Fa end +to the default resource and uses the provided +.Fa count +argument. .Pp The arguments are as follows: .Bl -item diff --git a/share/man/man9/ieee80211_node.9 b/share/man/man9/ieee80211_node.9 index e065254..b5f3e61 100644 --- a/share/man/man9/ieee80211_node.9 +++ b/share/man/man9/ieee80211_node.9 @@ -246,6 +246,6 @@ If the specified index is .Dv IEEE80211_KEYIX_NONE then a normal lookup is done without a table update. .Sh SEE ALSO -.Xr ddb 9 , +.Xr ddb 4 , .Xr ieee80211 9 , .Xr ieee80211_proto 9 diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 9515cdf..a6aec87 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2015 +.Dd February 29, 2016 .Dt MBUF 9 .Os .\" @@ -122,6 +122,8 @@ .Fc .Ft void .Fn m_cat "struct mbuf *m" "struct mbuf *n" +.Ft void +.Fn m_catpkt "struct mbuf *m" "struct mbuf *n" .Ft u_int .Fn m_fixhdr "struct mbuf *mbuf" .Ft void @@ -907,12 +909,26 @@ to Both .Vt mbuf chains must be of the same type. -.Fa N -is still valid after the function returned. -.Sy Note : -It does not handle -.Dv M_PKTHDR -and friends. +.Fa n +is not guaranteed to be valid after +.Fn m_cat +returns. +.Fn m_cat +does not update any packet header fields or free mbuf tags. +.\" +.It Fn m_catpkt m n +A variant of +.Fn m_cat +that operates on packets. +Both +.Fa m +and +.Fa n +must contain packet headers. +.Fa n +is not guaranteed to be valid after +.Fn m_catpkt +returns. .\" .It Fn m_split mbuf len how Partition an diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index 5f2bcf6..5ee7fc8 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 4, 2015 +.Dd March 1, 2016 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -80,8 +80,6 @@ struct timeout_task; .Ft int .Fn taskqueue_enqueue "struct taskqueue *queue" "struct task *task" .Ft int -.Fn taskqueue_enqueue_fast "struct taskqueue *queue" "struct task *task" -.Ft int .Fn taskqueue_enqueue_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" "int ticks" .Ft int .Fn taskqueue_cancel "struct taskqueue *queue" "struct task *task" "u_int *pendp" @@ -191,14 +189,6 @@ This function will return .Er EPIPE if the queue is being freed. .Pp -The function -.Fn taskqueue_enqueue_fast -should be used in place of -.Fn taskqueue_enqueue -when the enqueuing must happen from a fast interrupt handler. -This method uses spin locks to avoid the possibility of sleeping in the fast -interrupt context. -.Pp When a task is executed, first it is removed from the queue, the value of @@ -467,15 +457,7 @@ To use these queues, call .Fn taskqueue_enqueue with the value of the global taskqueue variable for the queue you wish to -use -.Va ( taskqueue_swi , -.Va taskqueue_swi_giant , -or -.Va taskqueue_thread ) . -Use -.Fn taskqueue_enqueue_fast -for the global taskqueue variable -.Va taskqueue_fast . +use. .Pp The software interrupt queues can be used, for instance, for implementing interrupt handlers which must perform a diff --git a/share/man/man9/vrele.9 b/share/man/man9/vrele.9 index d29ca5b..1eae442 100644 --- a/share/man/man9/vrele.9 +++ b/share/man/man9/vrele.9 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2010 +.Dd February 24, 2016 .Dt VRELE 9 .Os .Sh NAME @@ -81,9 +81,11 @@ If the .Va v_usecount field of the non-doomed vnode reaches zero, then it will be inactivated and placed on the free list. -Since the functions might need to call VOPs for the vnode, the -.Va Giant -mutex should be conditionally locked around the call. +.Pp +The +.Fn vrele +function may lock the vnode. +All three functions may sleep. .Pp The hold count for the vnode is always greater or equal to the usecount. Non-forced unmount fails when mount point owns a vnode that has non-zero diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 6c240cf..a289dac 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -200,6 +200,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2005/07/06"] jkoshy [label="A. Joseph Koshy\njkoshy@FreeBSD.org\n1998/05/13"] jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] +jmcneill [label="Jared McNeill\njmcneill@FreeBSD.org\n2016/02/24"] jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] jmmv [label="Julio Merino\njmmv@FreeBSD.org\n2013/11/02"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] @@ -252,6 +253,7 @@ peadar [label="Peter Edwards\npeadar@FreeBSD.org\n2004/03/08"] peter [label="Peter Wemm\npeter@FreeBSD.org\n1995/07/04"] peterj [label="Peter Jeremy\npeterj@FreeBSD.org\n2012/09/14"] pfg [label="Pedro Giffuni\npfg@FreeBSD.org\n2011/12/01"] +phil [label="Phil Shafer\nphil@FreeBSD.ogr\n2016/12/30"] philip [label="Philip Paeps\nphilip@FreeBSD.org\n2004/01/21"] phk [label="Poul-Henning Kamp\nphk@FreeBSD.org\n1994/02/21"] pho [label="Peter Holm\npho@FreeBSD.org\n2008/11/16"] @@ -286,6 +288,7 @@ scottl [label="Scott Long\nscottl@FreeBSD.org\n2000/09/28"] se [label="Stefan Esser\nse@FreeBSD.org\n1994/08/26"] sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"] sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"] +sgalabov [label="Stanislav Galabov\nsgalabov@FreeBSD.org\n2016/02/24"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"] skra [label="Svatopluk Kraus\nskra@FreeBSD.org\n2015/10/28"] @@ -340,12 +343,14 @@ day1 -> alm day1 -> dg adrian -> avos +adrian -> jmcneill adrian -> lidl adrian -> loos adrian -> monthadar adrian -> ray adrian -> rmh adrian -> sephe +adrian -> sgalabov ae -> melifaro @@ -470,6 +475,8 @@ gnn -> erj gnn -> kp gnn -> jtl +gonzo -> jmcneill + grehan -> bryanv grog -> edwin @@ -735,8 +742,12 @@ shin -> ume simon -> benl +sjg -> phil + sos -> marcel +theraven -> phil + thompsa -> weongyo thompsa -> eri diff --git a/share/misc/organization.dot b/share/misc/organization.dot index 8bec9f7..b442d6c 100644 --- a/share/misc/organization.dot +++ b/share/misc/organization.dot @@ -34,7 +34,7 @@ portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewe portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nculot"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] -portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, eadler, feld, jgh, miwi, rea, sbz, simon, swills, zi"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, eadler, feld, jgh, junovitch, miwi, rea, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] diff --git a/share/mk/Makefile b/share/mk/Makefile index ac3fd94..b33ab27 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -17,6 +17,7 @@ FILES= \ auto.obj.mk \ bsd.README \ bsd.arch.inc.mk \ + bsd.clang-analyze.mk \ bsd.compiler.mk \ bsd.confs.mk \ bsd.cpu.mk \ diff --git a/share/mk/bsd.clang-analyze.mk b/share/mk/bsd.clang-analyze.mk new file mode 100644 index 0000000..61321b5 --- /dev/null +++ b/share/mk/bsd.clang-analyze.mk @@ -0,0 +1,105 @@ +# $FreeBSD$ +# +# Support Clang static analyzer on SRCS. +# +# +# +++ variables +++ +# +# CLANG_ANALYZE_CHECKERS Which checkers to run for all sources. +# +# CLANG_ANALYZE_CXX_CHECKERS Which checkers to run for C++ sources. +# +# CLANG_ANALYZE_OUTPUT Output format for generated files. +# text - don't generate extra files. +# html - generate html in obj.plist/ directories. +# plist - generate xml obj.plist files. +# See also: +# contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def +# +# CLANG_ANALYZE_OUTPUT_DIR Sets which directory output set by +# CLANG_ANALYZE_OUTPUT is placed into. +# +# +++ targets +++ +# +# analyze: +# Run the Clang static analyzer against all sources and present +# output on stdout. + +.if !target(__<bsd.clang-analyze.mk>__) +__<bsd.clang-analyze.mk>__: + +.include <bsd.compiler.mk> + +.if ${COMPILER_TYPE} != "clang" && (make(analyze) || make(*.clang-analyzer)) +.error Clang static analyzer requires clang but found that compiler '${CC}' is ${COMPILER_TYPE} +.endif + +CLANG_ANALYZE_OUTPUT?= text +CLANG_ANALYZE_OUTPUT_DIR?= clang-analyze +CLANG_ANALYZE_FLAGS+= --analyze \ + -Xanalyzer -analyzer-output=${CLANG_ANALYZE_OUTPUT} \ + -o ${CLANG_ANALYZE_OUTPUT_DIR} + +CLANG_ANALYZE_CHECKERS+= core deadcode security unix +CLANG_ANALYZE_CXX_CHECKERS+= cplusplus + +.for checker in ${CLANG_ANALYZE_CHECKERS} +CLANG_ANALYZE_FLAGS+= -Xanalyzer -analyzer-checker=${checker} +.endfor +CLANG_ANALYZE_CXX_FLAGS+= ${CLANG_ANALYZE_FLAGS} +.for checker in ${CLANG_ANALYZE_CXX_CHECKERS} +CLANG_ANALYZE_CXX_FLAGS+= -Xanalyzer -analyzer-checker=${checker} +.endfor + +.SUFFIXES: .c .cc .cpp .cxx .C .clang-analyzer + +CLANG_ANALYZE_CFLAGS= ${CFLAGS:N-Wa,--fatal-warnings} +CLANG_ANALYZE_CXXFLAGS= ${CXXFLAGS:N-Wa,--fatal-warnings} + +.c.clang-analyzer: + ${CC:N${CCACHE_BIN}} ${CLANG_ANALYZE_FLAGS} \ + ${CLANG_ANALYZE_CFLAGS} ${CPPFLAGS} \ + ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ + ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} +.cc.clang-analyzer .cpp.clang-analyzer .cxx.clang-analyzer .C.clang-analyzer: + ${CXX:N${CCACHE_BIN}} ${CLANG_ANALYZE_CXX_FLAGS} \ + ${CLANG_ANALYZE_CXXFLAGS} ${CPPFLAGS} \ + ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ + ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} + +CLANG_ANALYZE_SRCS= \ + ${SRCS:M*.[cC]} ${SRCS:M*.cc} \ + ${SRCS:M*.cpp} ${SRCS:M*.cxx} \ + ${DPSRCS:M*.[cC]} ${DPSRCS:M*.cc} \ + ${DPSRCS:M*.cpp} ${DPSRCS:M*.cxx} +.if !empty(CLANG_ANALYZE_SRCS) +CLANG_ANALYZE_OBJS= ${CLANG_ANALYZE_SRCS:O:u:R:S,$,.clang-analyzer,} +.NOPATH: ${CLANG_ANALYZE_OBJS} +.endif + +# .depend files aren't relevant here since they reference obj.o rather than +# obj.clang-analyzer, so add in some guesses in case 'make depend' wasn't ran, +# for when directly building 'obj.clang-analyzer'. +.for __obj in ${CLANG_ANALYZE_OBJS} +${__obj}: ${OBJS_DEPEND_GUESS} +${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} +.endfor + +.if ${MK_FAST_DEPEND} == "yes" +beforeanalyze: depend +.endif +beforeanalyze: .PHONY +.if !defined(_RECURSING_PROGS) && !empty(CLANG_ANALYZE_SRCS) && \ + ${CLANG_ANALYZE_OUTPUT} != "text" + mkdir -p ${CLANG_ANALYZE_OUTPUT_DIR} +.endif + +.if !target(analyze) +analyze: beforeanalyze .WAIT ${CLANG_ANALYZE_OBJS} +.endif + +.if exists(${CLANG_ANALYZE_OUTPUT_DIR}) +CLEANDIRS+= ${CLANG_ANALYZE_OUTPUT_DIR} +.endif + +.endif # !target(__<bsd.clang-analyze.mk>__) diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index dee6a1d..a697526 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -83,7 +83,11 @@ CCACHE_NOCPP2= 1 .export CCACHE_NOCPP2 .endif # Canonicalize CCACHE_DIR for meta mode usage. -.if defined(CCACHE_DIR) && empty(.MAKE.META.IGNORE_PATHS:M${CCACHE_DIR}) +.if !defined(CCACHE_DIR) +CCACHE_DIR!= ${CCACHE_BIN} -p | awk '$$2 == "cache_dir" {print $$4}' +.export CCACHE_DIR +.endif +.if !empty(CCACHE_DIR) && empty(.MAKE.META.IGNORE_PATHS:M${CCACHE_DIR}) CCACHE_DIR:= ${CCACHE_DIR:tA} .MAKE.META.IGNORE_PATHS+= ${CCACHE_DIR} .export CCACHE_DIR diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index aa5191f..20a9782 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -12,7 +12,9 @@ buildconfig: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildconfig +.endif .if !target(installconfig) .for group in ${CONFGROUPS} diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk index 9374f33..4ac5d50 100644 --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -70,7 +70,9 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endfor .endfor +.if !defined(_SKIP_BUILD) all: ${PROG} +.endif exe: ${PROG} ${CONF}: Makefile diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 6f27d7e..19ab9e5 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -61,11 +61,10 @@ _MKDEPCC:= ${CC:N${CCACHE_BIN}} _MKDEPCC+= ${DEPFLAGS} .endif MKDEPCMD?= CC='${_MKDEPCC}' mkdep -DEPENDFILE?= .depend .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= ${DEPENDFILE} .endif -CLEANDEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.* +CLEANDEPENDFILES+= ${DEPENDFILE} ${DEPENDFILE}.* # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) @@ -84,7 +83,7 @@ tags: ${SRCS} # Skip reading .depend when not needed to speed up tree-walks # and simple lookups. .if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ - make(install*) + make(install*) || make(analyze) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= /dev/null @@ -94,19 +93,21 @@ _SKIP_READ_DEPEND= 1 .if defined(SRCS) CLEANFILES?= -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) .for _S in ${SRCS:N*.[dhly]} -${_S:R}.o: ${_S} -.endfor +OBJS_DEPEND_GUESS.${_S:R}.o= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.o: ${OBJS_DEPEND_GUESS.${_S:R}.o} .endif +.endfor # Lexical analyzers .for _LSRC in ${SRCS:M*.l:N*/*} .for _LC in ${_LSRC:R}.c ${_LC}: ${_LSRC} ${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC} -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) -${_LC:R}.o: ${_LC} +OBJS_DEPEND_GUESS.${_LC:R}.o= ${_LC} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_LC:R}.o: ${OBJS_DEPEND_GUESS.${_LC:R}.o} .endif SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} CLEANFILES+= ${_LC} @@ -136,8 +137,9 @@ CLEANFILES+= ${_YH} ${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} .endif -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) -${_YC:R}.o: ${_YC} +OBJS_DEPEND_GUESS.${_YC:R}.o= ${_YC} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_YC:R}.o: ${OBJS_DEPEND_GUESS.${_YC:R}.o} .endif .endfor .endfor @@ -170,14 +172,24 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} .endfor -.if ${MK_FAST_DEPEND} == "yes" && \ - (${.MAKE.MODE:Mmeta} == "" || ${.MAKE.MODE:Mnofilemon} != "") +.if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon) +_meta_filemon= 1 +.endif +.if ${MK_FAST_DEPEND} == "yes" DEPEND_MP?= -MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g +DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +.if !empty(DEPENDSRCS) +DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} +.endif +DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+= -MT${.TARGET} +# Skip generating or including .depend.* files if in meta+filemon mode since +# it will track dependencies itself. OBJS_DEPEND_GUESS is still used though. +.if !defined(_meta_filemon) .if defined(.PARSEDIR) # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS # as those are the only ones we will include. @@ -186,27 +198,48 @@ CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:} .else CFLAGS+= ${DEPEND_CFLAGS} .endif -DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} -.if !empty(DEPENDSRCS) -DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} -.endif -DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./} .if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} -.sinclude "${__depend_obj}" +.sinclude "${.OBJDIR}/${__depend_obj}" .endfor -.endif +.endif # !defined(_SKIP_READ_DEPEND) +.endif # !defined(_meta_filemon) .endif # ${MK_FAST_DEPEND} == "yes" .endif # defined(SRCS) .if ${MK_DIRDEPS_BUILD} == "yes" +# Prevent meta.autodep.mk from tracking "local dependencies". +.depend: .include <meta.autodep.mk> +# If using filemon then _EXTRADEPEND is skipped since it is not needed. +.if empty(.MAKE.MODE:Mnofilemon) # this depend: bypasses that below # the dependency helps when bootstrapping depend: beforedepend ${DPSRCS} ${SRCS} afterdepend beforedepend: afterdepend: beforedepend .endif +.endif + +# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet. +# For meta+filemon the .meta file is checked for since it is the dependency +# file used. +.if ${MK_FAST_DEPEND} == "yes" +.for __obj in ${DEPENDOBJS:O:u} +.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ + (!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj})) +${__obj}: ${OBJS_DEPEND_GUESS} +${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} +.endif +.endfor + +# Always run 'make depend' to generate dependencies early and to avoid the +# need for manually running it. The dirdeps build should only do this in +# sub-makes though since MAKELEVEL0 is for dirdeps calculations. +.if ${MK_DIRDEPS_BUILD} == "no" || ${.MAKE.LEVEL} > 0 +beforebuild: depend +.endif +.endif # ${MK_FAST_DEPEND} == "yes" .if !target(depend) .if defined(SRCS) @@ -231,9 +264,13 @@ MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \ .endif # ${MK_FAST_DEPEND} == "no" DPSRCS+= ${SRCS} +# FAST_DEPEND will only generate a .depend if _EXTRADEPEND is used but +# the target is created to allow 'make depend' to generate files. ${DEPENDFILE}: ${DPSRCS} -.if ${MK_FAST_DEPEND} == "no" +.if exists(${.OBJDIR}/${DEPENDFILE}) rm -f ${DEPENDFILE} +.endif +.if ${MK_FAST_DEPEND} == "no" .if !empty(DPSRCS:M*.[cS]) ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \ ${MKDEP_CFLAGS} ${.ALLSRC:M*.[cS]} @@ -245,8 +282,6 @@ ${DEPENDFILE}: ${DPSRCS} ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx} .else .endif -.else - : > ${.TARGET} .endif # ${MK_FAST_DEPEND} == "no" .if target(_EXTRADEPEND) _EXTRADEPEND: .USE @@ -268,6 +303,7 @@ afterdepend: .endif .endif +.if defined(SRCS) .if ${CTAGS:T} == "gtags" CLEANDEPENDFILES+= GPATH GRTAGS GSYMS GTAGS .if defined(HTML) @@ -276,15 +312,16 @@ CLEANDEPENDDIRS+= HTML .else CLEANDEPENDFILES+= tags .endif +.endif .if !target(cleandepend) cleandepend: -.if defined(SRCS) +.if !empty(CLEANDEPENDFILES) rm -f ${CLEANDEPENDFILES} +.endif .if !empty(CLEANDEPENDDIRS) rm -rf ${CLEANDEPENDDIRS} .endif .endif -.endif .if !target(checkdpadd) && (defined(DPADD) || defined(LDADD)) _LDADD_FROM_DPADD= ${DPADD:R:T:C;^lib(.*)$;-l\1;g} diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index a4b9fc1..5b88ae5 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -114,9 +114,11 @@ COMPAT?= -C .PATH: ${.CURDIR} ${SRCDIR} +.if !defined(_SKIP_BUILD) .for _dev in ${PRINTERDEVICE} all: ${DFILE.${_dev}} .endfor +.endif .if !target(print) .for _dev in ${PRINTERDEVICE} diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk index 448ac38..4080edd 100644 --- a/share/mk/bsd.files.mk +++ b/share/mk/bsd.files.mk @@ -16,7 +16,9 @@ ${${group}}:= ${${group}:O:u} buildfiles: ${${group}} .endfor +.if !defined(_SKIP_BUILD) all: buildfiles +.endif .for group in ${FILESGROUPS} .if defined(${group}) && !empty(${group}) diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk index 05daf2f..cd3e583 100644 --- a/share/mk/bsd.incs.mk +++ b/share/mk/bsd.incs.mk @@ -21,7 +21,9 @@ buildincludes: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildincludes +.endif .if !target(installincludes) .for group in ${INCSGROUPS} diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk index 7720d28..eeb0da3 100644 --- a/share/mk/bsd.info.mk +++ b/share/mk/bsd.info.mk @@ -125,9 +125,10 @@ CLEANFILES+= ${IFILENS} .if !defined(NO_INFOCOMPRESS) CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/} IFILES= ${IFILENS:S/$/${ICOMPRESS_EXT}/:S/.html${ICOMPRESS_EXT}/.html/} -all: ${IFILES} .else IFILES= ${IFILENS} +.endif +.if !defined(_SKIP_BUILD) all: ${IFILES} .endif diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index bc8a3fc..b4c28ae 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -310,7 +310,7 @@ CLEANFILES+= ${_LIBS} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) -all: _manpages +all: all-man .endif .endif @@ -421,8 +421,8 @@ _libinstall: .include <bsd.links.mk> .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) -realinstall: _maninstall -.ORDER: beforeinstall _maninstall +realinstall: maninstall +.ORDER: beforeinstall maninstall .endif .endif @@ -436,28 +436,32 @@ lint: ${SRCS:M*.c} .include <bsd.man.mk> .endif -.include <bsd.dep.mk> - -.if ${MK_FAST_DEPEND} == "yes" || !exists(${.OBJDIR}/${DEPENDFILE}) .if defined(LIB) && !empty(LIB) -.if !exists(${.OBJDIR}/${DEPENDFILE}) -${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h} +OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} .endif .for _S in ${SRCS:N*.[hly]} -${_S:R}.po: ${_S} +OBJS_DEPEND_GUESS.${_S:R}.po= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} +.endif .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) -.if !exists(${.OBJDIR}/${DEPENDFILE}) -${SOBJS}: ${SRCS:M*.h} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${SOBJS}: ${OBJS_DEPEND_GUESS} .endif .for _S in ${SRCS:N*.[hly]} -${_S:R}.So: ${_S} -.endfor +OBJS_DEPEND_GUESS.${_S:R}.So= ${_S} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So} .endif +.endfor .endif +.include <bsd.dep.mk> +.include <bsd.clang-analyze.mk> .include <bsd.obj.mk> - .include <bsd.sys.mk> diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index d22f99a..6db6973 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -30,7 +30,6 @@ LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a LIBC?= ${DESTDIR}${LIBDIR}/libc.a LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a -LIBCAPSICUM?= ${DESTDIR}${LIBDIR}/libcapsicum.a LIBCASPER?= ${DESTDIR}${LIBDIR}/libcasper.a LIBCOMPAT?= ${DESTDIR}${LIBDIR}/libcompat.a LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index ee28844..eca0139 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -72,8 +72,7 @@ MAN+= ${MAN${__sect}} .endfor .endif -_manpages: -all-man: _manpages +all-man: .if ${MK_MANCOMPRESS} == "no" @@ -93,13 +92,13 @@ CLEANFILES+= ${MAN:T:S/$/${FILTEXTENSION}/g} CLEANFILES+= ${MAN:T:S/$/${CATEXT}${FILTEXTENSION}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${FILTEXTENSION}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} > ${.TARGET} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} > ${.TARGET} .endfor @@ -112,13 +111,13 @@ CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} .for __target in ${__page:T:S/$/${CATEXT}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANDOC_CMD} ${.ALLSRC} > ${.TARGET} .endfor .endfor .else -_manpages: ${MAN} +all-man: ${MAN} .endif .endif .endif # defined(MANFILTER) @@ -148,7 +147,7 @@ CLEANFILES+= ${MAN:T:S/$/${MCOMPRESS_EXT}/g} CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} @@ -158,7 +157,7 @@ ${__target}: ${__page} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} | ${MCOMPRESS_CMD} > ${.TARGET} @@ -183,10 +182,9 @@ _MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \ .endfor .endif -maninstall: _maninstall -_maninstall: +maninstall: .if defined(MAN) && !empty(MAN) -_maninstall: ${MAN} +maninstall: ${MAN} .if ${MK_MANCOMPRESS} == "no" .if defined(MANFILTER) .for __page in ${MAN} diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index e2c56ac..b073782 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -77,7 +77,14 @@ __DEFAULT_NO_OPTIONS = \ __DEFAULT_DEPENDENT_OPTIONS = \ STAGING_MAN/STAGING \ STAGING_PROG/STAGING \ - + + +# Enable FAST_DEPEND by default for the meta build. +.if !empty(.MAKE.MODE:Mmeta) +__DEFAULT_YES_OPTIONS+= FAST_DEPEND +__DEFAULT_NO_OPTIONS:= ${__DEFAULT_NO_OPTIONS:NFAST_DEPEND} +.endif + .include <bsd.mkopt.mk> # @@ -94,8 +101,7 @@ __DEFAULT_DEPENDENT_OPTIONS = \ PROFILE \ WARNS .if defined(NO_${var}) -# This warning may be premature... -#.warning "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead." +.warning "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead." MK_${var}:=no .endif .endfor diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 9f33424..18b332e 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -257,6 +257,8 @@ XZ_CMD?= xz # overriden by Makefiles, but the user may choose to set this in src.conf(5). TESTSBASE?= /usr/tests +DEPENDFILE?= .depend + # Compat for the moment -- old bsd.own.mk only included this when _WITHOUT_SRCCONF # wasn't defined. bsd.ports.mk and friends depend on this behavior. Remove in 12. .if !defined(_WITHOUT_SRCCONF) diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 76ef689..fac1117 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -157,7 +157,7 @@ all: .else all: ${PROG} ${SCRIPTS} .if ${MK_MAN} != "no" -all: _manpages +all: all-man .endif .endif @@ -265,8 +265,8 @@ NLSNAME?= ${PROG} .include <bsd.links.mk> .if ${MK_MAN} != "no" -realinstall: _maninstall -.ORDER: beforeinstall _maninstall +realinstall: maninstall +.ORDER: beforeinstall maninstall .endif .endif # !target(install) @@ -282,12 +282,14 @@ lint: ${SRCS:M*.c} .include <bsd.man.mk> .endif -.include <bsd.dep.mk> - -.if defined(PROG) && !exists(${.OBJDIR}/${DEPENDFILE}) -${OBJS}: ${SRCS:M*.h} +.if defined(PROG) +OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${OBJS}: ${OBJS_DEPEND_GUESS} +.endif .endif +.include <bsd.dep.mk> +.include <bsd.clang-analyze.mk> .include <bsd.obj.mk> - .include <bsd.sys.mk> diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index cba0b59..7560e7f 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -27,18 +27,6 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif -.ifndef PROG -# They may have asked us to build just one -.for t in ${PROGS} -.if make($t) -.if ${PROGS_CXX:U:M${t}} -PROG_CXX ?= $t -.endif -PROG ?= $t -.endif -.endfor -.endif - .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ @@ -65,16 +53,27 @@ UPDATE_DEPENDFILE ?= NO # prog.mk will do the rest .else # !defined(PROG) +.if !defined(_SKIP_BUILD) all: ${PROGS} +.endif # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO + +.if ${MK_STAGING} != "no" +.if !empty(PROGS) +stage_files.prog: ${PROGS} +.endif +.endif # ${MK_STAGING} != "no" .endif .endif # PROGS || PROGS_CXX # These are handled by the main make process. .ifdef _RECURSING_PROGS -_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS FILESGROUPS SCRIPTS CONFGROUPS +MK_STAGING= no + +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ + SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} $v = .endfor @@ -134,6 +133,8 @@ $p.$t: .PHONY .MAKE # Depend main pseudo targets on all PROG.pseudo targets too. .for t in ${PROGS_TARGETS:O:u} +.if make(${t}) $t: ${PROGS:%=%.$t} +.endif .endfor .endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index d490845..290f894 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -39,7 +39,7 @@ __<bsd.subdir.mk>__: SUBDIR_TARGETS+= \ - all all-man buildconfig buildfiles buildincludes \ + all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ installfiles installincludes realinstall lint maninstall \ @@ -47,8 +47,15 @@ SUBDIR_TARGETS+= \ # Described above. STANDALONE_SUBDIR_TARGETS+= \ - obj check checkdpadd clean cleandepend cleandir \ - cleanilinks cleanobj installconfig \ + all-man buildconfig buildfiles buildincludes check checkdpadd \ + clean cleandepend cleandir cleanilinks cleanobj files includes \ + installconfig installincludes installfiles maninstall manlint \ + obj objlink \ + +# It is safe to install in parallel when staging. +.if defined(NO_ROOT) +STANDALONE_SUBDIR_TARGETS+= realinstall +.endif .include <bsd.init.mk> @@ -138,14 +145,14 @@ __subdir_targets= .if ${__dir} == .WAIT __subdir_targets+= .WAIT .else -__subdir_targets+= ${__target}_subdir_${__dir} +__subdir_targets+= ${__target}_subdir_${DIRPRFX}${__dir} __deps= .if ${_is_standalone_target} == 0 .for __dep in ${SUBDIR_DEPEND_${__dir}} -__deps+= ${__target}_subdir_${__dep} +__deps+= ${__target}_subdir_${DIRPRFX}${__dep} .endfor .endif -${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} +${__target}_subdir_${DIRPRFX}${__dir}: .PHONY .MAKE .SILENT ${__deps} .if !defined(NO_SUBDIR) @${_+_}target=${__target:realinstall=install}; \ dir=${__dir}; \ diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2ce5beb..4a59274 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -176,14 +176,13 @@ CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. -PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ +PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \ beforelinking build build-tools buildconfig buildfiles \ buildincludes check checkdpadd clean cleandepend cleandir \ - cleanobj configure depend dependall distclean distribute exe \ + cleanobj configure depend distclean distribute exe \ files html includes install installconfig installfiles \ - installincludes lint obj objlink objs objwarn realall \ - realdepend realinstall subdir-all subdir-depend \ - subdir-install tags whereobj + installincludes lint obj objlink objs objwarn \ + realinstall tags whereobj # we don't want ${PROG} to be PHONY .PHONY: ${PHONY_NOTMAIN:N${PROG:U}} diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index c7ccf4f..d697097 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -94,30 +94,4 @@ beforecheck realcheck aftercheck check: .PHONY .ORDER: beforecheck realcheck aftercheck check: beforecheck realcheck aftercheck -.ifdef PROG -# we came here via bsd.progs.mk below -# parent will do staging. -MK_STAGING= no -.endif - -.if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) .include <bsd.progs.mk> -.endif -.include <bsd.files.mk> - -.if !defined(PROG) && ${MK_STAGING} != "no" -.if !defined(_SKIP_BUILD) -# this will handle staging if needed -_SKIP_STAGING= no -# but we don't want it to build anything -_SKIP_BUILD= -.endif -.if !empty(PROGS) -stage_files.prog: ${PROGS} -.endif -.include <bsd.prog.mk> -.endif - -.if !target(objwarn) -.include <bsd.obj.mk> -.endif diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 21b9c16..207fb75 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -6,6 +6,7 @@ # we need this until there is an alternative MK_INSTALL_AS_USER= yes +MK_FAST_DEPEND= yes _default_makeobjdir=$${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index d27597f..902f4fb 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -68,8 +68,12 @@ _LIBRARIES= \ c_pic \ calendar \ cam \ - capsicum \ casper \ + cap_dns \ + cap_grp \ + cap_pwd \ + cap_random \ + cap_sysctl \ com_err \ compiler_rt \ crypt \ @@ -211,9 +215,13 @@ _DP_bsnmp= crypto .endif _DP_geom= bsdxml sbuf _DP_cam= sbuf -_DP_casper= capsicum nv pjdlog -_DP_capsicum= nv _DP_kvm= elf +_DP_casper= nv +_DP_cap_dns= nv +_DP_cap_grp= nv +_DP_cap_pwd= nv +_DP_cap_random= nv +_DP_cap_sysctl= nv _DP_pjdlog= util _DP_opie= md _DP_usb= pthread @@ -507,6 +515,25 @@ LIBTERMCAPWDIR= ${LIBNCURSESWDIR} LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor +# Casper exception. +LIBCAP_CASPERDIR= ${OBJTOP}/lib/libcasper/libcasper +LIBCAP_CASPER= ${DESTDIR}${LIBDIR}/libcasper.a + +LIBCAP_DNSDIR= ${OBJTOP}/lib/libcasper/services/cap_dns +LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a + +LIBCAP_GRPDIR= ${OBJTOP}/lib/libcasper/services/cap_grp +LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a + +LIBCAP_PWDDIR= ${OBJTOP}/lib/libcasper/services/cap_pwd +LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a + +LIBCAP_RANDOMDIR= ${OBJTOP}/lib/libcasper/services/cap_random +LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR}/libcap_random.a + +LIBCAP_SYSCTLDIR= ${OBJTOP}/lib/libcasper/services/cap_sysctl +LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR}/libcap_sysctl.a + # Validate that listed LIBADD are valid. .for _l in ${LIBADD} .if empty(_LIBRARIES:M${_l}) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 678c31e..a3d6a0c 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -80,6 +80,7 @@ __DEFAULT_YES_OPTIONS = \ DYNAMICROOT \ ED_CRYPTO \ EE \ + ELFCOPY_AS_OBJCOPY \ ELFTOOLCHAIN_BOOTSTRAP \ EXAMPLES \ FDT \ @@ -231,9 +232,9 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T} == "riscv64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB -__DEFAULT_YES_OPTIONS+=ELFCOPY_AS_OBJCOPY LLVM_LIBUNWIND +__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else -__DEFAULT_NO_OPTIONS+=ELFCOPY_AS_OBJCOPY LLVM_LIBUNWIND +__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "riscv64" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" diff --git a/share/mk/sys.mk b/share/mk/sys.mk index e849d42..3b2d472a 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -45,12 +45,19 @@ __ENV_ONLY_OPTIONS:= \ .if ${MK_DIRDEPS_BUILD} == "yes" .sinclude <meta.sys.mk> .elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == "" -.MAKE.MODE= meta verbose +# verbose will show .MAKE.META.PREFIX for each target. +META_MODE= meta verbose +# silent will hide command output if a .meta file is created. +.if !defined(NO_SILENT) +META_MODE+= silent=yes +.endif .if !exists(/dev/filemon) -.MAKE.MODE+= nofilemon +META_MODE+= nofilemon .endif .endif -.MAKE.MODE?= normal +META_MODE?= normal +.export META_MODE +.MAKE.MODE?= ${META_MODE} .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed @@ -279,8 +286,8 @@ YFLAGS ?= -d # non-Posix rule set -.sh: .NOMETA - cp -fp ${.IMPSRC} ${.TARGET} +.sh: + cp -f ${.IMPSRC} ${.TARGET} chmod a+x ${.TARGET} .c.ln: diff --git a/share/vt/fonts/Makefile b/share/vt/fonts/Makefile index 051f2c1..e8b1f0b 100644 --- a/share/vt/fonts/Makefile +++ b/share/vt/fonts/Makefile @@ -14,9 +14,6 @@ CLEANFILES+= ${FILES} .hex.fnt: vtfontcvt ${.IMPSRC} ${.TARGET} -.fnt.uu.fnt: - uudecode -p < ${.IMPSRC} > ${.TARGET} - FILESDIR= ${SHAREDIR}/vt/fonts .include <bsd.prog.mk> |