pkgsrc/lang/lua/module.mk

59 lines
1.3 KiB
Makefile
Raw Normal View History

2015-03-05 15:15:45 +01:00
# $NetBSD: module.mk,v 1.7 2015/03/05 14:15:45 ryoon Exp $
#
# This Makefile fragment is intended to be included by packages that
2014-05-03 15:00:44 +02:00
# install Lua modules.
#
# === Defined variables ===
#
# LUA_LDIR
# Path where Lua modules are installed.
#
# LUA_CDIR
# Path where Lua C modules are installed. Not defined if
# NO_BUILD variable is set to "yes".
#
# LUA_DOCDIR
# Path where documentation files are installed.
#
# LUA_EXAMPLESDIR
# Path where example files are installed.
#
# Keywords: lua
#
.if !defined(LUA_MODULE_MK)
LUA_MODULE_MK= # defined
2014-05-03 15:00:44 +02:00
.if !defined(LUA_LUAVERSION_MK)
.include "../../lang/lua/luaversion.mk"
2014-05-03 15:00:44 +02:00
.endif
LUA_LDIR= share/lua/${_LUA_DOT_VERSION}
PLIST_SUBST+= LUA_LDIR=${LUA_LDIR}
2014-05-03 15:00:44 +02:00
PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \
{ gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") }
.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo])
DEPENDS+= ${LUA_BASEDEPENDS}
.else
LUA_CDIR= lib/lua/${_LUA_DOT_VERSION}
PLIST_SUBST+= LUA_CDIR=${LUA_CDIR}
PRINT_PLIST_AWK+= /^${LUA_CDIR:S|/|\\/|g}/ \
{ gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") }
.include "${LUA_PKGSRCDIR}/buildlink3.mk"
.endif
2014-05-03 15:00:44 +02:00
LUA_DOCDIR= share/doc/${PKGBASE}
PLIST_SUBST+= LUA_DOCDIR=${LUA_DOCDIR}
LUA_EXAMPLESDIR= share/examples/${PKGBASE}
PLIST_SUBST+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR}
2015-03-05 15:15:45 +01:00
LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
.endif # LUA_MODULE_MK