From 5c1de087af5b9e2ac7cb4dc2366a3c448e3f9e17 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Mon, 27 Apr 2015 01:42:21 -0400 Subject: [PATCH 1/2] Add a new makefile rule to check for build errors. This rule will build each program, ignore all output, and return pass or fail depending on whether the build has errors. This is helpful for finding out which programs need to be fixed when a new Rust nightly build inevitably breaks everything. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 7a3822151..341e27b69 100644 --- a/Makefile +++ b/Makefile @@ -374,4 +374,15 @@ busytest: $(BUILDDIR)/busybox $(BUILDDIR)/.config (cd $(BUSYBOX_SRC)/testsuite && bindir=$(BUILDDIR) ./runtest $(RUNTEST_ARGS)) endif +# This rule will build each program, ignore all output, and return pass +# or fail depending on whether the build has errors. +build-check: + @for prog in $(sort $(PROGS)); do \ + make BUILD="$$prog" >/dev/null 2>&1; status=$$?; \ + if [ $$status -eq 0 ]; \ + then printf "%-10s\t\033[1;32mpass\033[00;m\n" $$prog; \ + else printf "%-10s\t\033[1;31mfail\033[00;m\n" $$prog; \ + fi; \ + done + .PHONY: $(TEMPDIR) all deps test distclean clean busytest install uninstall From 61ddb0431485ef26f3dc95651a96e99336372721 Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Mon, 27 Apr 2015 12:02:21 -0400 Subject: [PATCH 2/2] Add documentation for new rule. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8e9aef0cb..8349bfe4b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ To build with LTO and stripping: make ENABLE_LTO=y ENABLE_STRIP=y ``` +To check all available utilities for build errors: +``` +make build-check +``` + Installation Instructions -------------------------