From 395d168cb7062fa21468fc5846e2696a524390ad Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 20 Mar 2014 21:48:02 +2100 Subject: [PATCH] [PATCH 1/3] build: compute subdirectories from the presence of Makefile.local --- 1f/f3d92f647ed5fa58c5fdb185e72aed1c03ffe2 | 86 +++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 1f/f3d92f647ed5fa58c5fdb185e72aed1c03ffe2 diff --git a/1f/f3d92f647ed5fa58c5fdb185e72aed1c03ffe2 b/1f/f3d92f647ed5fa58c5fdb185e72aed1c03ffe2 new file mode 100644 index 000000000..47d0f611b --- /dev/null +++ b/1f/f3d92f647ed5fa58c5fdb185e72aed1c03ffe2 @@ -0,0 +1,86 @@ +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 119B1431FD7 + for ; Wed, 19 Mar 2014 17:48:29 -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=[none] + 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 CDiBlDTFKDzg for ; + Wed, 19 Mar 2014 17:48:24 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C746D431FBF + for ; Wed, 19 Mar 2014 17:48:22 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WQR9i-0000Hj-FV; Wed, 19 Mar 2014 21:48:22 -0300 +Received: (nullmailer pid 22551 invoked by uid 1000); Thu, 20 Mar 2014 + 00:48:11 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 1/3] build: compute subdirectories from the presence of + Makefile.local +Date: Wed, 19 Mar 2014 21:48:02 -0300 +Message-Id: <1395276484-22363-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.9.0 +In-Reply-To: <1395276484-22363-1-git-send-email-david@tethera.net> +References: <1395276484-22363-1-git-send-email-david@tethera.net> +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: Thu, 20 Mar 2014 00:48:29 -0000 + +This allows the fragile sed command in configure to be replaced with a somewhat +less fragile find command. +--- + Makefile | 3 +-- + configure | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 061c55a..74b476c 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,8 +5,7 @@ all: + # List all subdirectories here. Each contains its own Makefile.local. + # Use of '=', without '+=', seems to be required for out-of-tree + # builds to work. +-subdirs = compat completion doc emacs lib parse-time-string \ +- performance-test util test test/test-databases ++subdirs = $(dir $(shell find . -mindepth 2 -name Makefile.local)) + + # We make all targets depend on the Makefiles themselves. + global_deps = Makefile Makefile.config Makefile.local \ +diff --git a/configure b/configure +index fb276f1..b3b1b44 100755 +--- a/configure ++++ b/configure +@@ -23,7 +23,7 @@ srcdir=$(dirname "$0") + # the directory structure and copy Makefiles. + if [ "$srcdir" != "." ]; then + +- for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do ++ for dir in $(cd $srcdir && find . -name Makefile.local -exec dirname {} \;); do + mkdir -p "$dir" + cp "$srcdir"/"$dir"/Makefile.local "$dir" + cp "$srcdir"/"$dir"/Makefile "$dir" +-- +1.9.0 + -- 2.26.2