unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] build: fix out-of-tree builds
@ 2013-05-15 10:58 Jani Nikula
  2013-05-15 15:40 ` David Bremner
  2013-05-25 11:18 ` [PATCH v2] " Jani Nikula
  0 siblings, 2 replies; 8+ messages in thread
From: Jani Nikula @ 2013-05-15 10:58 UTC (permalink / raw)
  To: notmuch

Support for out-of-tree builds was added in
commit 3e4a9d60a9419621b08c647a306843d76c47c2cb
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Mar 9 15:02:42 2011 -0800

    build: Add support for non-source-directory builds.

and broken in
commit 7beeb8c88a014ecbc53d8241f10683b3c4c16228
Author: David Bremner <bremner@debian.org>
Date:   Sat Nov 17 12:28:15 2012 -0400

    test: initial performance testing infrastructure

Fix the build breakage.

Out-of-tree 'make test' has been broken since earlier than the above,
and remains broken, as does out-of-tree perf test, but at least the
build now works.

---

I didn't have the time to dig into the test and perf test breakage.
---
 Makefile                        |    3 +--
 performance-test/Makefile.local |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 73a8554..3301d30 100644
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,7 @@
 all:
 
 # List all subdirectories here. Each contains its own Makefile.local
-subdirs := compat completion emacs lib man parse-time-string
-subdirs += performance-test util test
+subdirs = compat completion emacs lib man parse-time-string performance-test util test
 
 # We make all targets depend on the Makefiles themselves.
 global_deps = Makefile Makefile.config Makefile.local \
diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local
index 73aa963..e47219a 100644
--- a/performance-test/Makefile.local
+++ b/performance-test/Makefile.local
@@ -2,7 +2,7 @@
 
 dir := performance-test
 
-include $(dir)/version.sh
+include $(srcdir)/$(dir)/version.sh
 
 TIME_TEST_SCRIPT := ${dir}/notmuch-time-test
 MEMORY_TEST_SCRIPT := ${dir}/notmuch-memory-test
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] build: fix out-of-tree builds
  2013-05-15 10:58 [PATCH] build: fix out-of-tree builds Jani Nikula
@ 2013-05-15 15:40 ` David Bremner
  2013-05-15 16:31   ` Jani Nikula
  2013-05-25 11:18 ` [PATCH v2] " Jani Nikula
  1 sibling, 1 reply; 8+ messages in thread
From: David Bremner @ 2013-05-15 15:40 UTC (permalink / raw)
  To: Jani Nikula, notmuch

Jani Nikula <jani@nikula.org> writes:
>  # List all subdirectories here. Each contains its own Makefile.local
> -subdirs := compat completion emacs lib man parse-time-string
> -subdirs += performance-test util test
> +subdirs = compat completion emacs lib man parse-time-string performance-test util test

Is this a functional change or a cosmetic one?

d

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] build: fix out-of-tree builds
  2013-05-15 15:40 ` David Bremner
@ 2013-05-15 16:31   ` Jani Nikula
  2013-05-16 11:15     ` David Bremner
  0 siblings, 1 reply; 8+ messages in thread
From: Jani Nikula @ 2013-05-15 16:31 UTC (permalink / raw)
  To: David Bremner, notmuch

On Wed, 15 May 2013, David Bremner <david@tethera.net> wrote:
> Jani Nikula <jani@nikula.org> writes:
>>  # List all subdirectories here. Each contains its own Makefile.local
>> -subdirs := compat completion emacs lib man parse-time-string
>> -subdirs += performance-test util test
>> +subdirs = compat completion emacs lib man parse-time-string performance-test util test
>
> Is this a functional change or a cosmetic one?

Functional. All of it seems to be required for out-of-tree builds (*) to
work. I'm afraid I've forgotten exactly why both := and += make it fail
(I wrote the patch a few months ago).

Jani.


(*) For example:

