From patchwork Sun Nov 5 09:44:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Forsman?= X-Patchwork-Id: 10042035 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 8D87F6037D for ; Sun, 5 Nov 2017 09:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80A5A28B2F for ; Sun, 5 Nov 2017 09:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 740D328CF4; Sun, 5 Nov 2017 09:44:41 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 1715B28B2F for ; Sun, 5 Nov 2017 09:44:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750785AbdKEJok (ORCPT ); Sun, 5 Nov 2017 04:44:40 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:55903 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750725AbdKEJoj (ORCPT ); Sun, 5 Nov 2017 04:44:39 -0500 Received: by mail-lf0-f68.google.com with SMTP id e143so7432351lfg.12 for ; Sun, 05 Nov 2017 01:44:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zRnPt1sIhtEFXzrbNLPOw3RJPpkGp/R4dX7WykKGUtE=; b=J1S6JmLMuayV58IDlJfg+/9A08Cz04PtWm1BJyak5/HC7qraepR4JnRcPDxXUYbCJM NefldeZAoKx5CxBpTo3cZYqXmL13gHy8zobgBlvcK2U7ydCC/Rnt+AJDwANgtQTii+64 KXOpl1vbWQwNVeV4S3xyCuS33Z6Yl9adjh2Ds1ugKXC5nhSlVC3NQb9ykdC8se2pzoRq 2VKtvpbICthcR+kWt66ikrSWM02fNqGTUWW+S2GQvxEjAVB8maBRqed0YCE9yswoiZtS Gn7MTMOp3rLJz8rmdq08PWRC+i/Jho161AeCVbj9tMCfbLH5SpBPDx3PNiJY8/PEoynB d1/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zRnPt1sIhtEFXzrbNLPOw3RJPpkGp/R4dX7WykKGUtE=; b=rt9zCNxFWaEJrKX6bGzpT7Uj8o+BY2AgthgqnO5/PWw7LZDXtpHL5W1hZL54eddI/6 BcT8SS+MubvTHFK8kkHK57tVN2h4jMdJNtHboX2915taiZVUl2I0B1kHBwm4V73GaluP HMOXMc99RJ1P/XsGX9ds/tVOTWHb76mXqJf1Y1PiGF62NNesNaTcWaE//LVelgNsjg+j xl3bERG8jSFobONgXJ26Q457PvNNsVIkcQAWS0KRZevuZO9MLx0lxVWAvZWaV0uS9EYu Ur2T/yOMI7VA82KzcTehqeCJHFV+Vs12/aneSOTnGF8ZN6lU0fZ7wW1gjgy8vvAZrvnC V03w== X-Gm-Message-State: AJaThX4OL+SCSuNA+lbFvLPMdeps34d2Bq8xLbGxiXP3bQB3SKey1N5L nMJiSiq33ue8ugdGwZnLVASW X-Google-Smtp-Source: ABhQp+RafTPotQo0jq+N0WmLKcNxwcFY/JJtyFd/sPB6jK11Sp9VVHKbfVZQzOjXdvKaqhZ52MyEbQ== X-Received: by 10.46.88.9 with SMTP id m9mr432464ljb.15.1509875077281; Sun, 05 Nov 2017 01:44:37 -0800 (PST) Received: from localhost (cm-84.208.204.216.getinternet.no. [84.208.204.216]) by smtp.gmail.com with ESMTPSA id r22sm2134213ljr.16.2017.11.05.01.44.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 01:44:36 -0800 (PST) From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= To: linux-kbuild@vger.kernel.org Cc: yamada.masahiro@socionext.com, mmarek@suse.com, =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Subject: [PATCH] kbuild: /bin/pwd -> pwd Date: Sun, 5 Nov 2017 10:44:16 +0100 Message-Id: <20171105094416.12220-1-bjorn.forsman@gmail.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most places use pwd and rely on $PATH lookup. Moving the remaining absolute path /bin/pwd users over for consistency. Also, a reason for doing /bin/pwd -> pwd instead of the other way around is because I believe build systems should make little assumptions on host filesystem layout. Case in point, we do this kind of patching already in NixOS. Ref. commit 028568d84da3cfca49f5f846eeeef01441d70451 ("kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd)"). Signed-off-by: Bjørn Forsman --- Documentation/ia64/xen.txt | 2 +- Makefile | 2 +- tools/power/cpupower/Makefile | 2 +- tools/scripts/Makefile.include | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/ia64/xen.txt b/Documentation/ia64/xen.txt index c61a99f7c8bb..a12c74ce2773 100644 --- a/Documentation/ia64/xen.txt +++ b/Documentation/ia64/xen.txt @@ -41,7 +41,7 @@ Getting and Building Xen and Dom0 5. make initrd for Dom0/DomU # make -C linux-2.6.18-xen.hg ARCH=ia64 modules_install \ - O=$(/bin/pwd)/build-linux-2.6.18-xen_ia64 + O=$(pwd)/build-linux-2.6.18-xen_ia64 # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.18.8-xen.img \ 2.6.18.8-xen --builtin mptspi --builtin mptbase \ --builtin mptscsih --builtin uhci-hcd --builtin ohci-hcd \ diff --git a/Makefile b/Makefile index 3a8868ee967e..a3eed17080b0 100644 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ ifneq ($(KBUILD_OUTPUT),) # check that the output directory actually exists saved-output := $(KBUILD_OUTPUT) KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ - && /bin/pwd) + && pwd) $(if $(KBUILD_OUTPUT),, \ $(error failed to create output directory "$(saved-output)")) diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index d6e1c02ddcfe..c76b971d0423 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -26,7 +26,7 @@ endif ifneq ($(OUTPUT),) # check that the output directory actually exists -OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) +OUTDIR := $(shell cd $(OUTPUT) && pwd) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) endif diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index 654efd9768fd..3fab179b1aba 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -13,7 +13,7 @@ endif # check that the output directory actually exists ifneq ($(OUTPUT),) -OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) +OUTDIR := $(shell cd $(OUTPUT) && pwd) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) endif