summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-23 01:49:54 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-23 01:49:54 +0000
commit03ad47080cc869051af58f91769da4faf503e151 (patch)
tree78ef0ffe46a578a9892115658e788b69a303db04 /build
parent02977e53298dbcede2e4932b270f4ac23b51e014 (diff)
contrib, build: bundle LuaSrcDiet and make it available in build targets
Diffstat (limited to 'build')
-rw-r--r--build/module.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/module.mk b/build/module.mk
index 4e6c42c70..9ac643c22 100644
--- a/build/module.mk
+++ b/build/module.mk
@@ -32,6 +32,9 @@ luasource:
endif
+luadiet: luasource
+ for i in $$(find dist -type f -name '*.lua'); do $(LUA) ../../contrib/luasrcdiet/lua/LuaSrcDiet.lua $$i -o $$i.diet && mv $$i.diet $$i; 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