svn commit: r260576 - in head: lib/atf lib/atf/libatf-c lib/atf/libatf-c++ usr.bin/atf/atf-sh
Julio Merino
jmmv at FreeBSD.org
Sun Jan 12 21:56:27 UTC 2014
Author: jmmv
Date: Sun Jan 12 21:56:26 2014
New Revision: 260576
URL: http://svnweb.freebsd.org/changeset/base/260576
Log:
Generate and install pkg-config files for atf.
These files are required to get packages in ports to build against atf and
also to get a couple of currently-failing tests to pass.
I'm following the approach already used by the libusb pkg-config files
installed by the system regarding the location and the install rules.
MFC after: 5 days
Added:
head/lib/atf/common.mk (contents, props changed)
Modified:
head/lib/atf/libatf-c++/Makefile
head/lib/atf/libatf-c/Makefile
head/usr.bin/atf/atf-sh/Makefile
Added: head/lib/atf/common.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lib/atf/common.mk Sun Jan 12 21:56:26 2014 (r260576)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+#
+# Common Makefile code for all components of ATF.
+#
+
+.if !defined(ATF)
+.error "ATF must be defined and point to the contrib/atf directory"
+.endif
+
+# Depend on the atf-version 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: atf-version-real
+ @cmp -s atf-version atf-version-real \
+ || cp atf-version-real atf-version
+atf-version-real: .PHONY
+ @grep 'define VERSION' ${ATF}/bconfig.h \
+ | cut -d '"' -f 2 >atf-version-real
+CLEANFILES+= atf-version atf-version-real
Modified: head/lib/atf/libatf-c++/Makefile
==============================================================================
--- head/lib/atf/libatf-c++/Makefile Sun Jan 12 21:21:19 2014 (r260575)
+++ head/lib/atf/libatf-c++/Makefile Sun Jan 12 21:56:26 2014 (r260576)
@@ -76,8 +76,21 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR}
MAN= atf-c++-api.3
+all: atf-c++.pc
+atf-c++.pc: atf-c++.pc.in atf-version
+ sed -e 's,__CXX__,${CXX},g' \
+ -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \
+ -e 's,__LIBDIR__,${LIBDIR},g' \
+ -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
+ <${ATF}/atf-c++/atf-c++.pc.in >atf-c++.pc
+
+beforeinstall:
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
+
.if ${MK_TESTS} != "no"
SUBDIR= tests
.endif
+.include "../common.mk"
.include <bsd.lib.mk>
Modified: head/lib/atf/libatf-c/Makefile
==============================================================================
--- head/lib/atf/libatf-c/Makefile Sun Jan 12 21:21:19 2014 (r260575)
+++ head/lib/atf/libatf-c/Makefile Sun Jan 12 21:56:26 2014 (r260576)
@@ -74,8 +74,21 @@ INCSDIR_atf-c.h= ${INCLUDEDIR}
MAN= atf-c-api.3
+all: atf-c.pc
+atf-c.pc: atf-c.pc.in atf-version
+ sed -e 's,__CC__,${CC},g' \
+ -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \
+ -e 's,__LIBDIR__,${LIBDIR},g' \
+ -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
+ <${ATF}/atf-c/atf-c.pc.in >atf-c.pc
+
+beforeinstall:
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
+
.if ${MK_TESTS} != "no"
SUBDIR= tests
.endif
+.include "../common.mk"
.include <bsd.lib.mk>
Modified: head/usr.bin/atf/atf-sh/Makefile
==============================================================================
--- head/usr.bin/atf/atf-sh/Makefile Sun Jan 12 21:21:19 2014 (r260575)
+++ head/usr.bin/atf/atf-sh/Makefile Sun Jan 12 21:56:26 2014 (r260576)
@@ -45,8 +45,19 @@ FILESGROUPS= SUBR
SUBRDIR= ${SHAREDIR}/atf
SUBR= libatf-sh.subr
+all: atf-sh.pc
+atf-sh.pc: atf-sh.pc.in atf-version
+ sed -e 's,__EXEC_PREFIX__,/usr,g' \
+ -e "s,__ATF_VERSION__,$$(cat atf-version),g" \
+ <${ATF}/atf-sh/atf-sh.pc.in >atf-sh.pc
+
+beforeinstall:
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
+
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
+.include "../../../lib/atf/common.mk"
.include <bsd.prog.mk>
More information about the svn-src-head
mailing list