From eb03241b5f179871f182b6faf2b7c09b8a9cad2a Mon Sep 17 00:00:00 2001
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Wed, 30 Sep 2020 17:21:24 +0100
Subject: [PATCH 1/2] Build: check error from gengetopt command

shell, by default, does not stop on errors.  set -e is needed.

I have not examined the other makefiles for other occurrences of this
bug.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
 oathtool/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oathtool/Makefile.am b/oathtool/Makefile.am
index 1d638be..7c38b1a 100644
--- a/oathtool/Makefile.am
+++ b/oathtool/Makefile.am
@@ -30,7 +30,7 @@ liboathtool_cmd_la_LIBADD = gl/libgnu.la
 liboathtool_cmd_la_CFLAGS =
 
 oathtool_cmd.h oathtool_cmd.c: oathtool.ggo Makefile.am
-	$(AM_V_GEN)gengetopt --unamed-opts="KEY [OTP]" \
+	set -e; $(AM_V_GEN)gengetopt --unamed-opts="KEY [OTP]" \
 		--no-handle-version --no-handle-help \
 		--input $< --file-name oathtool_cmd; \
 	perl -pi -e 's/HAVE_LONG_LONG/HAVE_LONG_LONG_INT/' oathtool_cmd.h oathtool_cmd.c; \
-- 
2.20.1

