From 775c50d622863b791f8c7dacc3e9020532291fe8 Mon Sep 17 00:00:00 2001 From: Patrick van Staveren Date: Mon, 1 Feb 2016 07:32:26 +0900 Subject: Handle errors from subscripts. Makefile .ONESHELL mode means that individual line exit codes aren't evaluated, only the final return code from the shell, which will always be zero. This makes it break earlier when a subscript returns non-zero. Maybe we shouldn't be using make? ;) --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 84839ce3..478830b0 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ all: .PHONY: prepare prepare: + set -e @echo "Starting VyOS ISO image build" @scripts/check-build-env @@ -23,6 +24,7 @@ prepare: .PHONY: iso .ONESHELL: iso: prepare + set -e @echo "It's not like I'm building this specially for you or anything!" cd $(build_dir) lb build 2>&1 | tee build.log @@ -30,12 +32,14 @@ iso: prepare .PHONY: prepare-package-env .ONESHELL: prepare-package-env: + set -e @scripts/pbuilder-config @scripts/pbuilder-setup .PHONY: clean .ONESHELL: clean: + set -e cd $(build_dir) lb clean -- cgit v1.2.3 From 285f9672490ca3462ebf6e40555e2b7f80bd226b Mon Sep 17 00:00:00 2001 From: Patrick van Staveren Date: Mon, 1 Feb 2016 07:38:45 +0900 Subject: silently enable error mode in shell --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 478830b0..38448f39 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: .PHONY: prepare prepare: - set -e + @set -e @echo "Starting VyOS ISO image build" @scripts/check-build-env @@ -24,7 +24,7 @@ prepare: .PHONY: iso .ONESHELL: iso: prepare - set -e + @set -e @echo "It's not like I'm building this specially for you or anything!" cd $(build_dir) lb build 2>&1 | tee build.log @@ -32,14 +32,14 @@ iso: prepare .PHONY: prepare-package-env .ONESHELL: prepare-package-env: - set -e + @set -e @scripts/pbuilder-config @scripts/pbuilder-setup .PHONY: clean .ONESHELL: clean: - set -e + @set -e cd $(build_dir) lb clean -- cgit v1.2.3