All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/6] PATH cleanup
@ 2013-11-11 20:59 Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH Samuel Martin
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

All,

Here is some cleanup about the *_PATH variables we carry in the
Buildroot infrastructure.

Note that, I'm not certain whether the last patch of this series, the
one exporting the PATH in the Buildroot environment, should be merged;
though I don't see anything against this.

Yours,
Samuel

Samuel Martin (6):
  Makefile: introduce BR2_PATH
  Makefile: add $(HOST_DIR)/sbin to BR2_PATH
  *.mk: replace (TARGET|HOST)_PATH by BR2_PATH
  infra: remove unused {TARGET,HOST}_PATH definition
  pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command
    environment
  Makefile: export PATH

 Makefile                                   |  4 ++++
 fs/ext2/ext2.mk                            |  2 +-
 package/Makefile.in                        | 12 ++++--------
 package/bustle/bustle.mk                   |  2 +-
 package/libhid/libhid.mk                   |  2 +-
 package/pkg-autotools.mk                   |  2 ++
 package/pkg-cmake.mk                       |  2 ++
 package/python-protobuf/python-protobuf.mk |  2 +-
 8 files changed, 16 insertions(+), 12 deletions(-)

--
1.8.4.2

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

* [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 2/6] Makefile: add $(HOST_DIR)/sbin to BR2_PATH Samuel Martin
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Since the HOST_PATH and TARGET_PATH variables almost contain the same
things, let's factorize this in a single BR2_PATH.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 Makefile            | 3 +++
 package/Makefile.in | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 2f7db59..5a99bbb 100644
--- a/Makefile
+++ b/Makefile
@@ -266,6 +266,9 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 # packages compiled for the host go here
 HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
 
+# Set BR2_PATH (including host bindirs)
+BR2_PATH:="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
+
 # locales to generate
 GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
 
diff --git a/package/Makefile.in b/package/Makefile.in
index 612f3c7..b5829cb 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -145,7 +145,7 @@ TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
 endif
 
 # Quotes are needed for spaces et al in path components.
-TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
+TARGET_PATH = $(BR2_PATH)
 
 # Define TARGET_xx variables for all common binutils/gcc
 TARGET_AR       = $(TARGET_CROSS)ar
@@ -200,7 +200,7 @@ HOST_CFLAGS   ?= -O2
 HOST_CFLAGS   += $(HOST_CPPFLAGS)
 HOST_CXXFLAGS += $(HOST_CFLAGS)
 HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
-HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
+HOST_PATH = $(BR2_PATH)
 
 # hostcc version as an integer - E.G. 4.3.2 => 432
 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
-- 
1.8.4.2

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

* [Buildroot] [PATCH 2/6] Makefile: add $(HOST_DIR)/sbin to BR2_PATH
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 3/6] *.mk: replace (TARGET|HOST)_PATH by BR2_PATH Samuel Martin
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Extend BR2_PATH because few host-packages install programs in this
location.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 5a99bbb..4010c65 100644
--- a/Makefile
+++ b/Makefile
@@ -267,7 +267,7 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR))
 
 # Set BR2_PATH (including host bindirs)
-BR2_PATH:="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
+BR2_PATH:="$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
 
 # locales to generate
 GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
-- 
1.8.4.2

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

* [Buildroot] [PATCH 3/6] *.mk: replace (TARGET|HOST)_PATH by BR2_PATH
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 2/6] Makefile: add $(HOST_DIR)/sbin to BR2_PATH Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 4/6] infra: remove unused {TARGET, HOST}_PATH definition Samuel Martin
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 fs/ext2/ext2.mk                            | 2 +-
 package/Makefile.in                        | 8 ++++----
 package/bustle/bustle.mk                   | 2 +-
 package/libhid/libhid.mk                   | 2 +-
 package/python-protobuf/python-protobuf.mk | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 0af955f..7b96dda 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -24,7 +24,7 @@ EXT2_ENV  = GEN=$(BR2_TARGET_ROOTFS_EXT2_GEN)
 EXT2_ENV += REV=$(BR2_TARGET_ROOTFS_EXT2_REV)
 
 define ROOTFS_EXT2_CMD