$ cd /some/empty/dir
$ /path/to/notmuch/configure
$ make

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] build: fix out-of-tree builds
  2013-05-15 16:31   ` Jani Nikula
@ 2013-05-16 11:15     ` David Bremner
  2013-05-16 12:01       ` Tomi Ollila
  0 siblings, 1 reply; 8+ messages in thread
From: David Bremner @ 2013-05-16 11:15 UTC (permalink / raw)
  To: Jani Nikula, notmuch

Jani Nikula <jani@nikula.org> writes:

> On Wed, 15 May 2013, David Bremner <david@tethera.net> wrote:
>> Jani Nikula <jani@nikula.org> writes:
>>>  # List all subdirectories here. Each contains its own Makefile.local
>>> -subdirs := compat completion emacs lib man parse-time-string
>>> -subdirs += performance-test util test
>>> +subdirs = compat completion emacs lib man parse-time-string performance-test util test
>>
>> Is this a functional change or a cosmetic one?
>
> Functional. All of it seems to be required for out-of-tree builds (*) to
> work. I'm afraid I've forgotten exactly why both := and += make it fail
> (I wrote the patch a few months ago).
>

Still I guess it deserves a comment so we don't break it again?

d

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] build: fix out-of-tree builds
  2013-05-16 11:15     ` David Bremner
@ 2013-05-16 12:01       ` Tomi Ollila
  0 siblings, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2013-05-16 12:01 UTC (permalink / raw)
  To: David Bremner, Jani Nikula, notmuch

On Thu, May 16 2013, David Bremner <david@tethera.net> wrote:

> Jani Nikula <jani@nikula.org> writes:
>
>> On Wed, 15 May 2013, David Bremner <david@tethera.net> wrote:
>>> Jani Nikula <jani@nikula.org> writes:
>>>>  # List all subdirectories here. Each contains its own Makefile.local
>>>> -subdirs := compat completion emacs lib man parse-time-string
>>>> -subdirs += performance-test util test
>>>> +subdirs = compat completion emacs lib man parse-time-string performance-test util test
>>>
>>> Is this a functional change or a cosmetic one?
>>
>> Functional. All of it seems to be required for out-of-tree builds (*) to
>> work. I'm afraid I've forgotten exactly why both := and += make it fail
>> (I wrote the patch a few months ago).
>>
>
> Still I guess it deserves a comment so we don't break it again?

The following options could be tested (some day in (distant?) future):

subdirs = compat completion emacs lib man parse-time-string
subdirs += performance-test util test

or 

SUBDIRS := compat completion emacs lib man parse-time-string
SUBDIRS += performance-test util test
subdirs = $(SUBDIRS)

but as Jani has already tested his version works just adding that
comment David asked is the least labor-intensive thing to do --
and therefore IMHO the best thing to do for this case
(for sure I'm not going to spend more time on this now :D).

> d

Tomi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] build: fix out-of-tree builds
  2013-05-15 10:58 [PATCH] build: fix out-of-tree builds Jani Nikula
  2013-05-15 15:40 ` David Bremner
@ 2013-05-25 11:18 ` Jani Nikula
  2013-05-26 11:34   ` Tomi Ollila
  2013-05-26 23:37   ` David Bremner
  1 sibling, 2 replies; 8+ messages in thread
From: Jani Nikula @ 2013-05-25 11:18 UTC (permalink / raw)
  To: notmuch

Support for out-of-tree builds was added in
commit 3e4a9d60a9419621b08c647a306843d76c47c2cb
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Mar 9 15:02:42 2011 -0800

    build: Add support for non-source-directory builds.

and broken in
commit 7beeb8c88a014ecbc53d8241f10683b3c4c16228
Author: David Bremner <bremner@debian.org>
Date:   Sat Nov 17 12:28:15 2012 -0400

    test: initial performance testing infrastructure

Fix the build breakage.

Out-of-tree 'make test' has been broken since earlier than the above,
and remains broken, as does out-of-tree perf test, but at least the
build now works.

---

I didn't have the time to dig into the test and perf test breakage.
---
 Makefile                        |    7 ++++---
 performance-test/Makefile.local |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 73a8554..0428160 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,10 @@
 # given explicitly on the command line) so mention it first.
 all:
 
-# List all subdirectories here. Each contains its own Makefile.local
-subdirs := compat completion emacs lib man parse-time-string
-subdirs += performance-test util test
+# 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 emacs lib man parse-time-string performance-test util test
 
 # We make all targets depend on the Makefiles themselves.
 global_deps = Makefile Makefile.config Makefile.local \
diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local
index 73aa963..e47219a 100644
--- a/performance-test/Makefile.local
+++ b/performance-test/Makefile.local
@@ -2,7 +2,7 @@
 
 dir := performance-test
 
-include $(dir)/version.sh
+include $(srcdir)/$(dir)/version.sh
 
 TIME_TEST_SCRIPT := ${dir}/notmuch-time-test
 MEMORY_TEST_SCRIPT := ${dir}/notmuch-memory-test
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] build: fix out-of-tree builds
  2013-05-25 11:18 ` [PATCH v2] " Jani Nikula
