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
This commit is contained in:
parent
f6e989a6e2
commit
e1380b00f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260576
19
lib/atf/common.mk
Normal file
19
lib/atf/common.mk
Normal file
@ -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
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user