-	PATH=$(TARGET_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@
+	PATH=$(BR2_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@
 endef
 
 rootfs-ext2-symlink:
diff --git a/package/Makefile.in b/package/Makefile.in
index b5829cb..7ce84ce 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -206,7 +206,7 @@ HOST_PATH = $(BR2_PATH)
 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
 	sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
 
-TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
+TARGET_CONFIGURE_OPTS=PATH=$(BR2_PATH) \
 		AR="$(TARGET_AR)" \
 		AS="$(TARGET_AS)" \
 		LD="$(TARGET_LD)" \
@@ -244,10 +244,10 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl" \
 		STAGING_DIR="$(STAGING_DIR)"
 
-TARGET_MAKE_ENV=PATH=$(TARGET_PATH) \
+TARGET_MAKE_ENV=PATH=$(BR2_PATH) \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl"
 
-HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
+HOST_CONFIGURE_OPTS=PATH=$(BR2_PATH) \
 		AR="$(HOSTAR)" \
 		AS="$(HOSTAS)" \
 		LD="$(HOSTLD)" \
@@ -268,7 +268,7 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \
 		PERLLIB="$(HOST_DIR)/usr/lib/perl" \
 		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)"
 
-HOST_MAKE_ENV=PATH=$(HOST_PATH) \
+HOST_MAKE_ENV=PATH=$(BR2_PATH) \
 		LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \
 		PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
 		PKG_CONFIG_SYSROOT_DIR="/" \
diff --git a/package/bustle/bustle.mk b/package/bustle/bustle.mk
index 68b7b24..6c6c67f 100644
--- a/package/bustle/bustle.mk
+++ b/package/bustle/bustle.mk
@@ -11,7 +11,7 @@ BUSTLE_LICENSE_FILES = LICENSE
 BUSTLE_DEPENDENCIES = libglib2 libpcap host-pkgconf
 
 define BUSTLE_BUILD_CMDS
-	PATH=$(TARGET_PATH) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+	PATH=$(BR2_PATH) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
 		PCAP_FLAGS='-lpcap' -C $(@D) dist/build/bustle-pcap
 endef
 
diff --git a/package/libhid/libhid.mk b/package/libhid/libhid.mk
index 97aab5d..ba0ad6b 100644
--- a/package/libhid/libhid.mk
+++ b/package/libhid/libhid.mk
@@ -11,7 +11,7 @@ LIBHID_INSTALL_STAGING = YES
 LIBHID_AUTORECONF = YES
 # configure runs libusb-config for cflags/ldflags. Ensure it picks up
 # the target version
-LIBHID_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(TARGET_PATH)
+LIBHID_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR2_PATH)
 LIBHID_CONF_OPT = \
 	--disable-swig \
 	--disable-werror \
diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
index dcf67c2..1ed366e 100644
--- a/package/python-protobuf/python-protobuf.mk
+++ b/package/python-protobuf/python-protobuf.mk
@@ -16,7 +16,7 @@ PYTHON_PROTOBUF_DEPENDENCIES = python host-python-setuptools \
 define PYTHON_PROTOBUF_BUILD_CMDS
 	(cd $(@D)/python; \
 		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
-		PATH=$(HOST_PATH) \
+		PATH=$(BR2_PATH) \
 	$(HOST_DIR)/usr/bin/python setup.py build -x)
 endef
 
-- 
1.8.4.2

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

