From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939506AbdAFE1W (ORCPT ); Thu, 5 Jan 2017 23:27:22 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33847 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939481AbdAFE1R (ORCPT ); Thu, 5 Jan 2017 23:27:17 -0500 From: Stafford Horne To: linux-kernel@vger.kernel.org Cc: dvhart@linux.intel.com, linux-kselftest@vger.kernel.org, Stafford Horne Subject: [PATCH] selftests/futex: Fix makefile dependencies Date: Fri, 6 Jan 2017 13:18:39 +0900 Message-Id: <20170106041839.20363-1-shorne@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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