diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/module.mk | 3 |
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 |