svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl...

Marcel Moolenaar marcel at FreeBSD.org
Mon Oct 22 01:18:42 UTC 2012


Author: marcel
Date: Mon Oct 22 01:18:41 2012
New Revision: 241823
URL: http://svn.freebsd.org/changeset/base/241823

Log:
  Add ATF to the build. This is may be a bit rought around the egdes,
  but committing it helps to get everyone on the same page and makes
  sure we make progress.
  
  Tinderbox breakages that are the result of this commit are entirely
  the committer's fault -- in other words: buildworld testing on amd64
  only.
  
  Credits follow:
  
  Submitted by:	Garrett Cooper <yanegomi at gmail.com>
  Sponsored by:	Isilon Systems
  Based on work by:	keramida@
  Thanks to:	gnn@, mdf@, mlaier@, sjg@
  Special thanks to:	keramida@

Added:
  head/etc/atf/
  head/etc/atf/FreeBSD.conf   (contents, props changed)
  head/etc/atf/Makefile   (contents, props changed)
  head/etc/atf/common.conf   (contents, props changed)
  head/lib/atf/
  head/lib/atf/Makefile   (contents, props changed)
  head/lib/atf/Makefile.inc   (contents, props changed)
  head/lib/atf/libatf-c/
  head/lib/atf/libatf-c++/
  head/lib/atf/libatf-c++/Makefile   (contents, props changed)
  head/lib/atf/libatf-c/Makefile   (contents, props changed)
  head/libexec/atf/
  head/libexec/atf/Makefile   (contents, props changed)
  head/libexec/atf/Makefile.inc   (contents, props changed)
  head/libexec/atf/atf-check/
  head/libexec/atf/atf-check/Makefile   (contents, props changed)
  head/share/atf/
  head/share/atf/Makefile   (contents, props changed)
  head/share/doc/atf/
  head/share/doc/atf/Makefile   (contents, props changed)
  head/share/examples/atf/
  head/share/examples/atf/Makefile   (contents, props changed)
  head/share/mk/bsd.progs.mk   (contents, props changed)
  head/share/xml/
  head/share/xml/Makefile   (contents, props changed)
  head/share/xml/Makefile.inc   (contents, props changed)
  head/share/xml/atf/
  head/share/xml/atf/Makefile   (contents, props changed)
  head/share/xsl/
  head/share/xsl/Makefile   (contents, props changed)
  head/share/xsl/Makefile.inc   (contents, props changed)
  head/share/xsl/atf/
  head/share/xsl/atf/Makefile   (contents, props changed)
  head/tools/build/options/WITHOUT_ATF   (contents, props changed)
  head/usr.bin/atf/
  head/usr.bin/atf/Makefile   (contents, props changed)
  head/usr.bin/atf/Makefile.inc   (contents, props changed)
  head/usr.bin/atf/atf-config/
  head/usr.bin/atf/atf-config/Makefile   (contents, props changed)
  head/usr.bin/atf/atf-report/
  head/usr.bin/atf/atf-report/Makefile   (contents, props changed)
  head/usr.bin/atf/atf-run/
  head/usr.bin/atf/atf-run/Makefile   (contents, props changed)
  head/usr.bin/atf/atf-sh/
  head/usr.bin/atf/atf-sh/Makefile   (contents, props changed)
  head/usr.bin/atf/atf-version/
  head/usr.bin/atf/atf-version/Makefile   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/etc/Makefile
  head/etc/group
  head/etc/master.passwd
  head/etc/mtree/BSD.include.dist
  head/etc/mtree/BSD.root.dist
  head/etc/mtree/BSD.usr.dist
  head/lib/Makefile
  head/libexec/Makefile
  head/share/Makefile
  head/share/doc/Makefile
  head/share/examples/Makefile
  head/share/man/man1/Makefile
  head/share/man/man4/Makefile
  head/share/man/man5/Makefile
  head/share/man/man7/Makefile
  head/share/mk/bsd.libnames.mk
  head/share/mk/bsd.own.mk
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.bin/Makefile

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/Makefile.inc1	Mon Oct 22 01:18:41 2012	(r241823)
@@ -1285,6 +1285,7 @@ _prebuild_libs=	${_kerberos5_lib_libasn1
 		${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
 		${_kerberos5_lib_libroken} \
 		${_kerberos5_lib_libwind} \
+		${_lib_atf_libatf_c} \
 		lib/libbz2 ${_libcom_err} lib/libcrypt \
 		lib/libexpat \
 		${_lib_libgssapi} ${_lib_libipx} \
@@ -1297,6 +1298,10 @@ _prebuild_libs=	${_kerberos5_lib_libasn1
 		${_secure_lib_libcrypto} ${_secure_lib_libssh} \
 		${_secure_lib_libssl}
 
+.if ${MK_ATF} != "no"
+_lib_atf_libatf_c=	lib/atf/libatf-c
+.endif
+
 .if ${MK_LIBTHR} != "no"
 _lib_libthr=	lib/libthr
 .endif

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -198,6 +198,9 @@ distribution:
 .endif
 	pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
 	    ${DESTDIR}/etc/master.passwd
+.if ${MK_ATF} != "no"
+	${_+_}cd ${.CURDIR}/atf; ${MAKE} install
+.endif
 .if ${MK_BLUETOOTH} != "no"
 	${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif

Added: head/etc/atf/FreeBSD.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/etc/atf/FreeBSD.conf	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+Content-Type: application/X-atf-config; version="1"
+
+#
+# Configuration file for the FreeBSD test suite.
+#
+# See atf-formats(5) for details on the syntax of this file and tests(7) for
+# details on the FreeBSD test suite.
+#
+
+#variable1 = value1
+#variable2 = value2

Added: head/etc/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/etc/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,39 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF=		${.CURDIR}/../../contrib/atf
+
+.PATH:		${ATF}/atf-run/sample
+
+NO_OBJ=
+
+FILESGROUPS=	ETC
+
+ETCDIR=		/etc/atf
+ETC=		FreeBSD.conf atf-run.hooks common.conf
+
+.include <bsd.prog.mk>

Added: head/etc/atf/common.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/etc/atf/common.conf	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+Content-Type: application/X-atf-config; version="1"
+
+#
+# Sample configuration file for properties affecting all test suites.
+#
+
+# When running the test suite as root, some tests require to switch to
+# an unprivileged user to perform extra checks.  Set this variable to
+# the user you want to use in those cases.  If not set, those tests will
+# be skipped.
+unprivileged-user = "_atf"

Modified: head/etc/group
==============================================================================
--- head/etc/group	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/group	Mon Oct 22 01:18:41 2012	(r241823)
@@ -16,6 +16,7 @@ staff:*:20:
 sshd:*:22:
 smmsp:*:25:
 mailnull:*:26:
+_atf:*:27:
 guest:*:31:
 bind:*:53:
 proxy:*:62:

Modified: head/etc/master.passwd
==============================================================================
--- head/etc/master.passwd	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/master.passwd	Mon Oct 22 01:18:41 2012	(r241823)
@@ -13,6 +13,7 @@ man:*:9:9::0:0:Mister Man Pages:/usr/sha
 sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
 smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
 mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
+_atf:*:27:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin
 bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin
 proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
 _pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin

Modified: head/etc/mtree/BSD.include.dist
==============================================================================
--- head/etc/mtree/BSD.include.dist	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/mtree/BSD.include.dist	Mon Oct 22 01:18:41 2012	(r241823)
@@ -9,6 +9,10 @@
     ..
     arpa
     ..
+    atf-c
+    ..
+    atf-c++
+    ..
     bsm
     ..
     bsnmp

Modified: head/etc/mtree/BSD.root.dist
==============================================================================
--- head/etc/mtree/BSD.root.dist	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/mtree/BSD.root.dist	Mon Oct 22 01:18:41 2012	(r241823)
@@ -24,6 +24,8 @@
     etc
         X11
         ..
+        atf
+        ..
         bluetooth
         ..
         defaults

Modified: head/etc/mtree/BSD.usr.dist
==============================================================================
--- head/etc/mtree/BSD.usr.dist	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/etc/mtree/BSD.usr.dist	Mon Oct 22 01:18:41 2012	(r241823)
@@ -58,6 +58,8 @@
     sbin
     ..
     share
+        atf
+        ..
         calendar
             de_DE.ISO8859-1
             ..
@@ -77,6 +79,8 @@
         doc
             IPv6
             ..
+            atf
+            ..
             atm
             ..
             bind9
@@ -211,6 +215,8 @@
             ..
             IPv6
             ..
+            atf
+            ..
             bootforth
             ..
             csh
@@ -1324,6 +1330,14 @@
             catalog
             ..
         ..
+        xml
+            atf
+            ..
+        ..
+        xsl
+            atf
+            ..
+        ..
         zoneinfo
             Africa
             ..
@@ -1361,4 +1375,6 @@
     ..
     src             nochange
     ..
+    tests
+    ..
 ..

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/lib/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -118,6 +118,7 @@ SUBDIR=	${SUBDIR_ORDERED} \
 	libwrap \
 	liby \
 	libz \
+	${_atf} \
 	${_bind} \
 	${_clang}
 
@@ -133,6 +134,10 @@ _csu=csu
 
 # NB: keep these sorted by MK_* knobs
 
+.if ${MK_ATF} != "no"
+_atf=		atf
+.endif
+
 .if ${MK_ATM} != "no"
 _libngatm=	libngatm
 .endif

Added: head/lib/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,36 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.own.mk>
+
+SUBDIR=		\
+		libatf-c \
+		libatf-c++
+
+.ORDER: ${SUBDIR}
+
+.include <bsd.subdir.mk>

Added: head/lib/atf/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/atf/Makefile.inc	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,54 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF=		${.CURDIR}/../../../contrib/atf
+
+_CFLAGS:=	${CFLAGS}
+_CPPFLAGS:=	${CPPFLAGS}
+_CXXFLAGS:=	${CXXFLAGS}
+
+CFLAGS+=	-DHAVE_CONFIG_H
+CFLAGS+=	-DATF_ARCH='"${MACHINE}"'
+CFLAGS+=	-DATF_BUILD_CC='"${CC}"'
+CFLAGS+=	-DATF_BUILD_CFLAGS='"${_CFLAGS}"'
+CFLAGS+=	-DATF_BUILD_CPP='"${CPP}"'
+CFLAGS+=	-DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"'
+CFLAGS+=	-DATF_BUILD_CXX='"${CXX}"'
+CFLAGS+=	-DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"'
+CFLAGS+=	-DATF_CONFDIR='"${CONFDIR}/atf"'
+CFLAGS+=	-DATF_INCLUDEDIR='"${INCLUDEDIR}"'
+CFLAGS+=	-DATF_LIBDIR='"${LIBDIR}"'
+CFLAGS+=	-DATF_LIBEXECDIR='"${LIBEXECDIR}"'
+CFLAGS+=	-DATF_MACHINE='"${MACHINE_ARCH}"'
+CFLAGS+=	-DATF_M4='"/usr/bin/m4"'
+CFLAGS+=	-DATF_PKGDATADIR='"${SHAREDIR}/atf"'
+CFLAGS+=	-DATF_SHELL='"/bin/sh"'
+CFLAGS+=	-DATF_WORKDIR='"/tmp"'
+
+WARNS?=		3
+
+# vim: syntax=make

Added: head/lib/atf/libatf-c++/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/atf/libatf-c++/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,74 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.init.mk>
+
+LIB=		atf-c++
+SHLIB_MAJOR=	1
+
+# libatf-c++ depends on the C version of the ATF library to build.
+DPADD=		${LIBATFC}
+LDADD=		-L${.OBJDIR}/../libatf-c -latf-c
+
+.PATH:		${ATF}
+.PATH:		${ATF}/atf-c++
+.PATH:		${ATF}/atf-c++/detail
+
+CFLAGS+=	-I${ATF}
+CFLAGS+=	-I${.CURDIR}/../libatf-c
+CFLAGS+=	-I.
+
+CFLAGS+=	-DHAVE_CONFIG_H
+
+SRCS=		application.cpp \
+		build.cpp \
+		check.cpp \
+		config.cpp \
+		env.cpp \
+		exceptions.cpp \
+		expand.cpp \
+		fs.cpp \
+		parser.cpp \
+		process.cpp \
+		tests.cpp \
+		text.cpp \
+		ui.cpp
+
+INCS=		build.hpp \
+		check.hpp \
+		config.hpp \
+		macros.hpp \
+		tests.hpp \
+		utils.hpp
+INCSDIR=	${INCLUDEDIR}/atf-c++
+
+INCS+=		atf-c++.hpp
+INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
+
+MAN=		atf-c++-api.3
+
+.include <bsd.lib.mk>

Added: head/lib/atf/libatf-c/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/atf/libatf-c/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,76 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.init.mk>
+
+LIB=		atf-c
+SHLIB_MAJOR=	1
+
+.PATH:		${ATF}
+.PATH:		${ATF}/atf-c
+.PATH:		${ATF}/atf-c/detail
+
+CFLAGS+=	-I${ATF}
+CFLAGS+=	-I${.CURDIR}
+CFLAGS+=	-I.
+
+SRCS=		build.c \
+		check.c \
+		config.c \
+		dynstr.c \
+		env.c \
+		error.c \
+		fs.c \
+		list.c \
+		map.c \
+		process.c \
+		sanity.c \
+		text.c \
+		user.c \
+		utils.c \
+		tc.c \
+		tp.c \
+		tp_main.c
+
+INCS=		build.h \
+		check.h \
+		config.h \
+		defs.h \
+		error.h \
+		error_fwd.h \
+		macros.h \
+		tc.h \
+		tp.h \
+		utils.h
+INCSDIR=	${INCLUDEDIR}/atf-c
+
+INCS+=		atf-c.h
+INCSDIR_atf-c.h= ${INCLUDEDIR}
+
+MAN=		atf-c-api.3
+
+.include <bsd.lib.mk>

Modified: head/libexec/Makefile
==============================================================================
--- head/libexec/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/libexec/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -3,7 +3,8 @@
 
 .include <bsd.own.mk>
 
-SUBDIR=	${_atrun} \
+SUBDIR=	${_atf} \
+	${_atrun} \
 	bootpd \
 	${_comsat} \
 	fingerd \
@@ -32,6 +33,10 @@ SUBDIR=	${_atrun} \
 	ulog-helper \
 	${_ypxfr}
 
+.if ${MK_ATF} != "no"
+_atf=		atf
+.endif
+
 .if ${MK_AT} != "no"
 _atrun=		atrun
 .endif

Added: head/libexec/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/libexec/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,30 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+SUBDIR=	atf-check
+
+.include <bsd.subdir.mk>

Added: head/libexec/atf/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/libexec/atf/Makefile.inc	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,32 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF = ${.CURDIR}/../../../contrib/atf
+
+CFLAGS+=	-DHAVE_CONFIG_H
+
+WARNS?=		3

Added: head/libexec/atf/atf-check/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/libexec/atf/atf-check/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,45 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+.include <bsd.init.mk>
+
+.PATH:		${ATF}/atf-sh
+
+BINDIR=		/usr/libexec
+PROG_CXX=	atf-check
+SRCS=		atf-check.cpp
+MAN=		atf-check.1
+
+CFLAGS+=	-I${ATF}
+
+DPADD+=		${LIBATF_CXX} ${LIBATF_C}
+
+LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c++
+LDFLAGS+=	-L${.OBJDIR}/../../../lib/atf/libatf-c
+LDADD+=		-latf-c++ -latf-c
+
+.include <bsd.prog.mk>

Modified: head/share/Makefile
==============================================================================
--- head/share/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -5,7 +5,8 @@
 
 # Do not include `info' in the SUBDIR list, it is handled separately.
 
-SUBDIR=	${_colldef} \
+SUBDIR=	${_atf} \
+	${_colldef} \
 	${_dict} \
 	${_doc} \
 	dtrace \
@@ -26,10 +27,16 @@ SUBDIR=	${_colldef} \
 	tabset \
 	termcap \
 	${_timedef} \
+	xml \
+	xsl \
 	${_zoneinfo}
 
 # NB: keep these sorted by MK_* knobs
 
+.if ${MK_ATF} != "no"
+_atf=		atf
+.endif
+
 .if ${MK_BSNMP} != "no"
 _snmp=		snmp
 .endif

Added: head/share/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,37 @@
+#-
+# Copyright (c) 2012 EMC Corporation.
+# 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$
+
+ATF=		${.CURDIR}/../../contrib/atf
+
+.PATH:		${ATF}/atf-run/sample
+
+NO_OBJ=
+
+FILESDIR=	${SHAREDIR}/atf
+FILES=		atf-run.hooks
+
+.include <bsd.prog.mk>

Modified: head/share/doc/Makefile
==============================================================================
--- head/share/doc/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/doc/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -3,7 +3,16 @@
 
 .include <bsd.own.mk>
 
-SUBDIR=	${_bind9} IPv6 legal ${_llvm} ${_roffdocs}
+SUBDIR=	${_IPv6} \
+	${_atf} \
+	${_bind9} \
+	legal \
+	${_llvm} \
+	${_roffdocs}
+
+.if ${MK_ATF} != "no"
+_atf= atf
+.endif
 
 .if ${MK_BIND} != "no"
 _bind9=	bind9
@@ -13,6 +22,10 @@ _bind9=	bind9
 _llvm=	llvm
 .endif
 
+.if ${MK_INET6} != "no"
+_IPv6=	IPv6
+.endif
+
 # FIXME this is not a real solution ...
 .if ${MK_GROFF} != "no"
 _roffdocs=	papers psd smm usd

Added: head/share/doc/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/doc/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,39 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF=		${.CURDIR}/../../../contrib/atf
+.PATH:		${ATF}
+.PATH:		${ATF}/doc
+
+NO_OBJ=
+
+FILESGROUPS=	TOP
+
+TOPDIR=		${SHAREDIR}/doc/atf
+TOP=		AUTHORS COPYING NEWS README
+
+.include <bsd.prog.mk>

Modified: head/share/examples/Makefile
==============================================================================
--- head/share/examples/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/examples/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -242,6 +242,9 @@ etc-examples:
 .endif
 
 .if ${SHARED} != "symlinks"
+.if ${MK_ATF} != "no"
+SUBDIR+=atf
+.endif
 .if ${MK_IPFILTER} != "no"
 SUBDIR+=ipfilter
 .endif

Added: head/share/examples/atf/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/examples/atf/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,39 @@
+#-
+# Copyright (c) 2011 Google, Inc.
+# 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$
+
+ATF=		${.CURDIR}/../../../contrib/atf
+
+.PATH:		${ATF}/atf-report
+.PATH:		${ATF}/atf-run/sample
+
+NO_OBJ=
+
+FILESDIR=	${SHAREDIR}/examples/atf
+FILES=		atf-run.hooks \
+		tests-results.css
+
+.include <bsd.prog.mk>

Modified: head/share/man/man1/Makefile
==============================================================================
--- head/share/man/man1/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/man/man1/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -1,8 +1,16 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 MAN=	builtin.1 intro.1
 
+.if ${MK_ATF} != "no"
+ATF=	${.CURDIR}/../../../contrib/atf
+.PATH:	${ATF}/doc
+MAN+=	atf-test-program.1
+.endif
+
 # Create MLINKS for Shell built in commands for which there are no userland
 # utilities of the same name:
 MLINKS=	builtin.1 alias.1 \

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/man/man4/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -60,6 +60,7 @@ MAN=	aac.4 \
 	atkbd.4 \
 	atkbdc.4 \
 	${_atp.4} \
+	${_atf_test_case.4} \
 	${_atrtc.4} \
 	${_attimer.4} \
 	audit.4 \
@@ -805,6 +806,12 @@ _nvram2env.4=	nvram2env.4
 SUBDIR=	man4.${MACHINE_CPUARCH}
 .endif
 
+.if ${MK_ATF} != "no"
+ATF=            ${.CURDIR}/../../../contrib/atf
+.PATH:          ${ATF}/doc
+_atf_test_case.4=	atf-test-case.4
+.endif
+
 .if ${MK_PF} != "no"
 _pf.4=		pf.4
 _pflog.4=	pflog.4

Modified: head/share/man/man5/Makefile
==============================================================================
--- head/share/man/man5/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/man/man5/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -6,6 +6,7 @@
 #MISSING: dump.5 plot.5
 MAN=	acct.5 \
 	ar.5 \
+	${_atf_formats.5} \
 	a.out.5 \
 	bluetooth.device.conf.5 \
 	bluetooth.hosts.5 \
@@ -80,6 +81,12 @@ MLINKS+=quota.user.5 quota.group.5
 MLINKS+=rc.conf.5 rc.conf.local.5
 MLINKS+=resolver.5 resolv.conf.5
 
+.if ${MK_ATF} != "no"
+ATF=			${.CURDIR}/../../../contrib/atf
+.PATH:			${ATF}/doc
+_atf_formats.5=		atf-formats.5
+.endif
+
 .if ${MK_HESIOD} != "no"
 MAN+=	hesiod.conf.5 
 .endif

Modified: head/share/man/man7/Makefile
==============================================================================
--- head/share/man/man7/Makefile	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/man/man7/Makefile	Mon Oct 22 01:18:41 2012	(r241823)
@@ -1,6 +1,8 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 # $FreeBSD$
 
+.include <bsd.own.mk>
+
 #MISSING: eqnchar.7 ms.7 term.7
 MAN=	adding_user.7 \
 	ascii.7 \
@@ -34,4 +36,17 @@ MLINKS+= c99.7 c78.7
 MLINKS+= c99.7 c89.7
 MLINKS+= c99.7 c90.7
 
+.if ${MK_ATF} != "no"
+ATF=            ${.CURDIR}/../../../contrib/atf
+.PATH:          ${ATF}/doc
+MAN+=		atf.7
+
+CLEANFILES+=	atf.7 atf.7.tmp
+atf.7: atf.7.in
+	sed -e 's,__DOCDIR__,${DOCDIR}/atf,g' \
+	    -e 's,__TESTSDIR__,${TESTSBASE},g' \
+	    < ${.ALLSRC} > ${.TARGET}.tmp
+	mv ${.TARGET}.tmp ${.TARGET}
+.endif
+
 .include <bsd.prog.mk>

Modified: head/share/mk/bsd.libnames.mk
==============================================================================
--- head/share/mk/bsd.libnames.mk	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/mk/bsd.libnames.mk	Mon Oct 22 01:18:41 2012	(r241823)
@@ -13,6 +13,8 @@ LIBCRT0?=	${DESTDIR}${LIBDIR}/crt0.o
 LIBALIAS?=	${DESTDIR}${LIBDIR}/libalias.a
 LIBARCHIVE?=	${DESTDIR}${LIBDIR}/libarchive.a
 LIBASN1?=	${DESTDIR}${LIBDIR}/libasn1.a
+LIBATF_C?=	${DESTDIR}${LIBDIR}/libatf-c.a
+LIBATF_CXX?=	${DESTDIR}${LIBDIR}/libatf-c++.a
 LIBATM?=	${DESTDIR}${LIBDIR}/libatm.a
 LIBAUDITD?=	${DESTDIR}${LIBDIR}/libauditd.a
 LIBAVL?=	${DESTDIR}${LIBDIR}/libavl.a

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Sun Oct 21 22:27:55 2012	(r241822)
+++ head/share/mk/bsd.own.mk	Mon Oct 22 01:18:41 2012	(r241823)
@@ -306,6 +306,7 @@ __DEFAULT_YES_OPTIONS = \
     APM \
     ASSERT_DEBUG \
     AT \
+    ATF \
     ATM \
     AUDIT \
     AUTHPF \

Added: head/share/mk/bsd.progs.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/mk/bsd.progs.mk	Mon Oct 22 01:18:41 2012	(r241823)
@@ -0,0 +1,350 @@
+#	from: @(#)bsd.prog.mk	5.26 (Berkeley) 6/25/91
+# $FreeBSD$
+
+.include <bsd.init.mk>
+
+.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm
+
+.if ${MK_MAN} == "no"
+NO_MAN=
+.endif
+
+# Legacy knobs
+.if defined(PROG) || defined(PROG_CXX)
+. if defined(PROG)
+PROGS=	${PROG}
+. endif
+. if defined(PROG_CXX)
+PROGS=	${PROG_CXX}
+PROGS_CXX= ${PROG_CXX}
+. endif
+# Loop once to keep pattern and avoid namespace pollution
+. for _P in ${PROGS}
+.  if defined(INTERNALPROG)
+INTERNALPROG.${_P}=
+.  endif
+.  if !defined(NO_MAN)
+.   if defined(MAN)
+MAN.${_P}= ${MAN}
+.   else
+.    for sect in 1 1aout 2 3 4 5 6 7 8 9
+.     if defined(MAN${sect})
+MAN.${_P}= ${MAN${sect}}
+.     endif
+.    endfor
+.   endif
+.  endif # defined(NO_MAN)
+.  if defined(NLSNAME) && !empty(NLSNAME)
+NLSNAME.${P}:=	${NLSNAME}
+.  endif
+.  if defined(OBJS)
+OBJS.${_P}:=	${OBJS}
+.  endif
+.  if defined(PRECIOUSPROG)
+PRECIOUSPROG.${_P}=
+.  endif
+.  if defined(PROGNAME)
+PROGNAME.${_P}=	${PROGNAME}
+.  endif
+.  if defined(SRCS)
+SRCS.${_P}:=	${SRCS}
+.  endif
+. endfor
+.else # !defined(PROG) && !defined(PROG_CXX)
+. if defined(PROGS_CXX) && !empty(PROGS_CXX)
+PROGS+=		${PROGS_CXX}
+. endif
+.endif # defined(PROG) || defined(PROG_CXX)
+
+.if defined(PROGS_CXX) && !empty(PROGS_CXX)
+. for _P in ${PROGS_CXX}
+PROG_CXX.${_P}=
+. endfor
+.endif
+
+# Avoid recursive variables
+.undef NLSNAME
+
+.if defined(COPTS)
+CFLAGS+=${COPTS}
+.endif
+
+.if defined(DEBUG_FLAGS)
+. if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
+CTFFLAGS+= -g

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list