summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--build/module.mk2
-rw-r--r--contrib/luaposix/Makefile2
-rw-r--r--contrib/package/luci/Makefile2
3 files changed, 5 insertions, 1 deletions
diff --git a/build/module.mk b/build/module.mk
index 8e403a0b6..20fdb4376 100644
--- a/build/module.mk
+++ b/build/module.mk
@@ -20,6 +20,8 @@ luasource:
cp -a lua/* dist$(LUA_MODULEDIR) -R 2>/dev/null || true
cp -a htdocs/* dist$(HTDOCS) -R 2>/dev/null || true
for i in $$(find dist -name .svn); do rm $$i -rf; done
+
+luastrip: luasource
for i in $$(find dist -type f -name '*.lua'); do perl -e 'undef $$/; open( F, "< $$ARGV[0]" ) || die $$!; $$src = <F>; close F; $$src =~ s/--\[\[.*?\]\](--)?//gs; $$src =~ s/^\s*--.*?\n//gm; open( F, "> $$ARGV[0]" ) || die $$!; print F $$src; close F' $$i; done
luacompile: luasource
diff --git a/contrib/luaposix/Makefile b/contrib/luaposix/Makefile
index a72db3cb6..e9433bf58 100644
--- a/contrib/luaposix/Makefile
+++ b/contrib/luaposix/Makefile
@@ -38,6 +38,8 @@ compile: $(LUAPOSIX_DIR)/.patched
cp $(LUAPOSIX_DIR)/posix.so dist$(LUA_LIBRARYDIR)
luasource:
+luastrip:
+luacompile:
compile-all: compile
clean:
diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile
index 495b46d98..5bf07b76c 100644
--- a/contrib/package/luci/Makefile
+++ b/contrib/package/luci/Makefile
@@ -27,7 +27,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_DEPENDS:=libnotimpl
-LUA_TARGET:=source
+LUA_TARGET:=strip
PKG_SELECTED_MODULES:=