| @@ -1,28 +1,33 @@ | | | @@ -1,28 +1,33 @@ |
1 | # $NetBSD: module.mk,v 1.3 2009/06/14 22:58:02 joerg Exp $ | | 1 | # $NetBSD: module.mk,v 1.4 2013/09/17 12:03:09 joerg Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is intended to be included by packages that | | 3 | # This Makefile fragment is intended to be included by packages that |
4 | # install Lua packages. | | 4 | # install Lua packages. |
5 | | | 5 | |
6 | .if !defined(LUA_MODULE_MK) | | 6 | .if !defined(LUA_MODULE_MK) |
7 | LUA_MODULE_MK= # defined | | 7 | LUA_MODULE_MK= # defined |
8 | | | 8 | |
9 | .include "../../lang/lua/version.mk" | | 9 | .include "../../lang/lua/version.mk" |
10 | | | 10 | |
11 | _LUA_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} | | 11 | _LUA_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} |
12 | | | 12 | |
13 | LUA_PKGPREFIX= lua | | 13 | LUA_PKGPREFIX= lua |
14 | LUA_LDIR= share/lua/${_LUA_VERSION} | | 14 | LUA_LDIR= share/lua/${_LUA_VERSION} |
15 | PLIST_SUBST+= LUA_LDIR=${LUA_LDIR} | | 15 | PLIST_SUBST+= LUA_LDIR=${LUA_LDIR} |
16 | | | 16 | |
17 | .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) | | 17 | .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) |
18 | DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua | | 18 | DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua |
19 | .else | | 19 | .else |
20 | LUA_CDIR= lib/lua/${_LUA_VERSION} | | 20 | LUA_CDIR= lib/lua/${_LUA_VERSION} |
21 | PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} | | 21 | PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} |
22 | | | 22 | |
| | | 23 | PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \ |
| | | 24 | { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") } |
| | | 25 | PRINT_PLIST_AWK+= /^${LUA_CDIR:S|/|\\/|g}/ \ |
| | | 26 | { gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") } |
| | | 27 | |
23 | BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* | | 28 | BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* |
24 | | | 29 | |
25 | .include "../../lang/lua/buildlink3.mk" | | 30 | .include "../../lang/lua/buildlink3.mk" |
26 | .endif | | 31 | .endif |
27 | | | 32 | |
28 | .endif # LUA_MODULE_MK | | 33 | .endif # LUA_MODULE_MK |