diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2014-07-13 23:54:41 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-07-13 23:54:41 +0200 |
commit | fd29dcc265c0861e734a27690f5068c7dbc4dd6a (patch) | |
tree | 962caf7498540ab49b8990da5d226791c75f21d6 | |
parent | c4e4c76f9d55f33ddf28bed865658bf5b67d1706 (diff) | |
download | luaotfload-fd29dcc265c0861e734a27690f5068c7dbc4dd6a.tar.gz |
[build] verify syntax of Lua files prior to packaging
-rw-r--r-- | Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -86,7 +86,22 @@ DO_GLYPHS = $(LUA) $(GLYPHSCRIPT) > /dev/null DO_CHARS = $(LUA) $(CHARSCRIPT) > /dev/null DO_STATUS = $(LUA) $(STATUSSCRIPT) > /dev/null +define check-lua-files +@echo validating syntax +@for f in $$(find . -name '*.lua') ; do \ + echo -n checking $$f ...; \ + if texluac -p $$f &>/dev/null; then \ + echo -e " \e[1;32mgood.\e[m"; \ + else \ + echo -e " \e[1;31mBAD.\e[m"; \ + exit 1; \ + fi; \ +done +endef + show: showtargets +check: + $(check-lua-files) all: ctan builddir: $(BUILDDIR) @@ -146,7 +161,7 @@ define run-install endef $(TDS_ZIP): TEXMFROOT=./tmp-texmf -$(TDS_ZIP): $(DOCS) $(ALL_STATUS) +$(TDS_ZIP): $(DOCS) $(ALL_STATUS) check @echo "Making TDS-ready archive $@." @$(RM) -- $@ $(run-install-doc) @@ -185,6 +200,8 @@ mrproper: clean showtargets: @echo "Available targets:" @echo + @echo " check check Lua files for syntax errors" + @echo @echo " doc compile PDF documentation" @echo " resources generate resource files (chars, glyphs)" @echo |