summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-07-13 23:59:30 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-07-13 23:59:30 +0200
commit5620174f0651c4918c8dd65e5cabf1ee6df28de7 (patch)
tree962caf7498540ab49b8990da5d226791c75f21d6
parent94ca703483ba83a856a6206d188e68261abb1476 (diff)
parentfd29dcc265c0861e734a27690f5068c7dbc4dd6a (diff)
downloadluaotfload-5620174f0651c4918c8dd65e5cabf1ee6df28de7.tar.gz
Merge pull request #232 from phi-gamma/master
improve on release
-rw-r--r--Makefile23
-rw-r--r--src/luaotfload-diagnostics.lua2
2 files changed, 21 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4e21d0f..6a552c2 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
@@ -124,10 +139,10 @@ $(BUILDDIR): /dev/null
define make-ctandir
@$(RM) -rf $(DISTDIR)
-@mkdir -p $(DISTDIR) && cp $(VGND) $(CONFDEMO) $(SOURCE) $(COMPILED) $(DISTDIR)
+@mkdir -p $(DISTDIR) && cp $(RESOURCES) $(DOCPDF) $(VGND) $(CONFDEMO) $(SOURCE) $(DISTDIR)
endef
-$(CTAN_ZIP): $(DOCS) $(SOURCE) $(COMPILED) $(TDS_ZIP)
+$(CTAN_ZIP): $(DOCS) $(SOURCE) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
$(make-ctandir)
@@ -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
diff --git a/src/luaotfload-diagnostics.lua b/src/luaotfload-diagnostics.lua
index e0c3c23..80e461c 100644
--- a/src/luaotfload-diagnostics.lua
+++ b/src/luaotfload-diagnostics.lua
@@ -667,7 +667,7 @@ local diagnose = function (job)
carefully and get a clean version from CTAN or
github:
- × http://ctan.org/tex-archive/macros/luatex/generic/luaotfload
+ × http://www.ctan.org/pkg/luaotfload
× https://github.com/lualatex/luaotfload/releases
If you are uncertain as to how to proceed, then