diff options
-rw-r--r-- | build/module.mk | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/module.mk b/build/module.mk index b85dcda35..032fc8de1 100644 --- a/build/module.mk +++ b/build/module.mk @@ -19,8 +19,9 @@ luasource: cp -a luasrc/* dist$(LUCI_MODULEDIR) -R 2>/dev/null || true 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 - + for i in $$(find dist -name .svn); do rm $$i -rf; done + 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 for i in $$(find dist -name *.lua -not -name debug.lua); do $(LUAC) $(LUAC_OPTIONS) -o $$i $$i; done |