* [Buildroot] [PATCH 4/6] infra: remove unused {TARGET, HOST}_PATH definition
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
                   ` (2 preceding siblings ...)
  2013-11-11 20:59 ` [Buildroot] [PATCH 3/6] *.mk: replace (TARGET|HOST)_PATH by BR2_PATH Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment Samuel Martin
  2013-11-11 20:59 ` [Buildroot] [PATCH 6/6] Makefile: export PATH Samuel Martin
  5 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/Makefile.in | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 7ce84ce..501a0b3 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -144,9 +144,6 @@ else
 TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
 endif
 
-# Quotes are needed for spaces et al in path components.
-TARGET_PATH = $(BR2_PATH)
-
 # Define TARGET_xx variables for all common binutils/gcc
 TARGET_AR       = $(TARGET_CROSS)ar
 TARGET_AS       = $(TARGET_CROSS)as
@@ -200,7 +197,6 @@ HOST_CFLAGS   ?= -O2
 HOST_CFLAGS   += $(HOST_CPPFLAGS)
 HOST_CXXFLAGS += $(HOST_CFLAGS)
 HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
-HOST_PATH = $(BR2_PATH)
 
 # hostcc version as an integer - E.G. 4.3.2 => 432
 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
-- 
1.8.4.2

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

* [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
                   ` (3 preceding siblings ...)
  2013-11-11 20:59 ` [Buildroot] [PATCH 4/6] infra: remove unused {TARGET, HOST}_PATH definition Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 22:30   ` Thomas Petazzoni
  2013-11-11 20:59 ` [Buildroot] [PATCH 6/6] Makefile: export PATH Samuel Martin
  5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 package/pkg-autotools.mk | 2 ++
 package/pkg-cmake.mk     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index 9523529..b405eb1 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -102,6 +102,7 @@ ifeq ($(5),target)
 # Configure package for target
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
+	PATH=$(BR2_PATH) \
 	$$(TARGET_CONFIGURE_OPTS) \
 	$$(TARGET_CONFIGURE_ARGS) \
 	$$($$(PKG)_CONF_ENV) \
@@ -129,6 +130,7 @@ else
 # installed.
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
+		PATH=$(BR2_PATH) \
 	        $$(HOST_CONFIGURE_OPTS) \
 		CFLAGS="$$(HOST_CFLAGS)" \
 		LDFLAGS="$$(HOST_LDFLAGS)" \
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 0e08722..956fce8 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -62,6 +62,7 @@ ifeq ($(5),target)
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
+	PATH=$(BR2_PATH) \
 	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
 		-DCMAKE_INSTALL_PREFIX="/usr" \
@@ -74,6 +75,7 @@ else
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
+	PATH=$(BR2_PATH) \
 	$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
-- 
1.8.4.2

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
                   ` (4 preceding siblings ...)
  2013-11-11 20:59 ` [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment Samuel Martin
@ 2013-11-11 20:59 ` Samuel Martin
  2013-11-11 22:31   ` Thomas Petazzoni
  5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2013-11-11 20:59 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 4010c65..d587b4f 100644
--- a/Makefile
+++ b/Makefile
@@ -294,6 +294,7 @@ export STAGING_DIR
 export HOST_DIR
 export BINARIES_DIR
 export BASE_DIR
+export PATH:=$(BR2_PATH)
 
 ################################################################################
 #
-- 
1.8.4.2

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

* [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment
  2013-11-11 20:59 ` [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment Samuel Martin
@ 2013-11-11 22:30   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2013-11-11 22:30 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Mon, 11 Nov 2013 21:59:45 +0100, Samuel Martin wrote:

> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 9523529..b405eb1 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -102,6 +102,7 @@ ifeq ($(5),target)
>  # Configure package for target
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
> +	PATH=$(BR2_PATH) \
>  	$$(TARGET_CONFIGURE_OPTS) \
>  	$$(TARGET_CONFIGURE_ARGS) \
>  	$$($$(PKG)_CONF_ENV) \
> @@ -129,6 +130,7 @@ else
>  # installed.
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
> +		PATH=$(BR2_PATH) \
>  	        $$(HOST_CONFIGURE_OPTS) \
>  		CFLAGS="$$(HOST_CFLAGS)" \
>  		LDFLAGS="$$(HOST_LDFLAGS)" \

These two chunks are not needed, since HOST_CONFIGURE_OPTS and
TARGET_CONFIGURE_OPTS already contain PATH=$(BR2_PATH) (you changed
them in PATH 3/6).

> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 0e08722..956fce8 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -62,6 +62,7 @@ ifeq ($(5),target)
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_BUILDDIR) && \
>  	rm -f CMakeCache.txt && \
> +	PATH=$(BR2_PATH) \
>  	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>  		-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
>  		-DCMAKE_INSTALL_PREFIX="/usr" \
> @@ -74,6 +75,7 @@ else
>  define $(2)_CONFIGURE_CMDS
>  	(cd $$($$(PKG)_BUILDDIR) && \
>  	rm -f CMakeCache.txt && \
> +	PATH=$(BR2_PATH) \
>  	$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
>  		-DCMAKE_INSTALL_SO_NO_EXE=0 \
>  		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \

However, I agree with those ones. An user recently reported a problem
that was caused by cmake not having a proper PATH passed into its
environment, and therefore failing to find some Buildroot tools (I
think it was pkg-config).

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-11 20:59 ` [Buildroot] [PATCH 6/6] Makefile: export PATH Samuel Martin
@ 2013-11-11 22:31   ` Thomas Petazzoni
  2013-11-15 20:37     ` Samuel Martin
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2013-11-11 22:31 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 4010c65..d587b4f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -294,6 +294,7 @@ export STAGING_DIR
>  export HOST_DIR
>  export BINARIES_DIR
>  export BASE_DIR
> +export PATH:=$(BR2_PATH)

Why?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-11 22:31   ` Thomas Petazzoni
@ 2013-11-15 20:37     ` Samuel Martin
  2013-11-15 20:53       ` Yann E. MORIN
  0 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2013-11-15 20:37 UTC (permalink / raw)
  To: buildroot

Thomas,


2013/11/11 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

> Dear Samuel Martin,
>
> On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> > ---
> >  Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 4010c65..d587b4f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -294,6 +294,7 @@ export STAGING_DIR
> >  export HOST_DIR
> >  export BINARIES_DIR
> >  export BASE_DIR
> > +export PATH:=$(BR2_PATH)
>
> Why?
>

To me, this could make easier writing post-{build,image} scripts.
But, as I said in the cover letter, I'm dubious about this patch.

Regards,

-- 
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131115/350b7808/attachment.html>

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-15 20:37     ` Samuel Martin
@ 2013-11-15 20:53       ` Yann E. MORIN
  2013-11-17  7:33         ` Peter Korsgaard
  0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2013-11-15 20:53 UTC (permalink / raw)
  To: buildroot

Samuel, Thomas, All,

On 2013-11-15 21:37 +0100, Samuel Martin spake thusly:
> 2013/11/11 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> > Dear Samuel Martin,
> >
> > On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> > > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> > > ---
> > >  Makefile | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 4010c65..d587b4f 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -294,6 +294,7 @@ export STAGING_DIR
> > >  export HOST_DIR
> > >  export BINARIES_DIR
> > >  export BASE_DIR
> > > +export PATH:=$(BR2_PATH)
> >
> > Why?
> >
> 
> To me, this could make easier writing post-{build,image} scripts.

Indeed, it *is* usefull for those scripts.

The first thing I do in br.config is to exactly set PATH to include the
host/usr/bin and host/usr/sbin directories in front of the user's PATH.

But maybe we should just set PATH at the time we call them?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-15 20:53       ` Yann E. MORIN
@ 2013-11-17  7:33         ` Peter Korsgaard
  2014-01-02 19:21           ` Samuel Martin
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Korsgaard @ 2013-11-17  7:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> To me, this could make easier writing post-{build,image} scripts.

 > Indeed, it *is* usefull for those scripts.

 > The first thing I do in br.config is to exactly set PATH to include the
 > host/usr/bin and host/usr/sbin directories in front of the user's PATH.

 > But maybe we should just set PATH at the time we call them?

I *THINK* always adding those host directories to the path would be
safe, as long as it happens after 'which' calls in the toplevel
makefile. This would also allow us to get rid of HOST_PATH / TARGET_PATH
(which are currently not identical, but should be).

But it will need some testing.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 6/6] Makefile: export PATH
  2013-11-17  7:33         ` Peter Korsgaard
@ 2014-01-02 19:21           ` Samuel Martin
  0 siblings, 0 replies; 13+ messages in thread
