summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-10-19 11:51:10 +0000
committerbapt <bapt@FreeBSD.org>2015-10-19 11:51:10 +0000
commitd93a51152871c391e2ff845cfd568a72cef65606 (patch)
treec6a11d30ab57567b8bd34aa1c679296e53bab799 /share
parent4f9c78fa034aa8b8b2762c76143139953e2e2474 (diff)
parent5855be3ec6724e6451361f6ef8bd165bf9f949df (diff)
downloadFreeBSD-src-d93a51152871c391e2ff845cfd568a72cef65606.zip
FreeBSD-src-d93a51152871c391e2ff845cfd568a72cef65606.tar.gz
Merge from head
Diffstat (limited to 'share')
-rw-r--r--share/Makefile2
-rw-r--r--share/doc/Makefile2
-rw-r--r--share/doc/legal/Makefile2
-rw-r--r--share/doc/legal/intel_ipw/Makefile3
-rw-r--r--share/doc/legal/intel_iwi/Makefile3
-rw-r--r--share/doc/legal/intel_iwn/Makefile3
-rw-r--r--share/doc/legal/intel_wpi/Makefile3
-rw-r--r--share/doc/legal/realtek/Makefile3
-rw-r--r--share/doc/papers/Makefile2
-rw-r--r--share/doc/psd/Makefile2
-rw-r--r--share/doc/smm/Makefile2
-rw-r--r--share/doc/usd/Makefile1
-rw-r--r--share/examples/Makefile2
-rw-r--r--share/i18n/Makefile1
-rw-r--r--share/i18n/csmapper/Makefile1
-rw-r--r--share/i18n/esdb/Makefile1
-rw-r--r--share/man/Makefile1
-rw-r--r--share/man/man3/bitstring.35
-rw-r--r--share/man/man4/ipw.48
-rw-r--r--share/man/man4/ipwfw.48
-rw-r--r--share/man/man4/iwi.48
-rw-r--r--share/man/man4/iwifw.48
-rw-r--r--share/man/man4/rsu.49
-rw-r--r--share/man/man4/urtwn.48
-rw-r--r--share/man/man4/urtwnfw.48
-rw-r--r--share/man/man4/wpi.46
-rw-r--r--share/man/man5/resolver.518
-rw-r--r--share/man/man9/Makefile27
-rw-r--r--share/man/man9/bitset.9400
-rw-r--r--share/mk/bsd.confs.mk4
-rw-r--r--share/mk/bsd.doc.mk5
-rw-r--r--share/mk/bsd.files.mk2
-rw-r--r--share/mk/bsd.incs.mk4
-rw-r--r--share/mk/bsd.info.mk4
-rw-r--r--share/mk/bsd.lib.mk16
-rw-r--r--share/mk/bsd.man.mk4
-rw-r--r--share/mk/bsd.prog.mk6
-rw-r--r--share/mk/bsd.progs.mk28
-rw-r--r--share/mk/bsd.subdir.mk13
-rw-r--r--share/mk/bsd.sys.mk20
-rw-r--r--share/mk/src.libnames.mk1
-rw-r--r--share/mk/sys.mk13
-rw-r--r--share/syscons/Makefile1
-rw-r--r--share/zoneinfo/Makefile2
44 files changed, 585 insertions, 85 deletions
diff --git a/share/Makefile b/share/Makefile
index fe67bd7..56cebef 100644
--- a/share/Makefile
+++ b/share/Makefile
@@ -100,4 +100,6 @@ _vt= vt
_zoneinfo= zoneinfo
.endif
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/doc/Makefile b/share/doc/Makefile
index c752c51..7a02b29 100644
--- a/share/doc/Makefile
+++ b/share/doc/Makefile
@@ -28,6 +28,8 @@ _IPv6= IPv6
_roffdocs= papers psd smm usd
.endif
+SUBDIR_PARALLEL=
+
# Default output format for troff documents is ascii.
# To generate postscript versions of troff documents, use:
# make PRINTERDEVICE=ps
diff --git a/share/doc/legal/Makefile b/share/doc/legal/Makefile
index 9590800..345eafc 100644
--- a/share/doc/legal/Makefile
+++ b/share/doc/legal/Makefile
@@ -6,4 +6,6 @@ SUBDIR= intel_ipw \
intel_wpi \
realtek
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/doc/legal/intel_ipw/Makefile b/share/doc/legal/intel_ipw/Makefile
index 18a2c12..e52d8bb 100644
--- a/share/doc/legal/intel_ipw/Makefile
+++ b/share/doc/legal/intel_ipw/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/ipw/LICENSE
-FILESDIR= ${SHAREDIR}/doc/legal/intel_ipw
+FILESDIR= ${SHAREDIR}/doc/legal
+FILESNAME= intel_ipw.LICENSE
.include <bsd.prog.mk>
diff --git a/share/doc/legal/intel_iwi/Makefile b/share/doc/legal/intel_iwi/Makefile
index 6f0e6be..012ce7a 100644
--- a/share/doc/legal/intel_iwi/Makefile
+++ b/share/doc/legal/intel_iwi/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwi/LICENSE
-FILESDIR= ${SHAREDIR}/doc/legal/intel_iwi
+FILESDIR= ${SHAREDIR}/doc/legal
+FILESNAME= intel_iwi.LICENSE
.include <bsd.prog.mk>
diff --git a/share/doc/legal/intel_iwn/Makefile b/share/doc/legal/intel_iwn/Makefile
index d2e04c9..dd5772b 100644
--- a/share/doc/legal/intel_iwn/Makefile
+++ b/share/doc/legal/intel_iwn/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwn/LICENSE
-FILESDIR= ${SHAREDIR}/doc/legal/intel_iwn
+FILESDIR= ${SHAREDIR}/doc/legal
+FILESNAME= intel_iwn.LICENSE
.include <bsd.prog.mk>
diff --git a/share/doc/legal/intel_wpi/Makefile b/share/doc/legal/intel_wpi/Makefile
index 06b4863..61f6d5d 100644
--- a/share/doc/legal/intel_wpi/Makefile
+++ b/share/doc/legal/intel_wpi/Makefile
@@ -1,7 +1,8 @@
# $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/wpi/LICENSE
-FILESDIR= ${SHAREDIR}/doc/legal/intel_wpi
+FILESDIR= ${SHAREDIR}/doc/legal
+FILESNAME= intel_wpi.LICENSE
.include <bsd.prog.mk>
diff --git a/share/doc/legal/realtek/Makefile b/share/doc/legal/realtek/Makefile
index 2d96c42..e168a18 100644
--- a/share/doc/legal/realtek/Makefile
+++ b/share/doc/legal/realtek/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
FILES= ${.CURDIR}/../../../../sys/contrib/dev/urtwn/LICENSE
-FILESDIR= ${SHAREDIR}/doc/legal/realtek
+FILESDIR= ${SHAREDIR}/doc/legal
+FILESNAME= realtek.LICENSE
.include <bsd.prog.mk>
diff --git a/share/doc/papers/Makefile b/share/doc/papers/Makefile
index eaf097f..ddf1323 100644
--- a/share/doc/papers/Makefile
+++ b/share/doc/papers/Makefile
@@ -15,4 +15,6 @@ SUBDIR= beyond4.3 \
sysperf \
timecounter
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/doc/psd/Makefile b/share/doc/psd/Makefile
index 243ba99..6b6d9cd 100644
--- a/share/doc/psd/Makefile
+++ b/share/doc/psd/Makefile
@@ -37,4 +37,6 @@ SUBDIR+=22.rpcgen \
26.rpcrfc \
27.nfsrpc
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/doc/smm/Makefile b/share/doc/smm/Makefile
index 1d99b05..c6c9c51 100644
--- a/share/doc/smm/Makefile
+++ b/share/doc/smm/Makefile
@@ -32,4 +32,6 @@ _08.sendmailop= 08.sendmailop
_07.lpd= 07.lpd
.endif
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/doc/usd/Makefile b/share/doc/usd/Makefile
index 5fcb6b3..8638158 100644
--- a/share/doc/usd/Makefile
+++ b/share/doc/usd/Makefile
@@ -19,5 +19,6 @@ SUBDIR= title \
20.meref \
21.troff \
22.trofftut
+SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/share/examples/Makefile b/share/examples/Makefile
index f20ea7f..63ad5b3 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -261,4 +261,6 @@ SUBDIR+=pf
SUBDIR+=tests
.endif
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
diff --git a/share/i18n/Makefile b/share/i18n/Makefile
index 1cadd54..b166d94 100644
--- a/share/i18n/Makefile
+++ b/share/i18n/Makefile
@@ -4,5 +4,6 @@
.include <bsd.own.mk>
SUBDIR= csmapper esdb
+SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/share/i18n/csmapper/Makefile b/share/i18n/csmapper/Makefile
index 7bca3ab..18ee8fc 100644
--- a/share/i18n/csmapper/Makefile
+++ b/share/i18n/csmapper/Makefile
@@ -5,6 +5,7 @@ FILESDIR= ${CSMAPPERDIR}
SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB GEORGIAN ISO646 ISO-8859 JIS \
KAZAKH KOI KS MISC TCVN
+SUBDIR_PARALLEL=
mapper.dir: ${SUBDIR}
newfile=$$(for i in ${SUBDIR}; do \
diff --git a/share/i18n/esdb/Makefile b/share/i18n/esdb/Makefile
index 2b16d90..69d4445 100644
--- a/share/i18n/esdb/Makefile
+++ b/share/i18n/esdb/Makefile
@@ -5,6 +5,7 @@ FILESDIR= ${ESDBDIR}
SUBDIR= APPLE AST BIG5 CP DEC EUC EBCDIC GB GEORGIAN ISO-2022 ISO-8859 \
ISO646 KAZAKH KOI MISC TCVN UTF
+SUBDIR_PARALLEL=
FILES+= esdb.dir esdb.dir.db esdb.alias esdb.alias.db
CLEANFILES= ${FILES}
diff --git a/share/man/Makefile b/share/man/Makefile
index c3bd5f2..e1dc9cf 100644
--- a/share/man/Makefile
+++ b/share/man/Makefile
@@ -5,6 +5,7 @@
# XXX MISSING: man3f
SUBDIR= man1 man3 man4 man5 man6 man7 man8 man9
+SUBDIR_PARALLEL=
MAKEWHATIS?= makewhatis
diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3
index e7e9426..89a9524 100644
--- a/share/man/man3/bitstring.3
+++ b/share/man/man3/bitstring.3
@@ -30,7 +30,7 @@
.\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93
.\" $FreeBSD$
.\"
-.Dd July 19, 1993
+.Dd October 17, 2015
.Dt BITSTRING 3
.Os
.Sh NAME
@@ -178,7 +178,8 @@ make_lpr_available()
}
.Ed
.Sh SEE ALSO
-.Xr malloc 3
+.Xr malloc 3 ,
+.Xr bitset 9
.Sh HISTORY
The
.Nm bitstring
diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4
index 9dfbd6d..71ce575 100644
--- a/share/man/man4/ipw.4
+++ b/share/man/man4/ipw.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 13, 2008
+.Dd October 15, 2015
.Dt IPW 4
.Os
.Sh NAME
@@ -77,14 +77,14 @@ This driver requires the firmware built with the
.Nm ipwfw
module to work.
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Pa /usr/share/doc/legal/intel_ipw.LICENSE
must be agreed by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_ipw.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact
-.It Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_ipw.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/ipwfw.4 b/share/man/man4/ipwfw.4
index b901de8..810fe2a 100644
--- a/share/man/man4/ipwfw.4
+++ b/share/man/man4/ipwfw.4
@@ -22,7 +22,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 14, 2010
+.Dd October 15, 2015
.Dt IPWFW 4
.Os
.Sh NAME
@@ -59,14 +59,14 @@ Intel PRO/Wireless 2100 series of IEEE 802.11 adapters.
It may be statically linked into the kernel, or loaded as a module.
.Pp
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Pa /usr/share/doc/legal/intel_ipw.LICENSE
must be agreed to by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_ipw.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact
-.It Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_ipw.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4
index 911e54c..5d6b8f5 100644
--- a/share/man/man4/iwi.4
+++ b/share/man/man4/iwi.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 13, 2008
+.Dd October 15, 2015
.Dt IWI 4
.Os
.Sh NAME
@@ -77,14 +77,14 @@ This driver requires the firmware built with the
.Nm iwifw
module to work.
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Pa /usr/share/doc/legal/intel_iwi.LICENSE
must be agreed by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_iwi.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact
-.It Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_iwi.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/iwifw.4 b/share/man/man4/iwifw.4
index 7effd3d..52f90e3 100644
--- a/share/man/man4/iwifw.4
+++ b/share/man/man4/iwifw.4
@@ -22,7 +22,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 14, 2010
+.Dd October 15, 2015
.Dt IWIFW 4
.Os
.Sh NAME
@@ -59,14 +59,14 @@ Intel PRO/Wireless 2200BG/2225BG/2915ABG series of IEEE 802.11 adapters.
It may be statically linked into the kernel, or loaded as a module.
.Pp
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Pa /usr/share/doc/legal/intel_iwi.LICENSE
must be agreed to by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.intel_iwi.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact
-.It Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_iwi.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4
index 2bd2f94..a9fe2a2 100644
--- a/share/man/man4/rsu.4
+++ b/share/man/man4/rsu.4
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd November 19, 2014
+.Dd October 15, 2015
.Dt RSU 4
.Os
.Sh NAME
@@ -41,7 +41,7 @@ if_rsu_load="YES"
.Ed
.Pp
After you have read the license in
-.Pa /usr/share/doc/legal/realtek
+.Pa /usr/share/doc/legal/realtek.LICENSE
you will want to add the following lines to
.Xr loader.conf 5 :
.Bd -literal -offset indent
@@ -175,7 +175,10 @@ driver was written by
.An Damien Bergamini Aq Mt damien@openbsd.org
and ported by
.An Rui Paulo Aq Mt rpaulo@freebsd.org .
+The 802.11n support was added by
+.An Adrian Chadd Aq Mt adrian@freebsd.org .
.Sh CAVEATS
The
.Nm
-driver only supports 1T1R 802.11n operation.
+driver currently does not support 802.11n transmit aggregation,
+either A-MSDU or A-MPDU.
diff --git a/share/man/man4/urtwn.4 b/share/man/man4/urtwn.4
index 5a58200..a4c1b9f 100644
--- a/share/man/man4/urtwn.4
+++ b/share/man/man4/urtwn.4
@@ -14,7 +14,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 24, 2014
+.Dd October 15, 2015
.Dt URTWN 4
.Os
.Sh NAME
@@ -68,14 +68,14 @@ This driver requires the firmware built with the
.Nm urtwnfw
module to work.
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/realtek
+.Pa /usr/share/doc/legal/realtek.LICENSE
must be agreed by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.realtek.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact
-.It Pa /usr/share/doc/legal/realtek
+.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
+.It Pa /usr/share/doc/legal/realtek.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/urtwnfw.4 b/share/man/man4/urtwnfw.4
index c25f944..70e6e67 100644
--- a/share/man/man4/urtwnfw.4
+++ b/share/man/man4/urtwnfw.4
@@ -22,7 +22,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 25, 2014
+.Dd October 15, 2015
.Dt URTWNFW 4
.Os
.Sh NAME
@@ -61,14 +61,14 @@ It may be
statically linked into the kernel, or loaded as a module.
.Pp
For the loaded firmware to be enabled for use the license at
-.Pa /usr/share/doc/legal/realtek
+.Pa /usr/share/doc/legal/realtek.LICENSE
must be agreed to by adding the following line to
.Xr loader.conf 5 :
.Pp
.Dl "legal.realtek.license_ack=1"
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact
-.It Pa /usr/share/doc/legal/realtek
+.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact
+.It Pa /usr/share/doc/legal/realtek.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man4/wpi.4 b/share/man/man4/wpi.4
index 4cf33c4..04539f7 100644
--- a/share/man/man4/wpi.4
+++ b/share/man/man4/wpi.4
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 5, 2008
+.Dd October 15, 2015
.Dt WPI 4
.Os
.Sh NAME
@@ -72,8 +72,8 @@ This driver requires the firmware built with the
.Nm wpifw
module to work.
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi/LICENSE" -compact
-.It Pa /usr/share/doc/legal/intel_wpi/LICENSE
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi.LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_wpi.LICENSE
.Nm
firmware license
.El
diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
index 4116f23..a3c5e05 100644
--- a/share/man/man5/resolver.5
+++ b/share/man/man5/resolver.5
@@ -28,7 +28,7 @@
.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd December 25, 2013
+.Dd October 12, 2015
.Dt RESOLVER 5
.Os
.Sh NAME
@@ -175,6 +175,19 @@ the resolver from obeying the standard
and
.Sy search
rules with the given name.
+.It Sy reload-period: Ns Ar n
+The resolver checks the modification time of
+.Pa /etc/resolv.conf
+every
+.Ar n
+seconds.
+If
+.Pa /etc/resolv.conf
+has changed, it is automatically reloaded.
+The default for
+.Ar n
+is two seconds.
+Setting it to zero disables the file check.
.El
.Pp
Options may also be specified as a space or tab separated list using the
@@ -191,8 +204,7 @@ If more than one instance of these keywords is present,
the last instance will override.
.Pp
The keyword and value must appear on a single line, and the keyword
-(e.g.\&
-.Sy nameserver )
+.Pq for example, Sy nameserver
must start the line.
The value follows the keyword, separated by white space.
.Sh FILES
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index f26123d..a529366 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -11,6 +11,7 @@ MAN= accept_filter.9 \
altq.9 \
atomic.9 \
bios.9 \
+ bitset.9 \
boot.9 \
bpf.9 \
buf.9 \
@@ -429,6 +430,32 @@ MLINKS+=atomic.9 atomic_add.9 \
atomic.9 atomic_subtract.9 \
atomic.9 atomic_swap.9 \
atomic.9 atomic_testandset.9
+MLINKS+=bitset.9 BITSET_DEFINE.9 \
+ bitset.9 BITSET_T_INITIALIZER.9 \
+ bitset.9 BITSET_FSET.9 \
+ bitset.9 BIT_CLR.9 \
+ bitset.9 BIT_COPY.9 \
+ bitset.9 BIT_ISSET.9 \
+ bitset.9 BIT_SET.9 \
+ bitset.9 BIT_ZERO.9 \
+ bitset.9 BIT_FILL.9 \
+ bitset.9 BIT_SETOF.9 \
+ bitset.9 BIT_EMPTY.9 \
+ bitset.9 BIT_ISFULLSET.9 \
+ bitset.9 BIT_FFS.9 \
+ bitset.9 BIT_COUNT.9 \
+ bitset.9 BIT_SUBSET.9 \
+ bitset.9 BIT_OVERLAP.9 \
+ bitset.9 BIT_CMP.9 \
+ bitset.9 BIT_OR.9 \
+ bitset.9 BIT_AND.9 \
+ bitset.9 BIT_NAND.9 \
+ bitset.9 BIT_CLR_ATOMIC.9 \
+ bitset.9 BIT_SET_ATOMIC.9 \
+ bitset.9 BIT_SET_ATOMIC_ACQ.9 \
+ bitset.9 BIT_AND_ATOMIC.9 \
+ bitset.9 BIT_OR_ATOMIC.9 \
+ bitset.9 BIT_COPY_STORE_REL.9
MLINKS+=bpf.9 bpfattach.9 \
bpf.9 bpfattach2.9 \
bpf.9 bpfdetach.9 \
diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9
new file mode 100644
index 0000000..361b0e5
--- /dev/null
+++ b/share/man/man9/bitset.9
@@ -0,0 +1,400 @@
+.\" Copyright (c) 2015 Conrad Meyer <cem@FreeBSD.org>
+.\" 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 17, 2015
+.Dt BITSET 9
+.Os
+.Sh NAME
+.Nm bitset(9)
+\(em
+.Nm BITSET_DEFINE ,
+.Nm BITSET_T_INITIALIZER ,
+.Nm BITSET_FSET ,
+.Nm BIT_CLR ,
+.Nm BIT_COPY ,
+.Nm BIT_ISSET ,
+.Nm BIT_SET ,
+.Nm BIT_ZERO ,
+.Nm BIT_FILL ,
+.Nm BIT_SETOF ,
+.Nm BIT_EMPTY ,
+.Nm BIT_ISFULLSET ,
+.Nm BIT_FFS ,
+.Nm BIT_COUNT ,
+.Nm BIT_SUBSET ,
+.Nm BIT_OVERLAP ,
+.Nm BIT_CMP ,
+.Nm BIT_OR ,
+.Nm BIT_AND ,
+.Nm BIT_NAND ,
+.Nm BIT_CLR_ATOMIC ,
+.Nm BIT_SET_ATOMIC ,
+.Nm BIT_SET_ATOMIC_ACQ ,
+.Nm BIT_AND_ATOMIC ,
+.Nm BIT_OR_ATOMIC ,
+.Nm BIT_COPY_STORE_REL
+.Nd bitset manipulation macros
+.Sh SYNOPSIS
+.In sys/_bitset.h
+.In sys/bitset.h
+.\"
+.Fn BITSET_DEFINE "STRUCTNAME" "const SETSIZE"
+.Fn BITSET_T_INITIALIZER "ARRAY_CONTENTS"
+.Fn BITSET_FSET "N_WORDS"
+.\"
+.Fn BIT_CLR "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Fn BIT_COPY "const SETSIZE" "struct STRUCTNAME *from" "struct STRUCTNAME *to"
+.Ft bool
+.Fn BIT_ISSET "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Fn BIT_SET "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Fn BIT_ZERO "const SETSIZE" "struct STRUCTNAME *bitset"
+.Fn BIT_FILL "const SETSIZE" "struct STRUCTNAME *bitset"
+.Fn BIT_SETOF "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Ft bool
+.Fn BIT_EMPTY "const SETSIZE" "struct STRUCTNAME *bitset"
+.Ft bool
+.Fn BIT_ISFULLSET "const SETSIZE" "struct STRUCTNAME *bitset"
+.Ft size_t
+.Fn BIT_FFS "const SETSIZE" "struct STRUCTNAME *bitset"
+.Ft size_t
+.Fn BIT_COUNT "const SETSIZE" "struct STRUCTNAME *bitset"
+.\"
+.Ft bool
+.Fo BIT_SUBSET
+.Fa "const SETSIZE" "struct STRUCTNAME *haystack" "struct STRUCTNAME *needle"
+.Fc
+.Ft bool
+.Fo BIT_OVERLAP
+.Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2"
+.Fc
+.Ft bool
+.Fo BIT_CMP
+.Fa "const SETSIZE" "struct STRUCTNAME *bitset1" "struct STRUCTNAME *bitset2"
+.Fc
+.Fn BIT_OR "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src"
+.Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src"
+.Fn BIT_NAND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src"
+.\"
+.Fn BIT_CLR_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Fn BIT_SET_ATOMIC "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.Fn BIT_SET_ATOMIC_ACQ "const SETSIZE" "size_t bit" "struct STRUCTNAME *bitset"
+.\"
+.Fo BIT_AND_ATOMIC
+.Fa "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src"
+.Fc
+.Fo BIT_OR_ATOMIC
+.Fa "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src"
+.Fc
+.Fo BIT_COPY_STORE_REL
+.Fa "const SETSIZE" "struct STRUCTNAME *from" "struct STRUCTNAME *to"
+.Fc
+.Sh DESCRIPTION
+The
+.Nm
+family of macros provide a flexible and efficient bitset implementation if the
+maximum size of the set is known at compilation.
+Throughout this manual page, the name
+.Fa SETSIZE
+refers to the size of the bitset in bits.
+Individual bits in bitsets are referenced with indices zero through
+.Fa SETSIZE - 1 .
+One example use of
+.In sys/bitset.h
+is
+.In sys/cpuset.h .
+.Pp
+The
+.Fn BITSET_DEFINE
+macro defines a bitset struct
+.Fa STRUCTNAME
+with room to represent
+.Fa SETSIZE
+bits.
+.Pp
+The
+.Fn BITSET_T_INITIALIZER
+macro allows one to initialize a bitset struct with a compile time literal
+value.
+.Pp
+The
+.Fn BITSET_FSET
+macro generates a compile time literal, usable by
+.Fn BITSET_T_INITIALIZER ,
+representing a full bitset (all bits set).
+For examples of
+.Fn BITSET_T_INITIALIZER
+and
+.Fn BITSET_FSET
+usage, see the
+.Sx BITSET_T_INITIALIZER EXAMPLE
+section.
+The
+.Fa N_WORDS
+parameter to
+.Fn BITSET_FSET
+should be:
+.Bd -literal -offset indent
+__bitset_words(SETSIZE)
+.Ed
+.Pp
+The
+.Fn BIT_CLR
+macro clears bit
+.Fa bit
+in the bitset pointed to by
+.Fa bitset .
+The
+.Fn BIT_CLR_ATOMIC
+macro is identical, but the bit is cleared atomically.
+.Pp
+The
+.Fn BIT_COPY
+macro copies the contents of the bitset
+.Fa from
+to the bitset
+.Fa to .
+.Fn BIT_COPY_STORE_REL
+is similar, but copies component machine words from
+.Fa from
+and writes them to
+.Fa to
+with atomic store with release semantics.
+(That is, if
+.Fa to
+is composed of multiple machine words,
+.Fn BIT_COPY_STORE_REL
+performs multiple individually atomic operations.)
+.Pp
+The
+.Fn BIT_SET
+macro sets bit
+.Fa bit
+in the bitset pointed to by
+.Fa bitset .
+The
+.Fn BIT_SET_ATOMIC
+macro is identical, but the bit is set atomically.
+The
+.Fn BIT_SET_ATOMIC_ACQ
+macro sets the bit with acquire semantics.
+.Pp
+The
+.Fn BIT_ZERO
+macro clears all bits in
+.Fa bitset .
+.Pp
+The
+.Fn BIT_FILL
+macro sets all bits in
+.Fa bitset .
+.Pp
+The
+.Fn BIT_SETOF
+macro clears all bits in
+.Fa bitset
+before setting only bit
+.Fa bit .
+.Pp
+The
+.Fn BIT_EMPTY
+macro returns
+.Dv true
+if
+.Fa bitset
+is empty.
+.Pp
+The
+.Fn BIT_ISFULLSET
+macro returns
+.Dv true
+if
+.Fa bitset
+is full (all bits set).
+.Pp
+The
+.Fn BIT_FFS
+macro returns the 1-index of the first (lowest) set bit in
+.Fa bitset ,
+or zero if
+.Fa bitset
+is empty.
+Like with
+.Xr ffs 3 ,
+to use the non-zero result of
+.Fn BIT_FFS
+as a
+.Fa bit
+index parameter to any other
+.Nm
+macro, you must subtract one from the result.
+.Pp
+The
+.Fn BIT_COUNT
+macro returns the total number of set bits in
+.Fa bitset .
+.Pp
+The
+.Fn BIT_SUBSET
+macro returns
+.Dv true
+if
+.Fa needle
+is a subset of
+.Fa haystack .
+.Pp
+The
+.Fn BIT_OVERLAP
+macro returns
+.Dv true
+if
+.Fa bitset1
+and
+.Fa bitset2
+have any common bits.
+(That is, if
+.Fa bitset1
+AND
+.Fa bitset2
+is not the empty set.)
+.Pp
+The
+.Fn BIT_CMP
+macro returns
+.Dv true
+if
+.Fa bitset1
+is NOT equal to
+.Fa bitset2 .
+.Pp
+The
+.Fn BIT_OR
+macro sets bits present in
+.Fa src
+in
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+|=
+.Fa src . )
+.Fn BIT_OR_ATOMIC
+is similar, but sets bits in the component machine words in
+.Fa dst
+atomically.
+(That is, if
+.Fa dst
+is composed of multiple machine words,
+.Fn BIT_OR_ATOMIC
+performs multiple individually atomic operations.)
+.Pp
+The
+.Fn BIT_AND
+macro clears bits absent from
+.Fa src
+from
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+&=
+.Fa src . )
+.Fn BIT_AND_ATOMIC
+is similar, with the same atomic semantics as
+.Fn BIT_OR_ATOMIC .
+.Pp
+The
+.Fn BIT_NAND
+macro clears bits set in
+.Fa src
+from
+.Fa dst .
+(It is the
+.Nm
+equivalent of the scalar:
+.Fa dst
+&=
+.Fa ~ src . )
+.Sh BITSET_T_INITIALIZER EXAMPLE
+.Bd -literal
+BITSET_DEFINE(_myset, MYSETSIZE);
+
+struct _myset myset;
+
+/* Initialize myset to filled (all bits set) */
+myset = BITSET_T_INITIALIZER(BITSET_FSET(__bitset_words(MYSETSIZE)));
+
+/* Initialize myset to only the lowest bit set */
+myset = BITSET_T_INITIALIZER(0x1);
+.Ed
+.Sh SEE ALSO
+The older
+.Xr bitstring 3 .
+.Sh HISTORY
+.In sys/cpuset.h
+first appeared in
+.Fx 7.1 ,
+released in January 2009, and in
+.Fx 8.0 ,
+released in November 2009 .
+.Pp
+The
+.Nm
+macros first appeared in
+.Fx 10.0
+in January 2014.
+They were MFCed to
+.Fx 9.3 ,
+released in July 2014.
+.Pp
+This manual page first appeared in
+.Fx 11.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+macros were written for
+.In sys/cpuset.h
+by
+.An Jeff Roberson Aq Mt jeff@FreeBSD.org ;
+they were generalized and pulled out as
+.In sys/_bitset.h
+and
+.In sys/bitset.h
+by
+.An Attilio Rao Aq Mt attilio@FreeBSD.org .
+This manual page was written by
+.An Conrad Meyer Aq Mt cem@FreeBSD.org .
+.Sh CAVEATS
+The
+.Fa SETSIZE
+argument to all of these macros must match the value given to
+.Fn BITSET_DEFINE .
+.Pp
+Unlike every other reference to individual set members, which are zero-indexed,
+.Fn BIT_FFS
+returns a one-indexed result (or zero if the set is empty).
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk
index 4e219e8..36298d7 100644
--- a/share/mk/bsd.confs.mk
+++ b/share/mk/bsd.confs.mk
@@ -69,7 +69,7 @@ _${group}INS: ${_${group}CONFS}
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
- ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
@@ -84,4 +84,4 @@ STAGE_TARGETS+= stage_config
.endif
.endif
-.endif # ${MK_TOOLCHAIN} != "no"
+.endif # ${MK_INCLUDES} != "no"
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index 9c6b005..c89c09d 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -133,11 +133,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
${DOC}.html ${DOC}-*.html
realinstall:
-.for _dev in ${PRINTERDEVICE:Mhtml}
+.if ${PRINTERDEVICE:Mhtml}
cd ${SRCDIR}; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
-.endfor
+.endif
.for _dev in ${PRINTERDEVICE:Nhtml}
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}
@@ -184,7 +184,6 @@ ${DFILE.html}: ${SRCS}
.else # unroff(1) requires a macro package as an argument
cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \
document=${DOC} ${SRCS}
-.else
.endif
.endif
.endfor
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index b9379d9..6a6c66a 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -75,7 +75,7 @@ _${group}INS: ${_${group}FILES}
${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
- -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index 3f9680a..8ea97ba 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -70,7 +70,7 @@ _${group}INS: ${_${group}INCS}
${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
.else
${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
- ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/
.endif
.endif
@@ -99,4 +99,4 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
.endif
.endif
-.endif # ${MK_TOOLCHAIN} != "no"
+.endif # ${MK_INCLUDES} != "no"
diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk
index 8f91315..7720d28 100644
--- a/share/mk/bsd.info.mk
+++ b/share/mk/bsd.info.mk
@@ -177,11 +177,11 @@ CLEANFILES+= ${INFO:S/$/.info.*.html/} ${INFO:S/$/.info/}
install: ${INSTALLINFODIRS}
.if !empty(IFILES:N*.html)
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
- ${IFILES:N*.html} ${DESTDIR}${INFODIR}
+ ${IFILES:N*.html} ${DESTDIR}${INFODIR}/
.endif
.if !empty(FORMATS:Mhtml)
${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
- ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}
+ ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR}/
.endif
.else
# The indirection in the following is to avoid the null install rule
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 0ed8345..e906ab7 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -140,7 +140,7 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full
# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
.if ${_SHLIBDIR} == "/boot" ||\
${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
- ${SHLIBDIR:C%/usr/lib(32)?(/.*)?%/usr/lib%} == "/usr/lib"
+ ${SHLIBDIR:C%/usr/(tests/)?lib(32|exec)?(/.*)?%/usr/lib%} == "/usr/lib"
DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR}
.else
DEBUGFILEDIR=${_SHLIBDIR}/.debug
@@ -339,23 +339,23 @@ realinstall: _libinstall
_libinstall:
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}.a ${DESTDIR}${_LIBDIR}/
.endif
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}_p.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(SHLIB_NAME)
${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
- ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}
+ ${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
+ ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
${_INSTALLFLAGS} \
- ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}
+ ${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}/
.endif
.if defined(SHLIB_LINK)
.if commands(${SHLIB_LINK:R}.ld)
@@ -378,11 +378,11 @@ _libinstall:
.endif # SHIB_NAME
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}
+ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
.endif
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
- ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
+ ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}/
.endif
.endif # !defined(INTERNALLIB)
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index bbb47b9..72aedfb 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -187,7 +187,7 @@ _maninstall: ${MAN}
.endfor
.else
.for _page _sect in ${.ALLSRC:C/\.([^.]*)$/.\1 \1/}
- @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}; \
+ @d=${DESTDIR}${MANDIR}${_sect}${MANSUBDIR}/; \
${ECHO} ${MINSTALL} ${_page} $${d}; \
${MINSTALL} $${page} $${d};
.endfor
@@ -201,7 +201,7 @@ _maninstall: ${MAN}
.else
.for __page in ${MAN}
${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \
- ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}
+ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/
.if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \
${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/}
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 966c17e..fbb6922 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -56,9 +56,9 @@ PROG_FULL=${PROG}.full
# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
.if defined(BINDIR) && (\
${BINDIR} == "/bin" ||\
- ${BINDIR} == "/libexec" ||\
+ ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\
${BINDIR} == "/sbin" ||\
- ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\
+ ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin"\
)
DEBUGFILEDIR= ${DEBUGDIR}${BINDIR}
.else
@@ -205,7 +205,7 @@ _proginstall:
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
.if ${MK_DEBUG_FILES} != "no"
.if defined(DEBUGMKDIR)
- ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
+ ${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}/
.endif
${INSTALL} -T debug -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \
${PROGNAME}.debug ${DESTDIR}${DEBUGFILEDIR}/${PROGNAME}.debug
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
index ab52708..2da30c7 100644
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -31,6 +31,9 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]}
# They may have asked us to build just one
.for t in ${PROGS}
.if make($t)
+.if ${PROGS_CXX:M${t}}
+PROG_CXX ?= $t
+.endif
PROG ?= $t
.endif
.endfor
@@ -61,7 +64,7 @@ UPDATE_DEPENDFILE ?= yes
UPDATE_DEPENDFILE ?= NO
# prog.mk will do the rest
-.else
+.else # !defined(PROG)
all: ${PROGS}
# We cannot capture dependencies for meta mode here
@@ -80,10 +83,29 @@ $v =
# handle being called [bsd.]progs.mk
.include <bsd.prog.mk>
-.if !empty(PROGS) && !defined(_RECURSING_PROGS)
+.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
# tell progs.mk we might want to install things
PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install
+# Find common sources among the PROGS and depend on them before building
+# anything. This allows parallelization without them each fighting over
+# the same objects.
+_PROGS_COMMON_SRCS=
+_PROGS_ALL_SRCS=
+.for p in ${PROGS}
+.for s in ${SRCS.${p}}
+.if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}}
+_PROGS_COMMON_SRCS+= ${s}
+.else
+_PROGS_ALL_SRCS+= ${s}
+.endif
+.endfor
+.endfor
+.if !empty(_PROGS_COMMON_SRCS)
+_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g}
+${PROGS}: ${_PROGS_COMMON_OBJS}
+.endif
+
.for p in ${PROGS}
.if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p)
# bsd.prog.mk may need to know this
@@ -111,4 +133,4 @@ $p.$t: .PHONY .MAKE
.for t in ${PROGS_TARGETS:O:u}
$t: ${PROGS:%=%.$t}
.endfor
-.endif
+.endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 293b017..037a7fe 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -32,9 +32,11 @@
.if !target(__<bsd.subdir.mk>__)
__<bsd.subdir.mk>__:
-ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \
- cleanilinks cleanobj depend distribute lint maninstall manlint obj \
- objlink realinstall regress tags ${SUBDIR_TARGETS}
+ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \
+ cleandir cleanilinks cleanobj depend distribute \
+ installconfig lint maninstall manlint obj objlink \
+ realinstall regress tags \
+ ${SUBDIR_TARGETS}
.include <bsd.init.mk>
@@ -123,7 +125,10 @@ _sub.${__target}: _SUBDIR
.endif
.endfor
-.for __target in files includes config
+# This is to support 'make includes' calling 'make buildincludes' and
+# 'make installincludes' in the proper order, and to support these
+# targets as SUBDIR_TARGETS.
+.for __target in files includes
.for __stage in build install
${__stage}${__target}:
.if make(${__stage}${__target})
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 044b668..cad2b2f 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -148,8 +148,14 @@ CXXFLAGS.clang+= -Wno-c++11-extensions
.if ${MK_SSP} != "no" && \
${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
+.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \
+ (${COMPILER_TYPE} == "gcc" && \
+ (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900))
# Don't use -Wstack-protector as it breaks world with -Werror.
SSP_CFLAGS?= -fstack-protector-strong
+.else
+SSP_CFLAGS?= -fstack-protector
+.endif
CFLAGS+= ${SSP_CFLAGS}
.endif # SSP && !ARM && !MIPS
@@ -165,13 +171,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 \
- beforelinking build build-tools buildfiles buildincludes \
- checkdpadd clean cleandepend cleandir cleanobj configure \
- depend dependall distclean distribute exe \
- html includes install installfiles installincludes lint \
- obj objlink objs objwarn realall realdepend \
- realinstall regress subdir-all subdir-depend subdir-install \
- tags whereobj
+ beforelinking build build-tools buildconfig buildfiles \
+ buildincludes checkdpadd clean cleandepend cleandir cleanobj \
+ configure depend dependall distclean distribute exe \
+ files html includes install installconfig installfiles \
+ installincludes lint obj objlink objs objwarn realall \
+ realdepend realinstall regress subdir-all subdir-depend \
+ subdir-install tags whereobj
# we don't want ${PROG} to be PHONY
.PHONY: ${PHONY_NOTMAIN:N${PROG:U}}
diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk
index fc287e3..61f9d79 100644
--- a/share/mk/src.libnames.mk
+++ b/share/mk/src.libnames.mk
@@ -240,6 +240,7 @@ _DP_vmmapi= util
_DP_ctf= z
_DP_proc= rtld_db util
_DP_dtrace= rtld_db pthread
+_DP_xo= util
# Define spacial cases
LDADD_supcplusplus= -lsupc++
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index e8f4892..b6c75b6 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -145,13 +145,12 @@ ECHODIR ?= true
.endif
.endif
-.if defined(.PARSEDIR)
-# _+_ appears to be a workaround for the special src .MAKE not working.
-# setting it to + interferes with -N
-_+_ ?=
-.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n"
-# the check above matches only a single -n, so -n -n will result
-# in _+_ = +
+.if ${.MAKEFLAGS:M-N}
+# bmake -N is supposed to skip executing anything but it does not skip
+# exeucting '+' commands. The '+' feature is used where .MAKE
+# is not safe for the entire target. -N is intended to skip building sub-makes
+# so it executing '+' commands is not right. Work around the bug by not
+# setting '+' when -N is used.
_+_ ?=
.else
_+_ ?= +
diff --git a/share/syscons/Makefile b/share/syscons/Makefile
index 9cbf100..c5993a8 100644
--- a/share/syscons/Makefile
+++ b/share/syscons/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
SUBDIR= fonts keymaps scrnmaps
+SUBDIR_PARALLEL=
.include <bsd.subdir.mk>
diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
index ebb26c7..b3d968d 100644
--- a/share/zoneinfo/Makefile
+++ b/share/zoneinfo/Makefile
@@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA}
beforeinstall:
cd ${TZBUILDDIR} && \
- find * -type f -print -exec ${INSTALL} \
+ find -s * -type f -print -exec ${INSTALL} \
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
\{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
OpenPOWER on IntegriCloud