From: Jani Nikula <jani@nikula.org>
To: Tomi Ollila <tomi.ollila@iki.fi>,
David Bremner <david@tethera.net>,
notmuch@notmuchmail.org
Subject: Re: [PATCH] build: move canonical list of subdirectories to configure script
Date: Tue, 25 Mar 2014 13:59:22 +0100 [thread overview]
Message-ID: <87pplafn85.fsf@nikula.org> (raw)
In-Reply-To: <m2a9cejw79.fsf@guru.guru-group.fi>
On Tue, 25 Mar 2014, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Tue, Mar 25 2014, David Bremner <david@tethera.net> 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 <<EOF
>> # 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
next prev parent reply other threads:[~2014-03-25 12:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 0:48 out of tree build fixes David Bremner
2014-03-20 0:48 ` [PATCH 1/3] build: compute subdirectories from the presence of Makefile.local David Bremner
2014-03-25 2:14 ` David Bremner
2014-03-25 11:40 ` [PATCH] build: move canonical list of subdirectories to configure script David Bremner
2014-03-25 12:31 ` Tomi Ollila
2014-03-25 12:59 ` Jani Nikula [this message]
2014-03-20 0:48 ` [PATCH 2/3] doc: fix out-of-tree build David Bremner
2014-03-20 0:48 ` [PATCH 3/3] test: use $(srcdir) instead of . as include path David Bremner
2014-03-20 10:29 ` out of tree build fixes Tomi Ollila
2014-03-22 17:27 ` Jani Nikula
2014-03-25 22:48 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pplafn85.fsf@nikula.org \
--to=jani@nikula.org \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).