summaryrefslogtreecommitdiff
path: root/lang/lua/module.mk
blob: d29d36fe90fe68cff20bdeecc72cfbdcf7c2d911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $NetBSD: module.mk,v 1.4 2013/09/17 12:03:09 joerg Exp $
#
# This Makefile fragment is intended to be included by packages that
# install Lua packages.

.if !defined(LUA_MODULE_MK)
LUA_MODULE_MK=	# defined

.include "../../lang/lua/version.mk"

_LUA_VERSION=	${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}

LUA_PKGPREFIX=	lua
LUA_LDIR=	share/lua/${_LUA_VERSION}
PLIST_SUBST+=	LUA_LDIR=${LUA_LDIR}

.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo])
DEPENDS+=	lua-${_LUA_VERSION}.*:../../lang/lua
.else
LUA_CDIR=	lib/lua/${_LUA_VERSION}
PLIST_SUBST+=	LUA_CDIR=${LUA_CDIR}

PRINT_PLIST_AWK+=	/^${LUA_LDIR:S|/|\\/|g}/ \
			{ gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") }
PRINT_PLIST_AWK+=	/^${LUA_CDIR:S|/|\\/|g}/ \
			{ gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") }

BUILDLINK_API_DEPENDS.lua+=	lua-${_LUA_VERSION}.*

.include "../../lang/lua/buildlink3.mk"
.endif

.endif  # LUA_MODULE_MK