build: make building more strict, abort on errors in gccbuild phase
[project/luci.git] / Makefile
index 0f0d3aa..d082a98 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,10 +12,19 @@ all: build
 build: gccbuild luabuild
 
 gccbuild:
-       for i in $(MODULES); do make -C$$i compile; done
+       for i in $(MODULES); do \
+               make -C$$i compile || { \
+                       echo "*** Compilation of $$i failed!"; \
+                       exit 1; \
+               }; \
+       done
+
+luabuild: i18nbuild
+       for i in $(MODULES); do HOST=$(realpath host) make -C$$i luabuild; done
 
-luabuild:
-       for i in $(MODULES); do make -C$$i luabuild; done
+i18nbuild:
+       mkdir -p host/lua-po
+       ./build/i18n-po2lua.pl ./po host/lua-po
 
 clean:
        rm -rf docs
@@ -48,10 +57,11 @@ runboa: hostenv
 runhttpd: hostenv
        build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/lucittpd) $(realpath host)/usr/lib/lucittpd/plugins"
 
-runluci: runhttpd
+runluci: luahost
+       build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
 
 runlua: hostenv
-       build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) lua
+       build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
 
 runshell: hostenv
        build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL