Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf Homogenize reachover build file structure w...
details: https://anonhg.NetBSD.org/src/rev/e4ff5d3759a7
branches: trunk
changeset: 326679:e4ff5d3759a7
user: jmmv <jmmv%NetBSD.org@localhost>
date: Wed Feb 12 04:08:31 2014 +0000
description:
Homogenize reachover build file structure with that of kyua-cli:
- Move the majority of the common build definitions to the top-level
Makefile.inc and ensure this gets included everywhere.
- Move the bconfig.h file to the top-level directory.
- Add a statically-generated defs.h file instead of creating one
during the build. Easier to understand and less chances for things
to go wrong.
- Make sure all files using ATF_VERSION have the right dependency to
trigger a rebuild when the value changes.
- Clean up stale -I flags.
This is all mostly for simplicity reasons and to reduce the cognitive
load required to understand the build of the atf and kyua-* packages.
I have tested this with both MKKYUA=no/yes and non-clean/clean builds
so hopefully I got the details right. But if not, let me know please.
diffstat:
external/bsd/atf/Makefile.inc | 38 ++++++++-
external/bsd/atf/bconfig.h | 93 ++++++++++++++++++++++
external/bsd/atf/etc/Makefile.inc | 3 +
external/bsd/atf/etc/atf/Makefile | 5 +-
external/bsd/atf/lib/libatf-c++/Makefile | 12 +--
external/bsd/atf/lib/libatf-c/Makefile | 36 +-------
external/bsd/atf/lib/libatf-c/bconfig.h | 93 ----------------------
external/bsd/atf/lib/libatf-c/defs.h | 37 ++++++++
external/bsd/atf/lib/tools/Makefile | 19 +----
external/bsd/atf/libexec/Makefile.inc | 3 +
external/bsd/atf/libexec/atf-check/Makefile | 8 +-
external/bsd/atf/share/Makefile.inc | 3 +
external/bsd/atf/share/doc/Makefile.inc | 3 +
external/bsd/atf/share/doc/atf/Makefile | 5 +-
external/bsd/atf/share/examples/Makefile.inc | 3 +
external/bsd/atf/share/examples/atf/Makefile | 5 +-
external/bsd/atf/share/xml/Makefile.inc | 3 +
external/bsd/atf/share/xml/atf/Makefile | 5 +-
external/bsd/atf/share/xsl/Makefile.inc | 3 +
external/bsd/atf/share/xsl/atf/Makefile | 5 +-
external/bsd/atf/tests/Makefile.inc | 3 +
external/bsd/atf/tests/atf/Makefile | 5 +-
external/bsd/atf/tests/atf/Makefile.inc | 3 +
external/bsd/atf/tests/atf/atf-c++/Makefile | 8 +-
external/bsd/atf/tests/atf/atf-c++/Makefile.inc | 3 +
external/bsd/atf/tests/atf/atf-c++/detail/Makefile | 8 +-
external/bsd/atf/tests/atf/atf-c/Makefile | 8 +-
external/bsd/atf/tests/atf/atf-c/Makefile.inc | 3 +
external/bsd/atf/tests/atf/atf-c/detail/Makefile | 8 +-
external/bsd/atf/tests/atf/atf-sh/Makefile | 7 +-
external/bsd/atf/tests/atf/test-programs/Makefile | 8 +-
external/bsd/atf/tests/atf/tools/Makefile | 13 +--
external/bsd/atf/usr.bin/atf-config/Makefile | 9 +-
external/bsd/atf/usr.bin/atf-report/Makefile | 9 +-
external/bsd/atf/usr.bin/atf-run/Makefile | 9 +-
external/bsd/atf/usr.bin/atf-sh/Makefile | 9 +-
external/bsd/atf/usr.bin/atf-version/Makefile | 13 +-
37 files changed, 257 insertions(+), 251 deletions(-)
diffs (truncated from 914 to 300 lines):
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/Makefile.inc
--- a/external/bsd/atf/Makefile.inc Wed Feb 12 03:47:21 2014 +0000
+++ b/external/bsd/atf/Makefile.inc Wed Feb 12 04:08:31 2014 +0000
@@ -1,10 +1,42 @@
-# $NetBSD: Makefile.inc,v 1.2 2014/02/08 19:15:33 jmmv Exp $
+# $NetBSD: Makefile.inc,v 1.3 2014/02/12 04:08:31 jmmv Exp $
+
+.include <bsd.own.mk>
TOPDIR= ${NETBSDSRCDIR}/external/bsd/atf
SRCDIR= ${TOPDIR}/dist
-ATF_VERSION!= grep 'define VERSION' ${TOPDIR}/lib/libatf-c/bconfig.h \
- | cut -d '"' -f 2
+ATF_VERSION!= grep 'define VERSION' ${TOPDIR}/bconfig.h | cut -d '"' -f 2
+cookie-version: cookie-version-2
+ @cmp -s cookie-version cookie-version-2 \
+ || cp cookie-version-2 cookie-version
+cookie-version-2: .PHONY
+ @echo "${ATF_VERSION}" >cookie-version-2
+CLEANFILES+= cookie-version cookie-version-2
+
+CPPFLAGS+= -DHAVE_CONFIG_H
+
+# Not all source files need these settings, but it's just easier to
+# set them in all cases.
+CPPFLAGS+= -DATF_ARCH=\"${MACHINE_ARCH}\"
+CPPFLAGS+= -DATF_BUILD_CC=\"/usr/bin/cc\"
+CPPFLAGS+= -DATF_BUILD_CFLAGS=\"\"
+CPPFLAGS+= -DATF_BUILD_CPP=\"/usr/bin/cpp\"
+CPPFLAGS+= -DATF_BUILD_CPPFLAGS=\"\"
+CPPFLAGS+= -DATF_BUILD_CXX=\"/usr/bin/c++\"
+CPPFLAGS+= -DATF_BUILD_CXXFLAGS=\"\"
+CPPFLAGS+= -DATF_CONFDIR=\"/etc/atf\"
+CPPFLAGS+= -DATF_INCLUDEDIR=\"/usr/include\"
+CPPFLAGS+= -DATF_LIBDIR=\"/usr/lib\"
+CPPFLAGS+= -DATF_LIBEXECDIR=\"/usr/libexec\"
+CPPFLAGS+= -DATF_MACHINE=\"${MACHINE}\"
+CPPFLAGS+= -DATF_M4=\"/usr/bin/m4\"
+CPPFLAGS+= -DATF_PKGDATADIR=\"/usr/share/atf\"
+CPPFLAGS+= -DATF_SHELL=\"/bin/sh\"
+CPPFLAGS+= -DATF_WORKDIR=\"/tmp\"
+
+CPPFLAGS+= -I${TOPDIR} # For bconfig.h.
+CPPFLAGS+= -I${TOPDIR}/lib/libatf-c # For atf-c/defs.hpp.
+CPPFLAGS+= -I${SRCDIR}
.if defined(USE_ATF_LIBTOOLS)
PRIVATELIBDIR!= cd ${TOPDIR}/lib; ${PRINTOBJDIR}
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/bconfig.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/atf/bconfig.h Wed Feb 12 04:08:31 2014 +0000
@@ -0,0 +1,93 @@
+/* bconfig.h. Generated from bconfig.h.in by configure. */
+/* bconfig.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if basename takes a constant pointer */
+/* #undef HAVE_CONST_BASENAME */
+
+/* Define to 1 if dirname takes a constant pointer */
+/* #undef HAVE_CONST_DIRNAME */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if getcwd(NULL, 0) works */
+#define HAVE_GETCWD_DYN 1
+
+/* Define to 1 if getopt allows a + sign for POSIX behavior */
+/* #undef HAVE_GNU_GETOPT */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if getopt has optreset */
+#define HAVE_OPTRESET 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#define HAVE_UNSETENV 1
+
+/* Define to 1 if vsnprintf is in std */
+/* #undef HAVE_VSNPRINTF_IN_STD */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "atf"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "atf-devel%NetBSD.org@localhost"
+
+/* Define to the copyright string applicable to this package. */
+#define PACKAGE_COPYRIGHT "Copyright (c) 2007-2012 The NetBSD Foundation, Inc."
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "Automated Testing Framework"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Automated Testing Framework 0.20"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "atf"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://github.com/jmmv/atf/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.20"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "0.20"
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/etc/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/atf/etc/Makefile.inc Wed Feb 12 04:08:31 2014 +0000
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2014/02/12 04:08:31 jmmv Exp $
+
+.include "../Makefile.inc"
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/etc/atf/Makefile
--- a/external/bsd/atf/etc/atf/Makefile Wed Feb 12 03:47:21 2014 +0000
+++ b/external/bsd/atf/etc/atf/Makefile Wed Feb 12 04:08:31 2014 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2014/02/08 19:15:33 jmmv Exp $
+# $NetBSD: Makefile,v 1.5 2014/02/12 04:08:31 jmmv Exp $
-.include <bsd.own.mk>
+.include <bsd.init.mk>
-SRCDIR= ${NETBSDSRCDIR}/external/bsd/atf/dist
.PATH: ${SRCDIR}/tools/sample
CONFIGFILES= NetBSD.conf atf-run.hooks common.conf
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/lib/libatf-c++/Makefile
--- a/external/bsd/atf/lib/libatf-c++/Makefile Wed Feb 12 03:47:21 2014 +0000
+++ b/external/bsd/atf/lib/libatf-c++/Makefile Wed Feb 12 04:08:31 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2014/02/08 19:15:33 jmmv Exp $
+# $NetBSD: Makefile,v 1.22 2014/02/12 04:08:31 jmmv Exp $
NOLINT= # defined
@@ -10,16 +10,10 @@
LIBDPLIBS+= atf-c ${.CURDIR}/../libatf-c
LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm
-
.PATH: ${SRCDIR}
.PATH: ${SRCDIR}/atf-c++
.PATH: ${SRCDIR}/atf-c++/detail
-.PATH: ${TOPDIR}/lib/libatf-c # For bconfig.h
-
-CPPFLAGS+= -I${.CURDIR}/../libatf-c
-CPPFLAGS+= -I.
-
-CPPFLAGS+= -DHAVE_CONFIG_H
+.PATH: ${TOPDIR}
WARNS?= 2
@@ -53,7 +47,7 @@
FILESDIR= /usr/lib/pkgconfig
realall: atf-c++.pc
-atf-c++.pc: Makefile atf-c++.pc.in bconfig.h
+atf-c++.pc: Makefile atf-c++.pc.in cookie-version
${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
-e 's,__CXX__,g++,g' \
-e 's,__INCLUDEDIR__,/usr/include,g' \
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/lib/libatf-c/Makefile
--- a/external/bsd/atf/lib/libatf-c/Makefile Wed Feb 12 03:47:21 2014 +0000
+++ b/external/bsd/atf/lib/libatf-c/Makefile Wed Feb 12 04:08:31 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2014/02/08 19:15:33 jmmv Exp $
+# $NetBSD: Makefile,v 1.19 2014/02/12 04:08:31 jmmv Exp $
NOLINT= # defined
@@ -12,27 +12,7 @@
.PATH: ${SRCDIR}
.PATH: ${SRCDIR}/atf-c
.PATH: ${SRCDIR}/atf-c/detail
-
-CPPFLAGS+= -I${.CURDIR}
-CPPFLAGS+= -I.
-
-CPPFLAGS+= -DHAVE_CONFIG_H
-CPPFLAGS+= -DATF_ARCH=\"${MACHINE_ARCH}\"
-CPPFLAGS+= -DATF_BUILD_CC=\"/usr/bin/cc\"
-CPPFLAGS+= -DATF_BUILD_CFLAGS=\"\"
-CPPFLAGS+= -DATF_BUILD_CPP=\"/usr/bin/cpp\"
-CPPFLAGS+= -DATF_BUILD_CPPFLAGS=\"\"
-CPPFLAGS+= -DATF_BUILD_CXX=\"/usr/bin/c++\"
-CPPFLAGS+= -DATF_BUILD_CXXFLAGS=\"\"
-CPPFLAGS+= -DATF_CONFDIR=\"/etc/atf\"
-CPPFLAGS+= -DATF_INCLUDEDIR=\"/usr/include\"
-CPPFLAGS+= -DATF_LIBDIR=\"/usr/lib\"
-CPPFLAGS+= -DATF_LIBEXECDIR=\"/usr/libexec\"
-CPPFLAGS+= -DATF_MACHINE=\"${MACHINE}\"
-CPPFLAGS+= -DATF_M4=\"/usr/bin/m4\"
-CPPFLAGS+= -DATF_PKGDATADIR=\"/usr/share/atf\"
-CPPFLAGS+= -DATF_SHELL=\"/bin/sh\"
-CPPFLAGS+= -DATF_WORKDIR=\"/tmp\"
+.PATH: ${TOPDIR}
config.o: Makefile
@@ -73,22 +53,12 @@
MAN= atf-c-api.3
-CLEANFILES+= defs.h
-
-defs.h: defs.h.in
- ${TOOL_SED} \
- -e 's|@ATTRIBUTE_FORMAT_PRINTF@|__attribute__((__format__(__printf__, a, b)))|g' \
- -e 's|@ATTRIBUTE_NORETURN@|__attribute__((__noreturn__))|g' \
- -e 's|@ATTRIBUTE_UNUSED@|__attribute__((__unused__))|g' \
- < ${.ALLSRC} > ${.TARGET}.tmp
- mv ${.TARGET}.tmp ${.TARGET}
-
.if ${MKSHARE} != "no"
FILES+= atf-c.pc
FILESDIR= /usr/lib/pkgconfig
realall: atf-c.pc
-atf-c.pc: Makefile atf-c.pc.in bconfig.h
+atf-c.pc: Makefile atf-c.pc.in cookie-version
${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
-e 's,__CC__,gcc,g' \
-e 's,__INCLUDEDIR__,/usr/include,g' \
diff -r 0766a47ce2ca -r e4ff5d3759a7 external/bsd/atf/lib/libatf-c/bconfig.h
--- a/external/bsd/atf/lib/libatf-c/bconfig.h Wed Feb 12 03:47:21 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/* bconfig.h. Generated from bconfig.h.in by configure. */
-/* bconfig.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if basename takes a constant pointer */
-/* #undef HAVE_CONST_BASENAME */
-
-/* Define to 1 if dirname takes a constant pointer */
-/* #undef HAVE_CONST_DIRNAME */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if getcwd(NULL, 0) works */
-#define HAVE_GETCWD_DYN 1
-
-/* Define to 1 if getopt allows a + sign for POSIX behavior */
-/* #undef HAVE_GNU_GETOPT */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if getopt has optreset */
-#define HAVE_OPTRESET 1
-
-/* Define to 1 if you have the `putenv' function. */
-#define HAVE_PUTENV 1
-
-/* Define to 1 if you have the `setenv' function. */
Home |
Main Index |
Thread Index |
Old Index