From patchwork Tue Dec 9 05:23:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yalin" X-Patchwork-Id: 5460271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 891F19F30B for ; Tue, 9 Dec 2014 05:27:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBB4B20155 for ; Tue, 9 Dec 2014 05:27:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D27852013D for ; Tue, 9 Dec 2014 05:27:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XyDHB-00067e-ND; Tue, 09 Dec 2014 05:23:57 +0000 Received: from cnbjrel02.sonyericsson.com ([219.141.167.166]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XyDH8-00066m-MB for linux-arm-kernel@lists.infradead.org; Tue, 09 Dec 2014 05:23:55 +0000 From: "Wang, Yalin" To: "'acme@redhat.com'" , "'bp@suse.de'" , "'mingo@kernel.org'" , "'linux-kernel@vger.kernel.org'" , "'linux-mm@kvack.org'" , "'linux-arm-kernel@lists.infradead.org'" Date: Tue, 9 Dec 2014 13:23:27 +0800 Subject: [PATCH V2] fix build error for vm tools Thread-Topic: [PATCH V2] fix build error for vm tools Thread-Index: AdATYUom+tPgr1R5SteFN9dl+uERSQADuoaA Message-ID: <35FD53F367049845BC99AC72306C23D103E688B313FD@CNBJMBX05.corpusers.net> References: <35FD53F367049845BC99AC72306C23D103E688B313FC@CNBJMBX05.corpusers.net> In-Reply-To: <35FD53F367049845BC99AC72306C23D103E688B313FC@CNBJMBX05.corpusers.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141208_212354_876917_A55D30E6 X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fix the build error when make like this: make O=/xx/x vm use $(OUTPUT) to generate to the right place. Signed-off-by: Yalin Wang --- tools/vm/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 3d907da..2847345 100644 --- a/tools/vm/Makefile +++ b/tools/vm/Makefile @@ -1,22 +1,24 @@ # Makefile for vm tools # +include ../scripts/Makefile.include TARGETS=page-types slabinfo LIB_DIR = ../lib/api -LIBS = $(LIB_DIR)/libapikfs.a +LIBS = $(OUTPUT)../lib/api/libapikfs.a CC = $(CROSS_COMPILE)gcc CFLAGS = -Wall -Wextra -I../lib/ LDFLAGS = $(LIBS) +all: $(TARGETS) $(TARGETS): $(LIBS) $(LIBS): - make -C $(LIB_DIR) + $(call descend,../lib/api libapikfs.a) %: %.c - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) + $(CC) $(CFLAGS) -o $(OUTPUT)$@ $< $(LDFLAGS) clean: - $(RM) page-types slabinfo + $(RM) $(OUTPUT)page-types $(OUTPUT)slabinfo make -C $(LIB_DIR) clean