From aba913436a8521abe405a04ed71388989e1d646f Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sat, 25 Jul 2015 14:44:29 +0200 Subject: Imported Upstream version 0.25.0 --- examples/hello_lua/Makefile | 6 +++++- examples/hello_lua/expect.out | 12 ++++++++++-- examples/hello_lua/foobar | 7 ------- examples/hello_lua/foobar.in | 7 +++++++ examples/hello_lua/test.mk | 14 +++++++++----- 5 files changed, 31 insertions(+), 15 deletions(-) delete mode 100755 examples/hello_lua/foobar create mode 100755 examples/hello_lua/foobar.in (limited to 'examples/hello_lua') 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 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 deleted file mode 100755 index 249feb3..0000000 --- a/examples/hello_lua/foobar +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env lua - -require "foo" -require "bar" -require "baz" - -io.write (foo.get () .. bar.get () .. baz () .. "\n") diff --git a/examples/hello_lua/foobar.in b/examples/hello_lua/foobar.in new file mode 100755 index 0000000..dd8714a --- /dev/null +++ b/examples/hello_lua/foobar.in @@ -0,0 +1,7 @@ +#!@LUA@ + +require "foo" +require "bar" +require "baz" + +io.write (foo.get () .. bar.get () .. baz () .. "\n") 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; \ -- cgit v1.2.3