3911155e2f
since according to the comment in check/bsd.check.mk, they belong there. Added a new check for all C and C++ header files to make sure they don't contain strings like ${prefix} or ${exec_prefix}, which is currently a problem with sysutils/dbus and has been noticed in PR 35019. This check is disabled by default since I don't know anything about possible false positives, but I plan to enable it for PKG_DEVELOPERs after some testing. Added two names for hooks that are placed in the configure and in the build phase. Now the checks look more like becoming something one could call a framework, sharing a common structure and a documented interface.
37 lines
950 B
Makefile
37 lines
950 B
Makefile
# $NetBSD: check-headers.mk,v 1.1 2006/11/09 02:53:15 rillig Exp $
|
|
#
|
|
# This file checks the C and C++ header files for possible problems.
|
|
#
|
|
# User-settable variables:
|
|
#
|
|
# CHECK_HEADERS
|
|
# Whether the header files should be checked.
|
|
#
|
|
# Default value: "yes" for PKG_DEVELOPERs, "no" otherwise.
|
|
#
|
|
# Package-settable-variables:
|
|
#
|
|
# CHECK_HEADERS_SKIP:
|
|
# A list of filename patterns that should be skipped for this test.
|
|
#
|
|
|
|
.if defined(PKG_DEVELOPER)
|
|
# still experimental
|
|
#CHECK_HEADERS?= yes
|
|
.endif
|
|
CHECK_HEADERS?= no
|
|
CHECK_HEADERS_SKIP?= # none
|
|
|
|
.if !empty(CHECK_HEADERS:M[Yy][Ee][Ss])
|
|
pre-build-checks-hook: _check-headers
|
|
.endif
|
|
|
|
.PHONY: _check-headers
|
|
_check-headers:
|
|
@${STEP_MSG} "Checking for possible problems in header files"
|
|
${RUN} \
|
|
[ -d ${WRKSRC}/. ] || exit 0; \
|
|
cd ${WRKSRC}; \
|
|
env PKGSRCDIR=${PKGSRCDIR:Q} \
|
|
SKIP_FILTER=${CHECK_HEADERS_SKIP:@p@${p}) continue;;@:Q} \
|
|
sh ${PKGSRCDIR}/mk/check/check-headers.sh
|