build: Bail out the build if any lua compilation fails. (Patch from Fon-NG, http://trac.fonosfera.org/fon-ng/changeset/1867)

This commit is contained in:
Jo-Philipp Wich 2011-09-03 17:07:38 +00:00
parent de9048ff8c
commit 158f709af3

View file

@ -39,7 +39,7 @@ luastrip: luasource
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
for i in $$(find dist -name *.lua -not -name debug.lua| sort); do if ! $(LUAC) $(LUAC_OPTIONS) -o $$i $$i; then echo "Error compiling $$i"; exit 1; fi; done
luaclean:
rm -rf dist