Module Name:    src
Committed By:   jmmv
Date:           Thu Mar 14 07:10:07 UTC 2013

Modified Files:
        src/external/bsd/atf/lib/libatf-c: Makefile
        src/external/bsd/atf/lib/libatf-c++: Makefile
        src/external/bsd/atf/usr.bin/atf-sh: Makefile
Added Files:
        src/external/bsd/atf: Makefile.inc
        src/external/bsd/atf/lib: Makefile.inc
        src/external/bsd/atf/usr.bin: Makefile.inc

Log Message:
Deduce the version number to encode in pkgconfig files by getting it from
bconfig.h.  Also make the build of these files depends on bconfig.h itself.

This should fix once and for all the problems of the
atf/atf-{c,c++}/pkg_config_test:version tests breaking because the
pkgconfig files hold an old version number during update builds.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/atf/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/bsd/atf/lib/Makefile.inc
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/atf/lib/libatf-c/Makefile
cvs rdiff -u -r1.18 -r1.19 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r0 -r1.1 src/external/bsd/atf/usr.bin/Makefile.inc
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/atf/usr.bin/atf-sh/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/atf/lib/libatf-c/Makefile
diff -u src/external/bsd/atf/lib/libatf-c/Makefile:1.16 src/external/bsd/atf/lib/libatf-c/Makefile:1.17
--- src/external/bsd/atf/lib/libatf-c/Makefile:1.16	Tue Feb 19 15:35:42 2013
+++ src/external/bsd/atf/lib/libatf-c/Makefile	Thu Mar 14 07:10:06 2013
@@ -1,14 +1,13 @@
-# $NetBSD: Makefile,v 1.16 2013/02/19 15:35:42 jmmv Exp $
+# $NetBSD: Makefile,v 1.17 2013/03/14 07:10:06 jmmv Exp $
 
 NOLINT=		# defined
 
-.include <bsd.own.mk>
+.include <bsd.init.mk>
 
 LIB=		atf-c
 
 CWARNFLAGS+=	-Wno-missing-noreturn
 
-SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}
 .PATH:		${SRCDIR}/atf-c
 .PATH:		${SRCDIR}/atf-c/detail
@@ -88,8 +87,8 @@ FILES+=		atf-c.pc
 FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c.pc
-atf-c.pc: Makefile atf-c.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.17,g' \
+atf-c.pc: Makefile atf-c.pc.in bconfig.h
+	${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
 	    -e 's,__CC__,gcc,g' \
 	    -e 's,__INCLUDEDIR__,/usr/include,g' \
 	    -e 's,__LIBDIR__,/usr/lib,g' \

Index: src/external/bsd/atf/lib/libatf-c++/Makefile
diff -u src/external/bsd/atf/lib/libatf-c++/Makefile:1.18 src/external/bsd/atf/lib/libatf-c++/Makefile:1.19
--- src/external/bsd/atf/lib/libatf-c++/Makefile:1.18	Tue Feb 19 15:35:43 2013
+++ src/external/bsd/atf/lib/libatf-c++/Makefile	Thu Mar 14 07:10:06 2013
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.18 2013/02/19 15:35:43 jmmv Exp $
+# $NetBSD: Makefile,v 1.19 2013/03/14 07:10:06 jmmv Exp $
 
 NOLINT=		# defined
 
-.include <bsd.own.mk>
+.include <bsd.init.mk>
 
 LIB=		atf-c++
 LIBISCXX=	yes
@@ -16,10 +16,10 @@ LIBDPLIBS+=     stdc++	${.CURDIR}/../../
 LIBDPLIBS+=     m	${.CURDIR}/../../../../../lib/libm
 
 
-SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .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.
@@ -62,8 +62,8 @@ FILES+=		atf-c++.pc
 FILESDIR=	/usr/lib/pkgconfig
 
 realall: atf-c++.pc
-atf-c++.pc: Makefile atf-c++.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.17,g' \
+atf-c++.pc: Makefile atf-c++.pc.in bconfig.h
+	${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
 	    -e 's,__CXX__,g++,g' \
 	    -e 's,__INCLUDEDIR__,/usr/include,g' \
 	    -e 's,__LIBDIR__,/usr/lib,g' \

Index: src/external/bsd/atf/usr.bin/atf-sh/Makefile
diff -u src/external/bsd/atf/usr.bin/atf-sh/Makefile:1.8 src/external/bsd/atf/usr.bin/atf-sh/Makefile:1.9
--- src/external/bsd/atf/usr.bin/atf-sh/Makefile:1.8	Tue Feb 19 15:35:43 2013
+++ src/external/bsd/atf/usr.bin/atf-sh/Makefile	Thu Mar 14 07:10:07 2013
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.8 2013/02/19 15:35:43 jmmv Exp $
+# $NetBSD: Makefile,v 1.9 2013/03/14 07:10:07 jmmv Exp $
 
-.include <bsd.own.mk>
+.include <bsd.init.mk>
 
-SRCDIR=		${NETBSDSRCDIR}/external/bsd/atf/dist
 .PATH:		${SRCDIR}/atf-sh
+.PATH:		${TOPDIR}/lib/libatf-c  # For bconfig.h.
 
 BINDIR=		/usr/bin
 PROG_CXX=	atf-sh
@@ -28,8 +28,8 @@ FILES+=			atf-sh.pc
 FILESDIR_atf-sh.pc=	/usr/lib/pkgconfig
 
 realall: atf-sh.pc
-atf-sh.pc: Makefile atf-sh.pc.in
-	${TOOL_SED} -e 's,__ATF_VERSION__,0.17,g' \
+atf-sh.pc: Makefile atf-sh.pc.in bconfig.h
+	${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
 	    -e 's,__EXEC_PREFIX__,/usr,g' \
 	    <${SRCDIR}/atf-sh/atf-sh.pc.in >atf-sh.pc
 CLEANFILES+=	atf-sh.pc

Added files:

Index: src/external/bsd/atf/Makefile.inc
diff -u /dev/null src/external/bsd/atf/Makefile.inc:1.1
--- /dev/null	Thu Mar 14 07:10:07 2013
+++ src/external/bsd/atf/Makefile.inc	Thu Mar 14 07:10:05 2013
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/03/14 07:10:05 jmmv Exp $
+
+TOPDIR=		${NETBSDSRCDIR}/external/bsd/atf
+SRCDIR=		${TOPDIR}/dist
+
+ATF_VERSION!=	grep 'define VERSION' ${TOPDIR}/lib/libatf-c/bconfig.h \
+		| cut -d '"' -f 2

Index: src/external/bsd/atf/lib/Makefile.inc
diff -u /dev/null src/external/bsd/atf/lib/Makefile.inc:1.1
--- /dev/null	Thu Mar 14 07:10:07 2013
+++ src/external/bsd/atf/lib/Makefile.inc	Thu Mar 14 07:10:06 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/03/14 07:10:06 jmmv Exp $
+
+.include "../Makefile.inc"

Index: src/external/bsd/atf/usr.bin/Makefile.inc
diff -u /dev/null src/external/bsd/atf/usr.bin/Makefile.inc:1.1
--- /dev/null	Thu Mar 14 07:10:07 2013
+++ src/external/bsd/atf/usr.bin/Makefile.inc	Thu Mar 14 07:10:06 2013
@@ -0,0 +1,3 @@
+# $NetBSD: Makefile.inc,v 1.1 2013/03/14 07:10:06 jmmv Exp $
+
+.include "../Makefile.inc"

Reply via email to