diff mbox series

[OpenWrt-Devel] build: Unset CDPATH to avoid problems

Message ID 20180817102450.13377-1-hauke.mehrtens@intel.com
State Superseded
Delegated to: Hauke Mehrtens
Headers show
Series [OpenWrt-Devel] build: Unset CDPATH to avoid problems | expand

Commit Message

Hauke Mehrtens Aug. 17, 2018, 10:24 a.m. UTC
From: Thomas Langer <thomas.langer@intel.com>

In some places the output of commands, which include "cd" are used.
In case of CDPATH the new path is printed, which might not be expected.
Disable the variable to avoid these problem.

Signed-off-by: Thomas Langer <thomas.langer@intel.com>
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Maksym Ruchko Aug. 17, 2018, 11:41 a.m. UTC | #1
Hi,

nitpick inline

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Hauke Mehrtens
> Sent: Friday 17 August 2018 11:25
> To: openwrt-devel@lists.openwrt.org
> Cc: Hauke Mehrtens <hauke.mehrtens@intel.com>; Thomas Langer
> <thomas.langer@intel.com>
> Subject: [OpenWrt-Devel] build: Unset CDPATH to avoid problems
> 
> From: Thomas Langer <thomas.langer@intel.com>
> 
> In some places the output of commands, which include "cd" are used.
> In case of CDPATH the new path is printed, which might not be expected.
> Disable the variable to avoid these problem.
> 
> Signed-off-by: Thomas Langer <thomas.langer@intel.com>
> Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index e38d44a8..5301883 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -27,6 +27,8 @@ ifneq ($(OPENWRT_BUILD),1)
>    export OPENWRT_BUILD
>    GREP_OPTIONS=
>    export GREP_OPTIONS


> +  CDPATH=
> +  export CDPATH

May be consider  to use  'unset CDPATH' instead of exporting empty var?

>    include $(TOPDIR)/include/debug.mk
>    include $(TOPDIR)/include/depends.mk
>    include $(TOPDIR)/include/toplevel.mk
> --
> 2.10.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Langer, Thomas Aug. 17, 2018, 12:58 p.m. UTC | #2
Hi Maksym,

> >    export GREP_OPTIONS
> 
> 
> > +  CDPATH=
> > +  export CDPATH
> 
> May be consider  to use  'unset CDPATH' instead of exporting empty var?

This is make syntax, unset is not available here.
> 
> >    include $(TOPDIR)/include/debug.mk
> >    include $(TOPDIR)/include/depends.mk
> >    include $(TOPDIR)/include/toplevel.mk
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index e38d44a8..5301883 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,8 @@  ifneq ($(OPENWRT_BUILD),1)
   export OPENWRT_BUILD
   GREP_OPTIONS=
   export GREP_OPTIONS
+  CDPATH=
+  export CDPATH
   include $(TOPDIR)/include/debug.mk
   include $(TOPDIR)/include/depends.mk
   include $(TOPDIR)/include/toplevel.mk