summaryrefslogtreecommitdiffhomepage
path: root/build/module.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build/module.mk')
-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