From patchwork Fri Nov 9 15:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 10676147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04D0513B0 for ; Fri, 9 Nov 2018 15:15:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E87D728355 for ; Fri, 9 Nov 2018 15:15:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC8D02AAA6; Fri, 9 Nov 2018 15:15:33 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 89B0F28355 for ; Fri, 9 Nov 2018 15:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728159AbeKJA4c (ORCPT ); Fri, 9 Nov 2018 19:56:32 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36054 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbeKJA4c (ORCPT ); Fri, 9 Nov 2018 19:56:32 -0500 Received: by mail-pf1-f196.google.com with SMTP id d13-v6so1064349pfo.3 for ; Fri, 09 Nov 2018 07:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oebZe7joxlGqDUaWI1LPatnF9SWgfZj80er0dGXb9HI=; b=LVNiPuUVRcLxNFFIWHu8xVH59NCOmhNojz68/Z26SOrNXaQGv3v5j631rZjrX9ODBt X/MzRtQlzmd9PKXQVRXv0AAZntOU9Xd4+nTlFasD8JSbBU7caXI81Q7sJyoVP7j2Apdj nxoI4cBvf0MJE6zMfJbJpaOOR33eFYqGragRGhpl96fXw8rIB27fc3j8jE6rMagQJxOB wPAlng+p/Sktq0XwGSM9ZY/JlajmtqqJYCaAk1QVvFeHuzBTh1O622eRGtMaTrDUdIK0 LAzCU3vHSRElCqhoYnMXQz91jbCH3l/F7d9DJO4kqAm40mUt9Zy9YN18jTBZemNLDgnA VsGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=oebZe7joxlGqDUaWI1LPatnF9SWgfZj80er0dGXb9HI=; b=drhk5ZcW1weppEP18+Rr3ud8pFw4iA/BhrSRxmwJvdkrwQrAxC59x62//NTigFhbOW H5JaA/MFldOD+oLHO1yqatq9amUg4zCR/pLDAdIaEBgE5EdmnMg8zQa5gXCdDa2FlWtA jSX4GODP/sgO6TBs4uR5Fc7co5GbCkgxTo7Sxf1WrnBX1/HdiDaOAUDHZH+3Pxr34Mcy hYSz/VerfsMy9h8Wo+FYuW80uS7WF35rAM9U4AWbEvlr2D6oXPqosJQpiatw9opyrWQi LWpZh2CtSeu3IP/m+5iMIwfcSc2fgaAq6N8xCU5l732lC+TYqZ+DRZlzpo3cYEqg9n0V DZng== X-Gm-Message-State: AGRZ1gLb71jUysulp5wNpcCN/Pw0ocpC47JXlsfySrsQzSsKTlcuYpRS f8XSLOmInTc6lsQxt4IeF4FkEw== X-Google-Smtp-Source: AJdET5fUD6itp6fQvyYht5IEjfG6AmOpwIVCCo3/qkYR2PiIttfzxH44+avxHKvJSxuHyLcZofm3ZA== X-Received: by 2002:a63:f74f:: with SMTP id f15mr7861281pgk.190.1541776531546; Fri, 09 Nov 2018 07:15:31 -0800 (PST) Received: from gwendal.mtv.corp.google.com ([2620:15c:202:1:3c8f:512b:3522:dfaf]) by smtp.gmail.com with ESMTPSA id j187-v6sm8096305pfc.43.2018.11.09.07.15.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 07:15:30 -0800 (PST) From: Gwendal Grignou To: osandov@fb.com Cc: linux-block@vger.kernel.org Subject: [PATCH blktests] makefile: Add install rule Date: Fri, 9 Nov 2018 07:15:24 -0800 Message-Id: <20181109151524.50405-1-gwendal@chromium.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add rule to install to a target directory, /usr/local/blktests by default. Signed-off-by: Gwendal Grignou --- Makefile | 9 +++++++++ src/Makefile | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 38b8ad1..d7c2b74 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,18 @@ +prefix ?= /usr/local +dest = $(DESTDIR)$(prefix)/blktests + all: $(MAKE) -C src all clean: $(MAKE) -C src clean +install: + install -m755 -d $(dest) + install check $(dest) + cp -R tests common $(dest) + $(MAKE) -C src dest=$(dest) install + # SC2119: "Use foo "$@" if function's $1 should mean script's $1". False # positives on helpers like _init_scsi_debug. SHELLCHECK_EXCLUDE := SC2119 diff --git a/src/Makefile b/src/Makefile index 15c1022..f0ddbb5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,6 +20,9 @@ all: $(TARGETS) clean: rm -f $(TARGETS) +install: $(TARGETS) + install $(TARGETS) $(dest) + $(C_TARGETS): %: %.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^