linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: dvhart@linux.intel.com, linux-kselftest@vger.kernel.org,
	Stafford Horne <shorne@gmail.com>
Subject: [PATCH] selftests/futex: Fix makefile dependencies
Date: Fri,  6 Jan 2017 13:18:39 +0900	[thread overview]
Message-ID: <20170106041839.20363-1-shorne@gmail.com> (raw)

I am working on doing selftests for openrisc and found issues with the
futex test is not building after changes to the tests source.

This issue is that the TARGETS variable used in the futex Makefile is
also used by the selftests Makefile, so when building from toplevel the
TARGETS variable is clobbered and nothing gets built. Changed the
variable name to get around that.

Also, the futex makefile did not contain dependencies for all headers,
so if we make changes to logging.h rebuild will not happen. Add headers
to fix it up.

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 tools/testing/selftests/futex/functional/Makefile | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 9d6b75e..1546cbd 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -2,8 +2,11 @@ INCLUDES := -I../include -I../../
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDFLAGS := $(LDFLAGS) -pthread -lrt
 
-HEADERS := ../include/futextest.h
-TARGETS := \
+HEADERS := \
+	../include/futextest.h \
+	../include/atomic.h \
+	../include/logging.h
+TEST_TARGETS := \
 	futex_wait_timeout \
 	futex_wait_wouldblock \
 	futex_requeue_pi \
@@ -12,14 +15,14 @@ TARGETS := \
 	futex_wait_uninitialized_heap \
 	futex_wait_private_mapped_file
 
-TEST_PROGS := $(TARGETS) run.sh
+TEST_PROGS := $(TEST_TARGETS) run.sh
 
 .PHONY: all clean
-all: $(TARGETS)
+all: $(TEST_TARGETS)
 
-$(TARGETS): $(HEADERS)
+$(TEST_TARGETS): $(HEADERS)
 
 include ../../lib.mk
 
 clean:
-	rm -f $(TARGETS)
+	rm -f $(TEST_TARGETS)
-- 
2.9.3

             reply	other threads:[~2017-01-06  4:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  4:18 Stafford Horne [this message]
2017-01-10 22:10 ` [PATCH] selftests/futex: Fix makefile dependencies Darren Hart
2017-01-10 22:17   ` Darren Hart
2017-01-11  4:37     ` Stafford Horne
2017-01-11  8:07       ` Darren Hart
2017-01-11  8:48         ` Stafford Horne
2017-01-11 14:41           ` Shuah Khan
2017-01-11 15:29             ` Stafford Horne

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170106041839.20363-1-shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=dvhart@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).