* [PATCH] test: don't use $(dir) in recipes.
@ 2014-03-08 14:00 David Bremner
2014-03-09 13:17 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2014-03-08 14:00 UTC (permalink / raw)
To: notmuch
According the semantics of make, the expansion of $(dir) in recipes
uses dynamic scope, i.e. the value at the time the recipe is run. This
means if test/Makefile.local is not the last sub-makefile included,
all heck breaks loose.
---
This was originally part of some suggested changes to Jani's folder
series, but no reason to wait for Jani and I to sort that out.
test/Makefile.local | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/Makefile.local b/test/Makefile.local
index 99324ba..36b1c1b 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -2,6 +2,8 @@
dir := test
+# save against changes in $(dir)
+test_src_dir := $(dir)
extra_cflags += -I.
smtp_dummy_srcs = \
@@ -45,7 +47,7 @@ TEST_BINARIES=$(dir)/arg-test \
test-binaries: $(TEST_BINARIES)
test: all test-binaries
- @${dir}/notmuch-test $(OPTIONS)
+ @${test_src_dir}/notmuch-test $(OPTIONS)
check: test
--
1.8.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] test: don't use $(dir) in recipes.
2014-03-08 14:00 [PATCH] test: don't use $(dir) in recipes David Bremner
@ 2014-03-09 13:17 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2014-03-09 13:17 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> According the semantics of make, the expansion of $(dir) in recipes
> uses dynamic scope, i.e. the value at the time the recipe is run. This
> means if test/Makefile.local is not the last sub-makefile included,
> all heck breaks loose.
> ---
>
> This was originally part of some suggested changes to Jani's folder
> series, but no reason to wait for Jani and I to sort that out.
pushed, possibly just at the point when it did make sense to wait
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-09 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-08 14:00 [PATCH] test: don't use $(dir) in recipes David Bremner
2014-03-09 13:17 ` 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).