summaryrefslogtreecommitdiff
path: root/examples/hello_lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello_lua')
-rw-r--r--examples/hello_lua/Makefile6
-rw-r--r--examples/hello_lua/expect.out12
-rwxr-xr-xexamples/hello_lua/foobar.in (renamed from examples/hello_lua/foobar)2
-rw-r--r--examples/hello_lua/test.mk14
4 files changed, 25 insertions, 9 deletions
diff --git a/examples/hello_lua/Makefile b/examples/hello_lua/Makefile
index faba9c7..3e40bfb 100644
--- a/examples/hello_lua/Makefile
+++ b/examples/hello_lua/Makefile
@@ -3,7 +3,11 @@ PROJECTNAME = hello_lua
LUA_LMODULES = foo.lua bar.lua
LUA_CMODULE = baz
-SCRIPTS = foobar
+INSCRIPTS = foobar
+SCRIPTS = ${INSCRIPTS}
+
+INTEXTS_REPLS = LUA ${PROG.lua}
+MKC_CHECK_PROGS = lua
.include "test.mk"
.include <mkc.lib.mk>
diff --git a/examples/hello_lua/expect.out b/examples/hello_lua/expect.out
index df5630c..0e51847 100644
--- a/examples/hello_lua/expect.out
+++ b/examples/hello_lua/expect.out
@@ -19,6 +19,8 @@ foobarbaz
/objdir/_mkc_pkgconfig_lua_libs.res
/objdir/_mkc_prog_cc.err
/objdir/_mkc_prog_cc.res
+/objdir/_mkc_prog_lua.err
+/objdir/_mkc_prog_lua.res
/objdir/_mkc_prog_pkg-config.err
/objdir/_mkc_prog_pkg-config.res
/objdir/bar.lua
@@ -28,6 +30,7 @@ foobarbaz
/objdir/expect.out
/objdir/foo.lua
/objdir/foobar
+/objdir/foobar.in
/objdir/hello_lua.test.out.tmp
/objdir/test.mk
========= install ==========
@@ -63,13 +66,15 @@ foobarbaz
/objdir/_mkc_pkgconfig_lua_libs.res
/objdir/_mkc_prog_cc.err
/objdir/_mkc_prog_cc.res
+/objdir/_mkc_prog_lua.err
+/objdir/_mkc_prog_lua.res
/objdir/_mkc_prog_pkg-config.err
/objdir/_mkc_prog_pkg-config.res
/objdir/bar.lua
/objdir/baz.c
/objdir/expect.out
/objdir/foo.lua
-/objdir/foobar
+/objdir/foobar.in
/objdir/hello_lua.test.out.tmp
/objdir/test.mk
======= distclean ==========
@@ -78,7 +83,7 @@ foobarbaz
/objdir/baz.c
/objdir/expect.out
/objdir/foo.lua
-/objdir/foobar
+/objdir/foobar.in
/objdir/hello_lua.test.out.tmp
/objdir/test.mk
========= install2 ==========
@@ -97,6 +102,8 @@ foobarbaz
/objdir/_mkc_pkgconfig_lua_libs.res
/objdir/_mkc_prog_cc.err
/objdir/_mkc_prog_cc.res
+/objdir/_mkc_prog_lua.err
+/objdir/_mkc_prog_lua.res
/objdir/_mkc_prog_pkg-config.err
/objdir/_mkc_prog_pkg-config.res
/objdir/bar.lua
@@ -106,6 +113,7 @@ foobarbaz
/objdir/expect.out
/objdir/foo.lua
/objdir/foobar
+/objdir/foobar.in
/objdir/hello_lua.test.out.tmp
/objdir/home
/objdir/home/cheusov
diff --git a/examples/hello_lua/foobar b/examples/hello_lua/foobar.in
index 249feb3..dd8714a 100755
--- a/examples/hello_lua/foobar
+++ b/examples/hello_lua/foobar.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env lua
+#!@LUA@
require "foo"
require "bar"
diff --git a/examples/hello_lua/test.mk b/examples/hello_lua/test.mk
index cc8b0df..8b6fc91 100644
--- a/examples/hello_lua/test.mk
+++ b/examples/hello_lua/test.mk
@@ -5,22 +5,26 @@ test_output:
@set -e; \
rm -rf ${.OBJDIR}/usr ${.OBJDIR}/opt; \
echo PROJECTNAME=${PROJECTNAME}; \
+ LUA_PATH=${.CURDIR}/?.lua; \
+ LUA_CPATH=${.OBJDIR}/?.so; \
+ export LUA_PATH LUA_CPATH; \
./foobar; \
+ MKCATPAGES=yes; export MKCATPAGES; \
\
echo =========== all ============; \
find ${.OBJDIR} -type f | \
mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
\
echo ========= install ==========; \
- ${MAKE} ${MAKEFLAGS} install DESTDIR=${.OBJDIR} \
+ ${MAKE} ${MAKEFLAGS} install -j3 DESTDIR=${.OBJDIR} PREFIX=/usr/local \
> /dev/null; \
find ${.OBJDIR}/usr -type f -o -type d | \
- mkc_test_helper "${PREFIX}" "${.OBJDIR}" | uniq; \
+ mkc_test_helper /usr/local "${.OBJDIR}" | uniq; \
\
echo ======== uninstall =========; \
- ${MAKE} ${MAKEFLAGS} uninstall DESTDIR=${.OBJDIR} > /dev/null; \
+ ${MAKE} ${MAKEFLAGS} -j4 uninstall DESTDIR=${.OBJDIR} PREFIX=/usr/local > /dev/null; \
find ${.OBJDIR}/usr -type f | \
- mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \
+ mkc_test_helper /usr/local "${.OBJDIR}"; \
\
echo ========== clean ===========; \
${MAKE} ${MAKEFLAGS} clean > /dev/null; \
@@ -36,7 +40,7 @@ test_output:
env PREFIX=/home/cheusov/local \
LUA_LMODDIR=/home/cheusov/local/share/lua/5.1 \
LUA_CMODDIR=/home/cheusov/local/lib/lua/5.1 \
- ${MAKE} ${MAKEFLAGS} all install DESTDIR=${.OBJDIR} \
+ ${MAKE} ${MAKEFLAGS} all install -j3 DESTDIR=${.OBJDIR} \
> /dev/null; \
find ${.OBJDIR} -type f -o -type d | \
mkc_test_helper "${PREFIX}" "${.OBJDIR}" | uniq; \