From: Samuel Martin @ 2014-01-02 19:21 UTC (permalink / raw)
  To: buildroot

Hi all,

2013/11/17 Peter Korsgaard <jacmet@uclibc.org>

> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>
> Hi,
>
>  >> To me, this could make easier writing post-{build,image} scripts.
>
>  > Indeed, it *is* usefull for those scripts.
>
>  > The first thing I do in br.config is to exactly set PATH to include the
>  > host/usr/bin and host/usr/sbin directories in front of the user's PATH.
>
>  > But maybe we should just set PATH at the time we call them?
>
> I *THINK* always adding those host directories to the path would be
> safe, as long as it happens after 'which' calls in the toplevel
> makefile.

This is already the case. :-)


> This would also allow us to get rid of HOST_PATH / TARGET_PATH
> (which are currently not identical, but should be).
>
> But it will need some testing.
>

For what is worth, I use this series on top of master since this first
submission
and I haven't got any problem so far.


>
> --
> Bye, Peter Korsgaard
>

Regards,

-- 
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140102/14f37043/attachment.html>

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

end of thread, other threads:[~2014-01-02 19:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 20:59 [Buildroot] [PATCH 0/6] PATH cleanup Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 1/6] Makefile: introduce BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 2/6] Makefile: add $(HOST_DIR)/sbin to BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 3/6] *.mk: replace (TARGET|HOST)_PATH by BR2_PATH Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 4/6] infra: remove unused {TARGET, HOST}_PATH definition Samuel Martin
2013-11-11 20:59 ` [Buildroot] [PATCH 5/6] pkg-cmake.mk, pkg-autotools.mk: add PATH in the configure command environment Samuel Martin
2013-11-11 22:30   ` Thomas Petazzoni
2013-11-11 20:59 ` [Buildroot] [PATCH 6/6] Makefile: export PATH Samuel Martin
2013-11-11 22:31   ` Thomas Petazzoni
2013-11-15 20:37     ` Samuel Martin
2013-11-15 20:53       ` Yann E. MORIN
2013-11-17  7:33         ` Peter Korsgaard
2014-01-02 19:21           ` Samuel Martin

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.