@ 2013-05-26 11:34   ` Tomi Ollila
  2013-05-26 23:37   ` David Bremner
  1 sibling, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2013-05-26 11:34 UTC (permalink / raw)
  To: Jani Nikula, notmuch

On Sat, May 25 2013, Jani Nikula <jani@nikula.org> wrote:

> Support for out-of-tree builds was added in
> commit 3e4a9d60a9419621b08c647a306843d76c47c2cb
> Author: Carl Worth <cworth@cworth.org>
> Date:   Wed Mar 9 15:02:42 2011 -0800
>
>     build: Add support for non-source-directory builds.
>
> and broken in
> commit 7beeb8c88a014ecbc53d8241f10683b3c4c16228
> Author: David Bremner <bremner@debian.org>
> Date:   Sat Nov 17 12:28:15 2012 -0400
>
>     test: initial performance testing infrastructure
>
> Fix the build breakage.
>
> Out-of-tree 'make test' has been broken since earlier than the above,
> and remains broken, as does out-of-tree perf test, but at least the
> build now works.
>
> ---

LGTM.

Tomi


>
> I didn't have the time to dig into the test and perf test breakage.
> ---
>  Makefile                        |    7 ++++---
>  performance-test/Makefile.local |    2 +-
>  2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 73a8554..0428160 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2,9 +2,10 @@
>  # given explicitly on the command line) so mention it first.
>  all:
>  
> -# List all subdirectories here. Each contains its own Makefile.local
> -subdirs := compat completion emacs lib man parse-time-string
> -subdirs += performance-test util test
> +# 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 emacs lib man parse-time-string performance-test util test
>  
>  # We make all targets depend on the Makefiles themselves.
>  global_deps = Makefile Makefile.config Makefile.local \
> diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local
> index 73aa963..e47219a 100644
> --- a/performance-test/Makefile.local
> +++ b/performance-test/Makefile.local
> @@ -2,7 +2,7 @@
>  
>  dir := performance-test
>  
> -include $(dir)/version.sh
> +include $(srcdir)/$(dir)/version.sh
>  
>  TIME_TEST_SCRIPT := ${dir}/notmuch-time-test
>  MEMORY_TEST_SCRIPT := ${dir}/notmuch-memory-test
> -- 
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] build: fix out-of-tree builds
  2013-05-25 11:18 ` [PATCH v2] " Jani Nikula
  2013-05-26 11:34   ` Tomi Ollila
@ 2013-05-26 23:37   ` David Bremner
  1 sibling, 0 replies; 8+ messages in thread
From: David Bremner @ 2013-05-26 23:37 UTC (permalink / raw)
  To: Jani Nikula, notmuch

Jani Nikula <jani@nikula.org> writes:
>
> Out-of-tree 'make test' has been broken since earlier than the above,
> and remains broken, as does out-of-tree perf test, but at least the
> build now works.

pushed,

d

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-26 23:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 10:58 [PATCH] build: fix out-of-tree builds Jani Nikula
2013-05-15 15:40 ` David Bremner
2013-05-15 16:31   ` Jani Nikula
2013-05-16 11:15     ` David Bremner
2013-05-16 12:01       ` Tomi Ollila
2013-05-25 11:18 ` [PATCH v2] " Jani Nikula
2013-05-26 11:34   ` Tomi Ollila
2013-05-26 23:37   ` David Bremner

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).