From: Tomi Ollila Date: Fri, 6 May 2016 18:11:25 +0000 (+0300) Subject: [PATCH] configure: add set -u X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a24bd0852b1ac3fe1be764d143a5a10c84c7b46b;p=notmuch-archives.git [PATCH] configure: add set -u --- diff --git a/c3/63e5510b5d5a80eec7a1b3808a93790641fe69 b/c3/63e5510b5d5a80eec7a1b3808a93790641fe69 new file mode 100644 index 000000000..b3eddb7a5 --- /dev/null +++ b/c3/63e5510b5d5a80eec7a1b3808a93790641fe69 @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 0766B6DE01F9 + for ; Fri, 6 May 2016 11:11:37 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.272 +X-Spam-Level: +X-Spam-Status: No, score=0.272 tagged_above=-999 required=5 tests=[AWL=0.281, + HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 518xNzqwzhAK for ; + Fri, 6 May 2016 11:11:28 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 73F376DE0159 + for ; Fri, 6 May 2016 11:11:28 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 62115100063; Fri, 6 May 2016 21:11:27 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Cc: tomi.ollila@iki.fi +Subject: [PATCH] configure: add set -u +Date: Fri, 6 May 2016 21:11:25 +0300 +Message-Id: <1462558285-10936-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 2.6.4 +In-Reply-To: <1462296224-768-1-git-send-email-tomi.ollila@iki.fi> +References: <1462296224-768-1-git-send-email-tomi.ollila@iki.fi> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 06 May 2016 18:11:37 -0000 + +In case of any unset variable, make ./configure exit with nonzero value; +an attempt to expand an unset variable is a bug in the script +(usually a spelling mistake) and those should not pass through +unnoticed. +--- + +I was also doing set -e support but that has quite a few nontrivial +things in it. Set -u catches all lagging c++ compilers and so on ;). +Perhaps later. + +This change requires id:1462296224-768-1-git-send-email-tomi.ollila@iki.fi +to be applied first, otherwise ./configure will not pass. + + configure | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 6231d2b..3753e7f 100755 +--- a/configure ++++ b/configure +@@ -1,5 +1,7 @@ + #! /bin/sh + ++set -u ++ + # Test whether this shell is capable of parameter substring processing. + ( option='a/b'; : ${option#*/} ) 2>/dev/null || { + echo " +@@ -480,6 +482,7 @@ if pkg-config --exists valgrind; then + else + printf "No (but that's fine).\n" + have_valgrind=0 ++ valgrind_cflags= + fi + + printf "Checking for bash-completion (>= 1.90)... " +@@ -490,11 +493,11 @@ else + WITH_BASH=0 + fi + +-if [ -z "${EMACSLISPDIR}" ]; then ++if [ -z "${EMACSLISPDIR-}" ]; then + EMACSLISPDIR="\$(prefix)/share/emacs/site-lisp" + fi + +-if [ -z "${EMACSETCDIR}" ]; then ++if [ -z "${EMACSETCDIR-}" ]; then + EMACSETCDIR="\$(prefix)/share/emacs/site-lisp" + fi + +-- +2.8.2 +