]> git.notmuchmail.org Git - notmuch/commitdiff
test: don't use $(dir) in recipes.
authorDavid Bremner <david@tethera.net>
Sat, 8 Mar 2014 14:00:39 +0000 (10:00 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 9 Mar 2014 13:02:57 +0000 (10:02 -0300)
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.

test/Makefile.local

index 99324ba1e75b790cdc298337b8b6a51c35649ce0..36b1c1b71de08f598f4b9e314170a3e186c14ec4 100644 (file)
@@ -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