Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 78B27431FAF for ; Tue, 6 May 2014 10:03:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c2q1g8EvzcpJ for ; Tue, 6 May 2014 10:02:57 -0700 (PDT) Received: from qmta01.westchester.pa.mail.comcast.net (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) by olra.theworths.org (Postfix) with ESMTP id E7AB7431FDC for ; Tue, 6 May 2014 10:02:52 -0700 (PDT) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta01.westchester.pa.mail.comcast.net with comcast id yf2K1n0031c6gX851h2skW; Tue, 06 May 2014 17:02:52 +0000 Received: from jane.lan ([24.11.133.78]) by omta23.westchester.pa.mail.comcast.net with comcast id yh2W1n00e1heoKc3jh2s2U; Tue, 06 May 2014 17:02:52 +0000 From: Charles Celerier To: notmuch@notmuchmail.org Subject: [PATCH 2/5] configure, test: Added variables for paths to true and false. Date: Tue, 6 May 2014 13:02:25 -0400 Message-Id: <1399395748-44920-3-git-send-email-cceleri@cs.stanford.edu> X-Mailer: git-send-email 1.8.5.2 (Apple Git-48) In-Reply-To: <1399395748-44920-2-git-send-email-cceleri@cs.stanford.edu> References: <1399395748-44920-1-git-send-email-cceleri@cs.stanford.edu> <1399395748-44920-2-git-send-email-cceleri@cs.stanford.edu> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1399395772; bh=BDg1hh5oBp0Gr7AwwKWBN4eGrx7bOVASqLLjD2vT5oY=; h=Received:Received:From:To:Subject:Date:Message-Id; b=PxkFjZBTMZ7XA/DI4R1hynHmSGgn0WHXEdEdAaMrHzxaFkPwnQNLn0kgUCz0OZPQF 8M7iRurOS1Ic79FZJ5nv5k5USXe9qZuwt1nrNjirGyhal5/hQC/bR/KTEjce8NFC4M SnNhWjElIhMweFSKlgeflLoM1t+YKkB839CS9srjo68ICfVeq6xezF41VffkFlCYbT p2moIYvjN5B91TShI8O1e6Sww9M9KFh6hvW4OiXpse50CKkJqQFEjwm86YfbklFfZo ekVihV7cNBsrRhgrMYI7uCSr0dqnnPjXTpYU4UfiNFLSWeFySFhIiNOGL7XPJIJ2WY BjshYk21U7e/Q== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Tue, 06 May 2014 17:03:03 -0000 The path to true may not be the same on all platforms (e.g. on Mac OS X it is /usr/bin/true), so the hard-coded path of /bin/true is not portable. This is resolved by adding a step to the configure script to locate the path of true and to use the TRUE variable wherever /bin/true was needed. The same was done for false. Signed-off-by: Charles Celerier --- configure | 6 ++++++ test/Makefile.local | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 9bde2eb..0bce0a3 100755 --- a/configure +++ b/configure @@ -50,6 +50,8 @@ CPPFLAGS=${CPPFLAGS:-} CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} LDFLAGS=${LDFLAGS:-} XAPIAN_CONFIG=${XAPIAN_CONFIG:-xapian-config} +TRUE=$(which true) +FALSE=$(which false) # We don't allow the EMACS or GZIP Makefile variables inherit values # from the environment as we do with CC and CXX above. The reason is @@ -761,6 +763,10 @@ CXX = ${CXX} # Command to execute emacs from Makefiles EMACS = emacs --quick +# Define the paths to true and false. +TRUE = ${TRUE} +FALSE = ${FALSE} + # Default FLAGS for C compiler (can be overridden by user such as "make CFLAGS=-g") CFLAGS = ${CFLAGS} diff --git a/test/Makefile.local b/test/Makefile.local index d622eaf..e422c06 100644 --- a/test/Makefile.local +++ b/test/Makefile.local @@ -37,16 +37,16 @@ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o $(dir)/have-compact: Makefile.config ifeq ($(HAVE_XAPIAN_COMPACT),1) - ln -sf /bin/true $@ + ln -sf $(TRUE) $@ else - ln -sf /bin/false $@ + ln -sf $(FALSE) $@ endif $(dir)/have-man: Makefile.config ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00) - ln -sf /bin/false $@ + ln -sf $(FALSE) $@ else - ln -sf /bin/true $@ + ln -sf $(TRUE) $@ endif .PHONY: test check -- 1.8.5.2 (Apple Git-48)