diff options
author | jlam <jlam@pkgsrc.org> | 2004-04-26 09:39:38 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-04-26 09:39:38 +0000 |
commit | a44f074ef2c982295dbe855776f58a074224f943 (patch) | |
tree | cada344501437dace4206bd55b673e100958d044 | |
parent | f7906f6e940fae9dbd13c13e74bdae020d036c73 (diff) | |
download | pkgsrc-a44f074ef2c982295dbe855776f58a074224f943.tar.gz |
Use a table instead of cascading if..else to dispatch to the correct
buildlink3.mk for inclusion. Remove reference to BUILDLINK_PREFIX.db2
which doesn't exist (fixed by using the table).
-rw-r--r-- | mk/bdb.buildlink3.mk | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/mk/bdb.buildlink3.mk b/mk/bdb.buildlink3.mk index 5de21798a56..5c527abbea9 100644 --- a/mk/bdb.buildlink3.mk +++ b/mk/bdb.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bdb.buildlink3.mk,v 1.7 2004/04/25 15:06:10 minskim Exp $ +# $NetBSD: bdb.buildlink3.mk,v 1.8 2004/04/26 09:39:38 jlam Exp $ # # This Makefile fragment is meant to be included by packages that # require a Berkeley DB implementation. db.buildlink3.mk will: @@ -29,8 +29,10 @@ BDB_ACCEPTED?= ${_BDB_PKGS} _BDB_PKGS?= native db4 db3 db2 _BDB_PKGBASE.db2= db +_BDB_PKGSRCDIR.db2= ../../databases/db . for _bdb_ in ${_BDB_PKGS} -_BDB_PKGBASE.${_bdb_}?= ${_bdb_} +_BDB_PKGBASE.${_bdb_}?= ${_bdb_} +_BDB_PKGSRCDIR.${_bdb_}?= ../../databases/${_bdb_} . endfor _BDB_DEFAULT= ${BDB_DEFAULT} @@ -127,14 +129,8 @@ BUILDLINK_PACKAGES+= db-native BUILDLINK_INCDIRS.db-native?= ${_BDB_INCDIRS} BUILDLINK_TRANSFORM?= ${_BDB_TRANSFORM} BDBBASE= ${BUILDLINK_PREFIX.db-native} -. elif ${BDB_TYPE} == "db4" -BDBBASE= ${BUILDLINK_PREFIX.db4} -. include "../../databases/db4/buildlink3.mk" -. elif ${BDB_TYPE} == "db3" -BDBBASE= ${BUILDLINK_PREFIX.db3} -. include "../../databases/db3/buildlink3.mk" -. elif ${BDB_TYPE} == "db2" -BDBBASE= ${BUILDLINK_PREFIX.db2} -. include "../../databases/db/buildlink3.mk" +. else +BDBBASE= ${BUILDLINK_PREFIX.${_BDB_PKGBASE.${BDB_TYPE}}} +. include "${_BDB_PKGSRCDIR.${BDB_TYPE}}/buildlink3.mk" . endif .endif |