Module Name: src
Committed By: jmmv
Date: Sat Feb 15 04:19:46 UTC 2014
Modified Files:
src/external/bsd/atf: Makefile.inc
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
src/external/bsd/atf/usr.bin/atf-version: Makefile
Log Message:
Fix the bundling of the version number in built files.
Yes, attempting yet another fix at this so that the version number that
gets recorded in the pkgconfig files and inside atf-version really matches
the latest imported version. Should resolve issues where the built files
get stuck with an older version number during update builds.
This time, I'm trying the same approach I applied in the FreeBSD source
tree, which has been working fine so far across various release imports.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/Makefile.inc
cvs rdiff -u -r1.19 -r1.20 src/external/bsd/atf/lib/libatf-c/Makefile
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/atf/lib/libatf-c++/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/atf/usr.bin/atf-sh/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/atf/usr.bin/atf-version/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/Makefile.inc
diff -u src/external/bsd/atf/Makefile.inc:1.4 src/external/bsd/atf/Makefile.inc:1.5
--- src/external/bsd/atf/Makefile.inc:1.4 Sat Feb 15 02:02:39 2014
+++ src/external/bsd/atf/Makefile.inc Sat Feb 15 04:19:46 2014
@@ -1,17 +1,20 @@
-# $NetBSD: Makefile.inc,v 1.4 2014/02/15 02:02:39 jmmv Exp $
+# $NetBSD: Makefile.inc,v 1.5 2014/02/15 04:19:46 jmmv Exp $
.include <bsd.own.mk>
TOPDIR= ${NETBSDSRCDIR}/external/bsd/atf
SRCDIR= ${TOPDIR}/dist
-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
+# Depend on the atf-version.txt target to generate a file that contains
+# the version number of the currently imported ATF release and that only
+# changes on new imports.
+atf-version.txt: atf-version-real.txt
+ @cmp -s atf-version.txt atf-version-real.txt \
+ || cp atf-version-real.txt atf-version.txt
+atf-version-real.txt: .PHONY
+ @grep 'define VERSION' ${TOPDIR}/bconfig.h \
+ | cut -d '"' -f 2 >atf-version-real.txt
+CLEANFILES+= atf-version.txt atf-version-real.txt
CPPFLAGS+= -DHAVE_CONFIG_H
Index: src/external/bsd/atf/lib/libatf-c/Makefile
diff -u src/external/bsd/atf/lib/libatf-c/Makefile:1.19 src/external/bsd/atf/lib/libatf-c/Makefile:1.20
--- src/external/bsd/atf/lib/libatf-c/Makefile:1.19 Wed Feb 12 04:08:31 2014
+++ src/external/bsd/atf/lib/libatf-c/Makefile Sat Feb 15 04:19:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2014/02/12 04:08:31 jmmv Exp $
+# $NetBSD: Makefile,v 1.20 2014/02/15 04:19:46 jmmv Exp $
NOLINT= # defined
@@ -58,8 +58,8 @@ FILES+= atf-c.pc
FILESDIR= /usr/lib/pkgconfig
realall: atf-c.pc
-atf-c.pc: Makefile atf-c.pc.in cookie-version
- ${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
+atf-c.pc: Makefile atf-c.pc.in atf-version.txt
+ ${TOOL_SED} -e 's,__ATF_VERSION__,$$(cat atf-version.txt),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.22 src/external/bsd/atf/lib/libatf-c++/Makefile:1.23
--- src/external/bsd/atf/lib/libatf-c++/Makefile:1.22 Wed Feb 12 04:08:31 2014
+++ src/external/bsd/atf/lib/libatf-c++/Makefile Sat Feb 15 04:19:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2014/02/12 04:08:31 jmmv Exp $
+# $NetBSD: Makefile,v 1.23 2014/02/15 04:19:46 jmmv Exp $
NOLINT= # defined
@@ -47,8 +47,8 @@ FILES+= atf-c++.pc
FILESDIR= /usr/lib/pkgconfig
realall: atf-c++.pc
-atf-c++.pc: Makefile atf-c++.pc.in cookie-version
- ${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
+atf-c++.pc: Makefile atf-c++.pc.in atf-version.txt
+ ${TOOL_SED} -e 's,__ATF_VERSION__,$$(cat atf-version.txt),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.10 src/external/bsd/atf/usr.bin/atf-sh/Makefile:1.11
--- src/external/bsd/atf/usr.bin/atf-sh/Makefile:1.10 Wed Feb 12 04:08:32 2014
+++ src/external/bsd/atf/usr.bin/atf-sh/Makefile Sat Feb 15 04:19:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2014/02/12 04:08:32 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2014/02/15 04:19:46 jmmv Exp $
.include <bsd.init.mk>
@@ -25,8 +25,8 @@ FILES+= atf-sh.pc
FILESDIR_atf-sh.pc= /usr/lib/pkgconfig
realall: atf-sh.pc
-atf-sh.pc: Makefile atf-sh.pc.in cookie-version
- ${TOOL_SED} -e 's,__ATF_VERSION__,${ATF_VERSION},g' \
+atf-sh.pc: Makefile atf-sh.pc.in atf-version.txt
+ ${TOOL_SED} -e 's,__ATF_VERSION__,$$(cat atf-version.txt),g' \
-e 's,__EXEC_PREFIX__,/usr,g' \
<${SRCDIR}/atf-sh/atf-sh.pc.in >atf-sh.pc
CLEANFILES+= atf-sh.pc
Index: src/external/bsd/atf/usr.bin/atf-version/Makefile
diff -u src/external/bsd/atf/usr.bin/atf-version/Makefile:1.11 src/external/bsd/atf/usr.bin/atf-version/Makefile:1.12
--- src/external/bsd/atf/usr.bin/atf-version/Makefile:1.11 Wed Feb 12 04:08:32 2014
+++ src/external/bsd/atf/usr.bin/atf-version/Makefile Sat Feb 15 04:19:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2014/02/12 04:08:32 jmmv Exp $
+# $NetBSD: Makefile,v 1.12 2014/02/15 04:19:46 jmmv Exp $
USE_ATF_LIBTOOLS= yes
@@ -16,6 +16,6 @@ CPPFLAGS+= -I${SRCDIR}/tools
WARNS?= 2
CPPFLAGS+= -DATF_VERSION=\"$(ATF_VERSION)\"
-atf-version.o: cookie-version
+atf-version.o: atf-version.txt
.include <bsd.prog.mk>