diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-06-29 18:36:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-06-29 18:36:43 +0000 |
commit | ec297a5546f59ee49f6de943b7a3afb33ecc097f (patch) | |
tree | 5bb02160d52c599cf8a2e54ba5f7196aaa285fbc /build/module.mk | |
parent | af221af6c429d5957f2c0f471a2bf6b2e501c3fa (diff) |
* luci: strip comments in source target
Diffstat (limited to 'build/module.mk')
-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 |