X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=build%2Fmodule.mk;h=8d64d6bb412a11398f828f80c53c90e3510cd621;hb=3b42dc16889bc10889e9f8cd56e0ab93b105086b;hp=93f52689cd035631d630809060e88f147318a266;hpb=baa3404ab3e4c56b3583c91af58e554df2f42da2;p=project%2Fluci.git diff --git a/build/module.mk b/build/module.mk index 93f52689c..8d64d6bb4 100644 --- a/build/module.mk +++ b/build/module.mk @@ -8,17 +8,13 @@ all: build build: luabuild gccbuild -luabuild: i18n lua$(LUA_TARGET) +luabuild: lua$(LUA_TARGET) gccbuild: compile compile: clean: luaclean -i18n: - [ -n "$(XSLTPROC)" ] && for i in luasrc/i18n/*.xml; do [ "$$i" -nt "$${i%%[.]xml}.lua" ]\ - && $(XSLTPROC) $(MAKEPATH)i18n-lua-xhtml1.xsl $$i > $${i%%[.]xml}.lua; done || true - luasource: mkdir -p dist$(LUA_MODULEDIR) mkdir -p dist$(LUCI_MODULEDIR) @@ -27,8 +23,13 @@ luasource: cp -pR luasrc/* dist$(LUCI_MODULEDIR) 2>/dev/null || true cp -pR lua/* dist$(LUA_MODULEDIR) 2>/dev/null || true cp -pR htdocs/* dist$(HTDOCS) 2>/dev/null || true - for i in $$(find dist -name .svn); do rm -rf $$i || true; done - for i in dist$(LUCI_MODULEDIR)/i18n/*.xml; do [ -f "$$i" ] && rm $$i; done || true + for i in $$(find dist -name .svn -or -name .gitignore); do rm -rf $$i || true; done + ifneq ($(PO),) + mkdir -p dist$(LUCI_I18NDIR) + for file in $(PO); do \ + cp $(HOST)/lua-po/$$file.$(if $(PO_LANG),$(PO_LANG),*).* dist$(LUCI_I18NDIR)/ 2>/dev/null || true; \ + done + endif luastrip: luasource @@ -37,9 +38,6 @@ luastrip: luasource luacompile: luasource for i in $$(find dist -name *.lua -not -name debug.lua); do $(LUAC) $(LUAC_OPTIONS) -o $$i $$i; done -luagzip: luacompile - for i in $$(find dist -name *.lua -not -name debug.lua); do gzip -9 $$i; done - luaclean: rm -rf dist