2009-03-17 15:45:19 +01:00
|
|
|
# $NetBSD: fam.buildlink3.mk,v 1.7 2009/03/17 14:45:19 jmcneill Exp $
|
2005-08-10 23:10:54 +02:00
|
|
|
#
|
|
|
|
# This Makefile fragment is meant to be included by packages that
|
|
|
|
# require a FAM implementation. fam.buildlink3.mk will:
|
|
|
|
#
|
|
|
|
# * set FAMBASE to the base directory of the FAM files;
|
|
|
|
# * set FAM_TYPE to the FAM implementation used.
|
|
|
|
#
|
2009-03-15 22:47:44 +01:00
|
|
|
# There are three variables that can be used to tweak the selection of
|
2005-08-10 23:10:54 +02:00
|
|
|
# the FAM implementation:
|
|
|
|
#
|
|
|
|
# FAM_DEFAULT is a user-settable variable whose value is the default
|
|
|
|
# FAM implementation to use.
|
|
|
|
#
|
|
|
|
# FAM_ACCEPTED is a package-settable list of FAM implementations that
|
|
|
|
# may be used by the package.
|
2009-03-15 22:47:44 +01:00
|
|
|
#
|
|
|
|
# FAM_SERVER is a package-settable flag whose value determines whether
|
|
|
|
# or not the server and library are both required.
|
2005-08-10 23:10:54 +02:00
|
|
|
|
2005-08-12 17:33:15 +02:00
|
|
|
MK_FAM_BUILDLINK3_MK:= ${MK_FAM_BUILDLINK3_MK}+
|
2005-08-10 23:10:54 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2005-08-12 17:33:15 +02:00
|
|
|
.if !empty(MK_FAM_BUILDLINK3_MK:M+)
|
2009-03-17 15:45:19 +01:00
|
|
|
FAM_DEFAULT?= fam
|
2005-08-10 23:10:54 +02:00
|
|
|
FAM_ACCEPTED?= ${_FAM_PKGS}
|
|
|
|
|
|
|
|
# This is an exhaustive list of all of the FAM implementations that may
|
|
|
|
# be used with fam.buildlink3.mk, in order of precedence.
|
|
|
|
#
|
2005-09-03 23:34:19 +02:00
|
|
|
_FAM_PKGS?= fam gamin
|
2005-08-10 23:10:54 +02:00
|
|
|
|
|
|
|
_FAM_DEFAULT= ${FAM_DEFAULT}
|
|
|
|
_FAM_ACCEPTED= ${FAM_ACCEPTED}
|
|
|
|
|
|
|
|
_FAM_TYPE?= ${_FAM_DEFAULT}
|
|
|
|
|
|
|
|
. if !empty(_FAM_ACCEPTED:M${_FAM_TYPE})
|
|
|
|
FAM_TYPE= ${_FAM_TYPE}
|
|
|
|
. else
|
|
|
|
FAM_TYPE= none
|
|
|
|
. endif
|
|
|
|
FAMBASE= ${BUILDLINK_PREFIX.${FAM_TYPE}}
|
|
|
|
|
2006-11-04 23:18:41 +01:00
|
|
|
BUILD_DEFS+= FAM_DEFAULT
|
|
|
|
BUILD_DEFS_EFFECTS+= FAMBASE FAM_TYPE
|
2005-08-12 17:33:15 +02:00
|
|
|
.endif # MK_FAM_BUILDLINK3_MK
|
2005-08-10 23:10:54 +02:00
|
|
|
|
2009-03-15 22:47:44 +01:00
|
|
|
FAM_SERVER?= yes
|
|
|
|
|
2005-08-10 23:10:54 +02:00
|
|
|
.if ${FAM_TYPE} == "none"
|
|
|
|
PKG_FAIL_REASON= \
|
|
|
|
"${_FAM_TYPE} is not an acceptable FAM type for ${PKGNAME}."
|
|
|
|
.elif ${FAM_TYPE} == "fam"
|
|
|
|
. include "../../sysutils/fam/buildlink3.mk"
|
|
|
|
.elif ${FAM_TYPE} == "gamin"
|
2009-03-15 22:47:44 +01:00
|
|
|
. include "../../sysutils/libgamin/buildlink3.mk"
|
|
|
|
. if !empty(FAM_SERVER:M[Yy][Ee][Ss])
|
|
|
|
DEPENDS+= gamin>=0.1.10nb1:../../sysutils/gamin
|
|
|
|
. endif
|
2005-08-10 23:10:54 +02:00
|
|
|
.endif
|