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 4EF2F431FBF for ; Tue, 25 Mar 2014 05:59:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 J+BGRr18-Ti4 for ; Tue, 25 Mar 2014 05:59:30 -0700 (PDT) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id DED17431FBD for ; Tue, 25 Mar 2014 05:59:29 -0700 (PDT) Received: by mail-wi0-f181.google.com with SMTP id hm4so574441wib.8 for ; Tue, 25 Mar 2014 05:59:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=gcq+rAf+BrG9nJAdfFndqR2RDCqmJX2PeQNUcLpw5Ro=; b=PictS4aM90cjNNSN21pm8U4d600GXnRra7TvxMfRz6mNg2z96T7IdacG4HHZ2g8Y7s bGs2HS8Cta2UsT0XXrvF5bjzISrruD65/sn/YIpPAQ1tfObrRquQUSSfqiiu7gxcY+Rx sk3z0J9qDiPNyosDMt00EWZnpVLQ17EFGBJSgEbh8mHGu9kAu1xJzdjPrC+YLzSYZBqh XAFXDYHeu8WzTJawPmAJjVr/zHJsggAEfAdnKNeHqS17qIKTOBENObYZRxn2nsUZi20d UW6LndW8UvJC7axi79vQ1vi2nYYASy5yPRuarkinW1gN9jGBt6SpO0DH0lAAj70UZH9P OzLQ== X-Gm-Message-State: ALoCoQkOeEFr5sxRjLANmeRcPZ3JZoDDzDfjOxKmmdMqu3l9yhpygN8YowRrTXPRgN5QFzwhec1d X-Received: by 10.180.164.106 with SMTP id yp10mr23691115wib.48.1395752363756; Tue, 25 Mar 2014 05:59:23 -0700 (PDT) Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) by mx.google.com with ESMTPSA id em1sm50187949wid.5.2014.03.25.05.59.22 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 05:59:22 -0700 (PDT) From: Jani Nikula To: Tomi Ollila , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] build: move canonical list of subdirectories to configure script In-Reply-To: References: <87d2hbhvnq.fsf@zancas.localnet> <1395747624-4411-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.17+153~g4752728 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 25 Mar 2014 13:59:22 +0100 Message-ID: <87pplafn85.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 25 Mar 2014 12:59:34 -0000 On Tue, 25 Mar 2014, Tomi Ollila wrote: > On Tue, Mar 25 2014, David Bremner wrote: > >> The configure script needs this list for out of tree builds. Grabbing >> it from the Makefile via sed was fragile and broken. >> --- > > This is exactly what I was going to suggest if I had the time. > > LGTM. Ditto, seems to work too. > > Tomi > > >> Makefile | 15 +++++---------- >> configure | 8 +++++++- >> 2 files changed, 12 insertions(+), 11 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 061c55a..4c0e8c6 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -2,16 +2,6 @@ >> # given explicitly on the command line) so mention it first. >> 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 >> - >> -# We make all targets depend on the Makefiles themselves. >> -global_deps = Makefile Makefile.config Makefile.local \ >> - $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local) >> - >> # Sub-directory Makefile.local fragments can append to these variables >> # to have directory-specific cflags as necessary. >> >> @@ -27,6 +17,11 @@ extra_cxxflags := >> srcdir ?= . >> >> include Makefile.config >> + >> +# We make all targets depend on the Makefiles themselves. >> +global_deps = Makefile Makefile.config Makefile.local \ >> + $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local) >> + >> Makefile.config: $(srcdir)/configure >> ifeq ($(configure_options),) >> @echo "" >> diff --git a/configure b/configure >> index fb276f1..ab73317 100755 >> --- a/configure >> +++ b/configure >> @@ -19,11 +19,14 @@ readonly DEFAULT_IFS="$IFS" >> >> srcdir=$(dirname "$0") >> >> +subdirs="util compat lib parse-time-string completion doc emacs" >> +subdirs="${subdirs} performance-test test test/test-databases" >> + >> # For a non-srcdir configure invocation (such as ../configure), create >> # the directory structure and copy Makefiles. >> if [ "$srcdir" != "." ]; then >> >> - for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do >> + for dir in . ${subdirs}; do >> mkdir -p "$dir" >> cp "$srcdir"/"$dir"/Makefile.local "$dir" >> cp "$srcdir"/"$dir"/Makefile "$dir" >> @@ -698,6 +701,9 @@ cat > Makefile.config <> # directory (the current directory at the time configure was run). >> srcdir = ${srcdir} >> >> +# subdirectories to build >> +subdirs = ${subdirs} >> + >> configure_options = $@ >> >> # We use vpath directives (rather than the VPATH variable) since the >> -- >> 1.9.0 >> >> _______________________________________________ >> notmuch mailing list >> notmuch@notmuchmail.org >> http://notmuchmail.org/mailman/listinfo/notmuch > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch