From: Jo-Philipp Wich Date: Sat, 3 Sep 2011 17:07:38 +0000 (+0000) Subject: build: Bail out the build if any lua compilation fails. (Patch from Fon-NG, http... X-Git-Tag: 0.11.0~1861 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=158f709af34f0ead5bfcacfefcf2f49caf610673 build: Bail out the build if any lua compilation fails. (Patch from Fon-NG, trac.fonosfera.org/fon-ng/changeset/1867) --- diff --git a/build/module.mk b/build/module.mk index 7104ba5af..b69019c56 100644 --- a/build/module.mk +++ b/build/module.mk @@ -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 = ; 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