diff options
author | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-03-10 17:57:14 +0000 |
commit | d68193d4743931877544a7e52ed44171707b858d (patch) | |
tree | 1226d07b8f66083168895189decc88848b70903f /devel/libgetopt/builtin.mk | |
parent | 55bd3391bd2b274e284613fb1e70cd0190dd4ed8 (diff) | |
download | pkgsrc-d68193d4743931877544a7e52ed44171707b858d.tar.gz |
Split out the code that deals with checking whether the software is
built-in or not into a separate builtin.mk file. The code to deal
checking for built-in software is much simpler to deal with in pkgsrc.
The buildlink3.mk file for a package will be of the usual format
regardless of the package, which makes it simpler for packagers to
update a package.
The builtin.mk file for a package must define a single yes/no variable
USE_BUILTIN.<pkg> that is used by bsd.buildlink3.mk to decide whether
to use the built-in software or to use the pkgsrc software.
Diffstat (limited to 'devel/libgetopt/builtin.mk')
-rw-r--r-- | devel/libgetopt/builtin.mk | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devel/libgetopt/builtin.mk b/devel/libgetopt/builtin.mk new file mode 100644 index 00000000000..74615cdb8be --- /dev/null +++ b/devel/libgetopt/builtin.mk @@ -0,0 +1,26 @@ +# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $ + +.if !defined(IS_BUILTIN.getopt) +IS_BUILTIN.getopt= no +. if exists(/usr/include/getopt.h) +IS_BUILTIN.getopt= yes +. endif +.endif + +CHECK_BUILTIN.getopt?= no +.if !empty(CHECK_BUILTIN.getopt:M[yY][eE][sS]) +USE_BUILTIN.getopt= yes +.endif + +USE_BUILTIN.getopt?= ${IS_BUILTIN.getopt} + +.if !empty(USE_BUILTIN.getopt:M[nN][oO]) +LIBGETOPT= -lgetopt +.else +LIBGETOPT= # empty +.endif + +BUILDLINK_LDADD.getopt?= ${LIBGETOPT} + +CONFIGURE_ENV+= LIBGETOPT="${LIBGETOPT}" +MAKE_ENV+= LIBGETOPT="${LIBGETOPT}" |