| @@ -1,28 +1,38 @@ | | | @@ -1,28 +1,38 @@ |
1 | # $NetBSD: module.mk,v 1.1 2009/01/11 23:15:55 minskim Exp $ | | 1 | # $NetBSD: module.mk,v 1.2 2009/01/24 02:56:19 obache 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 | PRINT_PLIST_AWK+= /^@dirrm share\/lua$$/ { next; } |
| | | 18 | PRINT_PLIST_AWK+= /^@dirrm ${LUA_LDIR:S|/|\\/|g}$$/ { next; } |
| | | 19 | PRINT_PLIST_AWK+= /^(@dirrm )?${LUA_LDIR:S|/|\\/|g}/ \ |
| | | 20 | { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}"); print; next; } |
| | | 21 | |
17 | .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) | | 22 | .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) |
18 | DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua | | 23 | DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua |
19 | .else | | 24 | .else |
20 | LUA_CDIR= lib/lua/${_LUA_VERSION} | | 25 | LUA_CDIR= lib/lua/${_LUA_VERSION} |
21 | PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} | | 26 | PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} |
22 | | | 27 | |
23 | BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* | | 28 | BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* |
24 | | | 29 | |
| | | 30 | PRINT_PLIST_AWK+= /^@dirrm lib\/lua$$/ { next; } |
| | | 31 | PRINT_PLIST_AWK+= /^@dirrm ${LUA_CDIR:S|/|\\/|g}$$/ { next; } |
| | | 32 | PRINT_PLIST_AWK+= /^(@dirrm )?${LUA_CDIR:S|/|\\/|g}/ \ |
| | | 33 | { gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}"); print; next; } |
| | | 34 | |
25 | .include "../../lang/lua/buildlink3.mk" | | 35 | .include "../../lang/lua/buildlink3.mk" |
26 | .endif | | 36 | .endif |
27 | | | 37 | |
28 | .endif # LUA_MODULE_MK | | 38 | .endif # LUA_MODULE_MK |