1 # $NetBSD: fam.buildlink3.mk,v 1.6 2009/03/15 21:47:44 jmcneill Exp $
3 # This Makefile fragment is meant to be included by packages that
4 # require a FAM implementation. fam.buildlink3.mk will:
6 # * set FAMBASE to the base directory of the FAM files;
7 # * set FAM_TYPE to the FAM implementation used.
9 # There are three variables that can be used to tweak the selection of
10 # the FAM implementation:
12 # FAM_DEFAULT is a user-settable variable whose value is the default
13 # FAM implementation to use.
15 # FAM_ACCEPTED is a package-settable list of FAM implementations that
16 # may be used by the package.
18 # FAM_SERVER is a package-settable flag whose value determines whether
19 # or not the server and library are both required.
21 MK_FAM_BUILDLINK3_MK
:= ${MK_FAM_BUILDLINK3_MK}+
23 .
include "../../mk/bsd.prefs.mk"
25 .if
!empty
(MK_FAM_BUILDLINK3_MK
:M
+)
27 FAM_ACCEPTED?
= ${_FAM_PKGS}
29 # This is an exhaustive list of all of the FAM implementations that may
30 # be used with fam.buildlink3.mk, in order of precedence.
34 _FAM_DEFAULT
= ${FAM_DEFAULT}
35 _FAM_ACCEPTED
= ${FAM_ACCEPTED}
37 _FAM_TYPE?
= ${_FAM_DEFAULT}
39 . if
!empty
(_FAM_ACCEPTED
:M
${_FAM_TYPE})
40 FAM_TYPE
= ${_FAM_TYPE}
44 FAMBASE
= ${BUILDLINK_PREFIX.
${FAM_TYPE}}
46 BUILD_DEFS
+= FAM_DEFAULT
47 BUILD_DEFS_EFFECTS
+= FAMBASE FAM_TYPE
48 .
endif # MK_FAM_BUILDLINK3_MK
52 .if
${FAM_TYPE} == "none"
54 "${_FAM_TYPE} is not an acceptable FAM type for ${PKGNAME}."
55 .elif
${FAM_TYPE} == "fam"
56 .
include "../../sysutils/fam/buildlink3.mk"
57 .elif
${FAM_TYPE} == "gamin"
58 .
include "../../sysutils/libgamin/buildlink3.mk"
59 . if
!empty
(FAM_SERVER
:M
[Yy
][Ee
][Ss
])
60 DEPENDS
+= gamin
>=0.1.10nb1
:..
/..
/sysutils
/gamin