From patchwork Thu Apr 12 21:05:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 10339237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B883600D0 for ; Thu, 12 Apr 2018 21:05:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A3AC28421 for ; Thu, 12 Apr 2018 21:05:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DAAD28484; Thu, 12 Apr 2018 21:05:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3E1828421 for ; Thu, 12 Apr 2018 21:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772AbeDLVF0 (ORCPT ); Thu, 12 Apr 2018 17:05:26 -0400 Received: from mga12.intel.com ([192.55.52.136]:30653 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbeDLVF0 (ORCPT ); Thu, 12 Apr 2018 17:05:26 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 14:05:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,443,1517904000"; d="scan'208";a="32254464" Received: from theros.lm.intel.com ([10.232.112.164]) by fmsmga008.fm.intel.com with ESMTP; 12 Apr 2018 14:05:25 -0700 From: Ross Zwisler To: Andrew Morton Cc: Ross Zwisler , Matthew Wilcox , LKML , Linux MM , linux-fsdevel , Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: [PATCH] radix tree test suite: fix mapshift build target Date: Thu, 12 Apr 2018 15:05:18 -0600 Message-Id: <20180412210518.27557-1-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.14.3 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The following commit commit c6ce3e2fe3da ("radix tree test suite: Add config option for map shift") Introduced a phony makefile target called 'mapshift' that ends up generating the file generated/map-shift.h. This phony target was then added as a dependency of the top level 'targets' build target, which is what is run when you go to tools/testing/radix-tree and just type 'make'. Unfortunately, this phony target doesn't actually work as a dependency, so you end up getting: $ make make: *** No rule to make target 'generated/map-shift.h', needed by 'main.o'. Stop. make: *** Waiting for unfinished jobs.... Fix this by making the file generated/map-shift.h our real makefile target, and add this a dependency of the top level build target. Signed-off-by: Ross Zwisler --- This allows the radix tree test suite that shipped with v4.16 build and run successfully. The radix tree test suite in the current linux/master during the v4.17 merge window is broken, as I've reported here: https://marc.info/?l=linux-fsdevel&m=152356678901014&w=2 But this patch is necessary to even get to that breakage. I've sent this to Matthew twice with no response, so Andrew, I'm trying you next. --- tools/testing/radix-tree/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/radix-tree/Makefile b/tools/testing/radix-tree/Makefile index fa7ee369b3c9..db66f8a0d4be 100644 --- a/tools/testing/radix-tree/Makefile +++ b/tools/testing/radix-tree/Makefile @@ -17,7 +17,7 @@ ifeq ($(BUILD), 32) LDFLAGS += -m32 endif -targets: mapshift $(TARGETS) +targets: generated/map-shift.h $(TARGETS) main: $(OFILES) @@ -42,9 +42,7 @@ radix-tree.c: ../../../lib/radix-tree.c idr.c: ../../../lib/idr.c sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@ -.PHONY: mapshift - -mapshift: +generated/map-shift.h: @if ! grep -qws $(SHIFT) generated/map-shift.h; then \ echo "#define RADIX_TREE_MAP_SHIFT $(SHIFT)" > \ generated/map-shift.h; \