1 # $NetBSD: check-portability.mk,v 1.5 2008/02/20 10:27:35 rillig Exp $
3 # This file contains some checks that are applied to the configure
4 # scripts to check for certain constructs that are known to cause
5 # problems on some platforms.
7 # The following variables may be set by the pkgsrc user in mk.conf:
10 # Whether to enable some portability checks for the configure
11 # scripts before they are run.
13 # Default value: yes for PKG_DEVELOPERs, no otherwise.
15 # The following variables may be set by the package:
17 # SKIP_PORTABILITY_CHECK
18 # Whether the above checks should be skipped for the current
22 # Deprecated: Use CHECK_PORTABILITY_SKIP instead.
23 # Obsolete since 2008-02-20.
25 # CHECK_PORTABILITY_SKIP
26 # The list of files that should be skipped in the portability
29 # Default value: empty.
32 _VARGROUPS+= check-portability
33 _USER_VARS.check-portability= CHECK_PORTABILITY
34 _PKG_VARS.check-portability= CHECK_PORTABILITY_SKIP
36 .if defined(PKG_DEVELOPER)
37 CHECK_PORTABILITY?= yes
39 CHECK_PORTABILITY?= no
40 .if defined(SKIP_PORTABILITY_CHECK)
41 PKG_FAIL_REASON+= "[check-portability.mk] SKIP_PORTABILITY_CHECK is obsolete."
43 CHECK_PORTABILITY_SKIP?= # none
45 .if ${CHECK_PORTABILITY:M[Yy][Ee][Ss]} != ""
46 pre-configure-checks-hook: _check-portability
48 .PHONY: _check-portability
50 @${STEP_MSG} "Checking for portability problems in extracted files"
52 [ -d ${WRKSRC}/. ] || exit 0; \
54 env SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \
55 sh ${PKGSRCDIR}/mk/check/check-portability.sh