All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: /bin/pwd -> pwd
@ 2017-11-05  9:44 Bjørn Forsman
  2017-11-18  2:35 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørn Forsman @ 2017-11-05  9:44 UTC (permalink / raw)
  To: linux-kbuild; +Cc: yamada.masahiro, mmarek, Bjørn Forsman

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 <bjorn.forsman@gmail.com>
---
 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
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] kbuild: /bin/pwd -> pwd
  2017-11-05  9:44 [PATCH] kbuild: /bin/pwd -> pwd Bjørn Forsman
@ 2017-11-18  2:35 ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2017-11-18  2:35 UTC (permalink / raw)
  To: Bjørn Forsman; +Cc: Linux Kbuild mailing list, Michal Marek

2017-11-05 18:44 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
> 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 <bjorn.forsman@gmail.com>
> ---
>  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


Applied to linux-kbuild/kbuild.  Thanks!

I will try my best to push this in the current MW.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] kbuild: /bin/pwd -> pwd
  2017-08-16 15:31     ` Masahiro Yamada
@ 2017-08-16 16:14       ` Bjørn Forsman
  0 siblings, 0 replies; 7+ messages in thread
From: Bjørn Forsman @ 2017-08-16 16:14 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kbuild mailing list, Michal Marek, Jan Kiszka, Kieran Bingham

On 16 August 2017 at 17:31, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2017-08-12 21:00 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
>> On 12 August 2017 at 05:26, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>>> [...]
>>> The difference between them is that
>>> $(realpath ...) returns an empty string if the given path does not exist.
>>
>> That sounds like possibly changing semantics. I'd prefer to keep the
>> patch as is, since I'm not familiar with the side effects of inserting
>> relative vs absolute paths here. Is that OK for you?
>
> I prefer abspath/realpath.
>
> If you are reluctant to do it, I will take a look.

Yes please. I only care about getting rid of /bin/pwd (absolute path).

Best regards,
Bjørn Forsman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] kbuild: /bin/pwd -> pwd
  2017-08-12 12:00   ` Bjørn Forsman
@ 2017-08-16 15:31     ` Masahiro Yamada
  2017-08-16 16:14       ` Bjørn Forsman
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2017-08-16 15:31 UTC (permalink / raw)
  To: Bjørn Forsman
  Cc: Linux Kbuild mailing list, Michal Marek, Jan Kiszka, Kieran Bingham

Hi.


2017-08-12 21:00 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
> Hi,
>
> On 12 August 2017 at 05:26, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Hi.
>>
>> 2017-07-24 23:20 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
>>> Several places already use pwd and rely on $PATH lookup. Moving the
>>> remaining /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.
>> [...]
>> Could you use $(abspath ...) instead of $(shell cd ... && /bin/pwd) ?
>> [...]
>> This one should use $(realpath ...) instead of $(abspath ...), I think.
>>
>> The difference between them is that
>> $(realpath ...) returns an empty string if the given path does not exist.
>
> That sounds like possibly changing semantics. I'd prefer to keep the
> patch as is, since I'm not familiar with the side effects of inserting
> relative vs absolute paths here. Is that OK for you?
>

I prefer abspath/realpath.

If you are reluctant to do it, I will take a look.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] kbuild: /bin/pwd -> pwd
  2017-08-12  3:26 ` Masahiro Yamada
