summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-01-11 22:17:49 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-01-11 22:17:49 (GMT)
commit2b5f6eac7186f4044a69daa60b35bcc581c75a9e (patch)
treeec9be4edcd65d4ee981e912f03363386e05d88e3
parentac5234abe456612ac617a218675e926fa45879eb (diff)
cleaned up build scripts
-rwxr-xr-xconfigure21
-rw-r--r--mode-leds.lua3
2 files changed, 8 insertions, 16 deletions
diff --git a/configure b/configure
index d39c7f5..0f140d9 100755
--- a/configure
+++ b/configure
@@ -28,8 +28,6 @@ LDFLAGS='-g -Wall -O2'
LUA_LDFLAGS='-lm'
LUA_DIR=''
-LUA=''
-LUAC=''
print_usage() {
echo "configure --help print this"
@@ -96,8 +94,7 @@ if [ -z "$LUA_DIR" ]; then
echo "using Lua $LUA_VERSION ($LUA_RELEASE) found at $prefix/include"
CFLAGS="$CFLAGS -I$prefix/include"
LUA_LDFLAGS="$LUA_LDFLAGS -L$prefix/lib -llua"
- LUA=$prefix/lua
- LUAC=$prefix/luac
+ LUA_DIR=found
break
fi
else
@@ -109,27 +106,25 @@ if [ -z "$LUA_DIR" ]; then
CFLAGS="$CFLAGS -I$dir"
if [ -x "$prefix/bin/lua$LUA_VERSION" ]; then
LUA_LDFLAGS="$LUA_LDFLAGS -L$prefix/lib -llua$LUA_VERSION"
- LUA=$prefix/bin/lua$LUA_VERSION
- LUAC=$prefix/bin/luac$LUA_VERSION
+ LUA_DIR=found
elif [ -x "$prefix/bin/lua-$LUA_VERSION" ]; then
LUA_LDFLAGS="$LUA_LDFLAGS -L$prefix/lib -llua-$LUA_VERSION"
- LUA=$prefix/bin/lua-$LUA_VERSION
- LUAC=$prefix/bin/luac-$LUA_VERSION
+ LUA_DIR=found
else
- echo "ERROR: found lua.h at $dir/lua.h but no matching lua and luac"
+ echo "ERROR: found lua.h at $dir/lua.h but no matching lua library"
return 1
fi
break
fi
fi
done
- if [ -n "$LUAC" ]; then
+ if [ -n "$LUA_DIR" ]; then
break
fi
fi
done
- if [ -z "$LUAC" ]; then
+ if [ -z "$LUA_DIR" ]; then
echo "ERROR: no suitable lua found .. please install lua 5.1 or higher or use --with-lua"
return 1
fi
@@ -137,8 +132,6 @@ if [ -z "$LUA_DIR" ]; then
else
CFLAGS="$CFLAGS -I$LUA_DIR/include"
LUA_LDFLAGS="$LUA_LDFLAGS $LUA_DIR/lib/liblua.a"
- LUA=$LUA_DIR/bin/lua
- LUAC=$LUA_DIR/bin/luac
fi
@@ -152,8 +145,6 @@ CC := gcc
CFLAGS := $CFLAGS
LDFLAGS := $LDFLAGS
LUA_LDFLAGS := $LUA_LDFLAGS
-LUA := $LUA
-LUAC := $LUAC
EOF
exit 0
diff --git a/mode-leds.lua b/mode-leds.lua
index fd52eca..1d49e8b 100644
--- a/mode-leds.lua
+++ b/mode-leds.lua
@@ -32,7 +32,8 @@ function main_loop(opt)
local sig = signal.init()
local cmdfd = cmd.init()
- cmd.send_string("hello world");
+ cmd.send_string("listen mode");
+ cmd.send_string("status");
local return_value = 0
while return_value == 0 do