1 # $NetBSD: fam.buildlink3.mk,v 1.3 2005/08/29 23:16:33 jlam 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 two 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 MK_FAM_BUILDLINK3_MK:= ${MK_FAM_BUILDLINK3_MK}+
20 .include "../../mk/bsd.prefs.mk"
22 .if !empty(MK_FAM_BUILDLINK3_MK:M+)
24 FAM_ACCEPTED?= ${_FAM_PKGS}
26 # This is an exhaustive list of all of the FAM implementations that may
27 # be used with fam.buildlink3.mk, in order of precedence.
31 _FAM_DEFAULT= ${FAM_DEFAULT}
32 _FAM_ACCEPTED= ${FAM_ACCEPTED}
34 _FAM_TYPE?= ${_FAM_DEFAULT}
36 . if !empty(_FAM_ACCEPTED:M${_FAM_TYPE})
37 FAM_TYPE= ${_FAM_TYPE}
41 FAMBASE= ${BUILDLINK_PREFIX.${FAM_TYPE}}
45 .endif # MK_FAM_BUILDLINK3_MK
47 .if ${FAM_TYPE} == "none"
49 "${_FAM_TYPE} is not an acceptable FAM type for ${PKGNAME}."
50 .elif ${FAM_TYPE} == "fam"
51 . include "../../sysutils/fam/buildlink3.mk"
52 .elif ${FAM_TYPE} == "gamin"
53 . include "../../sysutils/gamin/buildlink3.mk"