diff --git a/external/bsd/atf/Makefile.inc b/external/bsd/atf/Makefile.inc index 547c585a8d3a..cf7d90856280 100644 --- a/external/bsd/atf/Makefile.inc +++ b/external/bsd/atf/Makefile.inc @@ -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 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 diff --git a/external/bsd/atf/lib/libatf-c++/Makefile b/external/bsd/atf/lib/libatf-c++/Makefile index 14543077803a..14f7122ba758 100644 --- a/external/bsd/atf/lib/libatf-c++/Makefile +++ b/external/bsd/atf/lib/libatf-c++/Makefile @@ -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' \ diff --git a/external/bsd/atf/lib/libatf-c/Makefile b/external/bsd/atf/lib/libatf-c/Makefile index 7dbb4c4da857..62186c1b4237 100644 --- a/external/bsd/atf/lib/libatf-c/Makefile +++ b/external/bsd/atf/lib/libatf-c/Makefile @@ -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' \ diff --git a/external/bsd/atf/usr.bin/atf-sh/Makefile b/external/bsd/atf/usr.bin/atf-sh/Makefile index 465c45efa320..60fda5261ec0 100644 --- a/external/bsd/atf/usr.bin/atf-sh/Makefile +++ b/external/bsd/atf/usr.bin/atf-sh/Makefile @@ -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 @@ -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 diff --git a/external/bsd/atf/usr.bin/atf-version/Makefile b/external/bsd/atf/usr.bin/atf-version/Makefile index 6602e749cc5e..33aaffa55151 100644 --- a/external/bsd/atf/usr.bin/atf-version/Makefile +++ b/external/bsd/atf/usr.bin/atf-version/Makefile @@ -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