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.
This commit is contained in:
parent
70bbcb4b33
commit
752fe084c0
|
@ -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
|
||||
|
||||
|
|
|
@ -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' \
|
||||
|
|
|
@ -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' \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue