Author: nbd
Date: 2015-04-16 14:18:26 +0200 (Thu, 16 Apr 2015)
New Revision: 45457

Modified:
   trunk/include/toplevel.mk
   trunk/include/verbose.mk
Log:
build: tell users to do non-paralle builds on errors

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/include/toplevel.mk
===================================================================
--- trunk/include/toplevel.mk   2015-04-16 09:54:39 UTC (rev 45456)
+++ trunk/include/toplevel.mk   2015-04-16 12:18:26 UTC (rev 45457)
@@ -166,6 +166,8 @@
 prereq:: prepare-tmpinfo .config
        @+$(NO_TRACE_MAKE) -r -s $@
 
+WARN_PARALLEL_ERROR = $(if $(BUILD_LOG),,$(and $(filter 
-j,$(MAKEFLAGS)),$(findstring s,$(OPENWRT_VERBOSE))))
+
 ifeq ($(SDK),1)
 
 %::
@@ -184,7 +186,10 @@
                        printf "$(_R)WARNING: your configuration is out of 
sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
                fi \
        )
-       @+$(ULIMIT_FIX) $(SUBMAKE) -r $@
+       @+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || { \
+               printf "$(_R)Build failed - please re-run with -j1 to see the 
real error message$(_N)\n" >&2; \
+               false; \
+       } )
 
 endif
 

Modified: trunk/include/verbose.mk
===================================================================
--- trunk/include/verbose.mk    2015-04-16 09:54:39 UTC (rev 45456)
+++ trunk/include/verbose.mk    2015-04-16 12:18:26 UTC (rev 45457)
@@ -54,7 +54,7 @@
   else
     SILENT:=>/dev/null $(if $(findstring w,$(OPENWRT_VERBOSE)),,2>&1)
     export QUIET:=1
-    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: 
build failed. Please re-run make with V=s to see what's going on"; false; } } 
8>&1 9>&2; cmd
+    SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* < /dev/null || { echo "make $$*: 
build failed. Please re-run make with -j1 V=s to see what's going on"; false; } 
} 8>&1 9>&2; cmd
   endif
 
   .SILENT: $(MAKECMDGOALS)
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to