@ 2017-08-12 12:00   ` Bjørn Forsman
  2017-08-16 15:31     ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørn Forsman @ 2017-08-12 12:00 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kbuild mailing list, Michal Marek, Jan Kiszka, kieran

Hi,

On 12 August 2017 at 05:26, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi.
>
> 2017-07-24 23:20 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
>> Several places already use pwd and rely on $PATH lookup. Moving the
>> remaining /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.
> [...]
> Could you use $(abspath ...) instead of $(shell cd ... && /bin/pwd) ?
> [...]
> This one should use $(realpath ...) instead of $(abspath ...), I think.
>
> The difference between them is that
> $(realpath ...) returns an empty string if the given path does not exist.

That sounds like possibly changing semantics. I'd prefer to keep the
patch as is, since I'm not familiar with the side effects of inserting
relative vs absolute paths here. Is that OK for you?

Best regards,
Bjørn Forsman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] kbuild: /bin/pwd -> pwd
  2017-07-24 14:20 Bjørn Forsman
@ 2017-08-12  3:26 ` Masahiro Yamada
  2017-08-12 12:00   ` Bjørn Forsman
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2017-08-12  3:26 UTC (permalink / raw)
  To: Bjørn Forsman
  Cc: Linux Kbuild mailing list, Michal Marek, Jan Kiszka, kieran

Hi.


2017-07-24 23:20 GMT+09:00 Bjørn Forsman <bjorn.forsman@gmail.com>:
> Several places already use pwd and rely on $PATH lookup. Moving the
> remaining /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.
>
> Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>


Kbuild conventionally used  $(shell cd foo/bar && /bin/pwd)
to get the absolute path because the minimum supported
GNU Makefile version was 3.80 and $(abspath ...) is only supported
by 3.81 or later.


Commit 37d69ee3080 bumped the min version to 3.81,
so it is legitimate to use $(abspath ).

Could you use $(abspath ...) instead of $(shell cd ... && /bin/pwd) ?






> ---
>  Documentation/ia64/xen.txt |  2 +-
>  Makefile                   | 10 +++++-----
>  scripts/gdb/linux/Makefile |  2 +-
>  3 files changed, 7 insertions(+), 7 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 b4fb9a1d1594..64e72eba5701 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -131,7 +131,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)"))

This one should use $(realpath ...) instead of $(abspath ...), I think.

The difference between them is that
$(realpath ...) returns an empty string if the given path does not exist.







> @@ -978,7 +978,7 @@ ifdef CONFIG_HEADERS_CHECK
>         $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
>  endif
>  ifdef CONFIG_GDB_SCRIPTS
> -       $(Q)ln -fsn `cd $(srctree) && /bin/pwd`/scripts/gdb/vmlinux-gdb.py
> +       $(Q)ln -fsn `cd $(srctree) && pwd`/scripts/gdb/vmlinux-gdb.py
>  endif
>  ifdef CONFIG_TRIM_UNUSED_KSYMS
>         $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
> @@ -1237,7 +1237,7 @@ _modinst_:
>         @rm -rf $(MODLIB)/kernel
>         @rm -f $(MODLIB)/source
>         @mkdir -p $(MODLIB)/kernel
> -       @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
> +       @ln -s `cd $(srctree) && pwd` $(MODLIB)/source
>         @if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
>                 rm -f $(MODLIB)/build ; \
>                 ln -s $(CURDIR) $(MODLIB)/build ; \
> @@ -1629,11 +1629,11 @@ image_name:
>  # Clear a bunch of variables before executing the submake
>  tools/: FORCE
>         $(Q)mkdir -p $(objtree)/tools
> -       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/
> +       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && pwd) subdir=tools -C $(src)/tools/
>
>  tools/%: FORCE
>         $(Q)mkdir -p $(objtree)/tools
> -       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $*
> +       $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && pwd) subdir=tools -C $(src)/tools/ $*
>
>  # Single targets
>  # ---------------------------------------------------------------------------
> diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
> index 8b00031f5349..f1ac5db46932 100644
> --- a/scripts/gdb/linux/Makefile
> +++ b/scripts/gdb/linux/Makefile
> @@ -1,6 +1,6 @@
>  always := gdb-scripts
>
> -SRCTREE := $(shell cd $(srctree) && /bin/pwd)
> +SRCTREE := $(shell cd $(srctree) && pwd)
>
>  $(obj)/gdb-scripts:
>  ifneq ($(KBUILD_SRC),)
> --
> 2.12.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] kbuild: /bin/pwd -> pwd
@ 2017-07-24 14:20 Bjørn Forsman
  2017-08-12  3:26 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørn Forsman @ 2017-07-24 14:20 UTC (permalink / raw)
  To: linux-kbuild
  Cc: yamada.masahiro, mmarek, jan.kiszka, kieran, Bjørn Forsman

Several places already use pwd and rely on $PATH lookup. Moving the
remaining /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.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
---
 Documentation/ia64/xen.txt |  2 +-
 Makefile                   | 10 +++++-----
 scripts/gdb/linux/Makefile |  2 +-
 3 files changed, 7 insertions(+), 7 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 b4fb9a1d1594..64e72eba5701 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,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)"))
 
@@ -978,7 +978,7 @@ ifdef CONFIG_HEADERS_CHECK
 	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
 endif
 ifdef CONFIG_GDB_SCRIPTS
-	$(Q)ln -fsn `cd $(srctree) && /bin/pwd`/scripts/gdb/vmlinux-gdb.py
+	$(Q)ln -fsn `cd $(srctree) && pwd`/scripts/gdb/vmlinux-gdb.py
 endif
 ifdef CONFIG_TRIM_UNUSED_KSYMS
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
@@ -1237,7 +1237,7 @@ _modinst_:
 	@rm -rf $(MODLIB)/kernel
 	@rm -f $(MODLIB)/source
 	@mkdir -p $(MODLIB)/kernel
-	@ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
+	@ln -s `cd $(srctree) && pwd` $(MODLIB)/source
 	@if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
 		rm -f $(MODLIB)/build ; \
 		ln -s $(CURDIR) $(MODLIB)/build ; \
@@ -1629,11 +1629,11 @@ image_name:
 # Clear a bunch of variables before executing the submake
 tools/: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && pwd) subdir=tools -C $(src)/tools/
 
 tools/%: FORCE
 	$(Q)mkdir -p $(objtree)/tools
-	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && /bin/pwd) subdir=tools -C $(src)/tools/ $*
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(shell cd $(objtree) && pwd) subdir=tools -C $(src)/tools/ $*
 
 # Single targets
 # ---------------------------------------------------------------------------
diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
index 8b00031f5349..f1ac5db46932 100644
--- a/scripts/gdb/linux/Makefile
+++ b/scripts/gdb/linux/Makefile
@@ -1,6 +1,6 @@
 always := gdb-scripts
 
-SRCTREE := $(shell cd $(srctree) && /bin/pwd)
+SRCTREE := $(shell cd $(srctree) && pwd)
 
 $(obj)/gdb-scripts:
 ifneq ($(KBUILD_SRC),)
-- 
2.12.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-18  2:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05  9:44 [PATCH] kbuild: /bin/pwd -> pwd Bjørn Forsman
2017-11-18  2:35 ` Masahiro Yamada
  -- strict thread matches above, loose matches on Subject: below --
2017-07-24 14:20 Bjørn Forsman
2017-08-12  3:26 ` Masahiro Yamada
2017-08-12 12:00   ` Bjørn Forsman
2017-08-16 15:31     ` Masahiro Yamada
2017-08-16 16:14       ` Bjørn Forsman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.