PATH cleanup
Subsystems (2)
v6 cover PATH cleanup
Hi all,
Yet another round for this PATH cleanup series, the 6th.
Unlike the previous round, this one does not export PATH, but sets it explicitly in the environment (even for post-build and post-image scripts), so that it clearly appears in the logs.
Yours,
Samuel
Samuel Martin (6):
Makefile: introduce BR_PATH
Makefile: add $(HOST_DIR)/sbin to BR_PATH
*.mk: replace (TARGET|HOST)_PATH by BR_PATH
infra: remove unused {TARGET, HOST}_PATH definition pkg-cmake.mk: add PATH in the configure command environment
Makefile: add PATH to the USER_HOOKS_EXTRA_ENV
Makefile | 3 +++ fs/ext2/ext2.mk | 2 +- package/Makefile.in | 13 +++++-------- package/gpm/gpm.mk | 2 +- package/libhid/libhid.mk | 2 +- package/pkg-cmake.mk | 2 ++ package/pkg-python.mk | 8 ++++---- package/sdl/sdl.mk | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-)
--
1.9.0
PATCH v6 1/6 Makefile: introduce BR_PATH
Since the HOST_PATH and TARGET_PATH variables almost contain the same things, let's factorize this in a single BR_PATH.
---
changes v4 -> v6:
- rebase
- fix comments (Arnout)
changes v3 -> v4:
- rebase
- rename BR2_PATH -> BR_PATH
changes v2 -> v3:
- rebase
changes v1 -> v2:
- rebase
--- Makefile | 3 +++ package/Makefile.in | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-)
Makefile +3 -0
@@ -329,6 +329,9 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf # packages compiled for the host go here HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) +# Quotes are needed for spaces and all in the original PATH content. +BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" + # locales to generate GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))
package/Makefile.in +2 -3
@@ -144,8 +144,7 @@ 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="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" +TARGET_PATH = $(BR_PATH) # Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar
@@ -200,7 +199,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 = $(BR_PATH) # hostcc version as an integer - E.G. 4.3.2 => 432 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
Signature · 1 line
1.9.0
PATCH v6 1/6 Makefile: introduce BR_PATH
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 4 lines
Since the
HOST_PATHandTARGET_PATHvariables almost contain the same things, let's factorize this in a singleBR_PATH.Signed-off-by Samuel Martin <[email protected]>
Regards,
Yann E. MORIN.
Quoted 63 lines
---
changes v4 -> v6:
- rebase
- fix comments (Arnout)changes v3 -> v4:
- rebase
- renameBR2_PATH->BR_PATHchanges v2 -> v3:
- rebasechanges v1 -> v2:
- rebase--- Makefile | 3 +++ package/Makefile.in | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-)Makefile +3
-0@@ -329,6 +329,9 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf # packages compiled for the host go here HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) +# Quotes are needed for spaces and all in the original PATH content. +BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" + # locales to generate GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE))package/Makefile.in +2
-3@@ -144,8 +144,7 @@ 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="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" +TARGET_PATH = $(BR_PATH) # Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar@@ -200,7 +199,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 = $(BR_PATH) # hostcc version as an integer - E.G. 4.3.2 => 432 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \Signature · 6 lines
1.9.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 2/6 Makefile: add $(HOST_DIR)/sbin to BR_PATH
In reply to Samuel MartinExtend BR_PATH because a few host-packages install programs in this location.
---
changes v4 -> v6:
- rebase
changes v3 -> v4:
- rebase
- fix typo in commit log (ThomasP)
- rename BR2_PATH -> BR_PATH
changes v2 -> v3:
- rebase
changes v1 -> v2:
- rebase
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -330,7 +330,7 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) # Quotes are needed for spaces and all in the original PATH content. -BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" +BR_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))
Signature · 1 line
1.9.0
PATCH v6 2/6 Makefile: add $(HOST_DIR)/sbin to BR_PATH
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 4 lines
Extend
BR_PATHbecause a few host-packages install programs in this location.Signed-off-by Samuel Martin <[email protected]>
[--SNIP--]
Makefile TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf · line 333
Quoted 10 lines
Makefile +1
-1@@ -330,7 +330,7 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) # Quotes are needed for spaces and all in the original PATH content. -BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" +BR_PATH:="$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
As seen on IRC, there's still a glitch on that line: it should be using a plain = not a :=
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 3/6 *.mk: replace (TARGET|HOST)_PATH by BR_PATH
In reply to Samuel MartinThanks to the 2 previous patches of the series, BR_PATH contains all locations in which host-packages may install programs.
This patch replaces the occurrences TARGET_PATH and HOST_PATH with BR_PATH, everywhere these variables are used in the *.mk files.
---
changes v4 -> v6:
- rebase
changes v3 -> v4:
- rebase
- fix typo in commit log (ThomasP)
- rename BR2_PATH -> BR_PATH
changes v2 -> v3:
- rebase
changes v1 -> v2:
- rebase
--- fs/ext2/ext2.mk | 2 +- package/Makefile.in | 8 ++++---- package/gpm/gpm.mk | 2 +- package/libhid/libhid.mk | 2 +- package/pkg-python.mk | 8 ++++---- package/sdl/sdl.mk | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-)
fs/ext2/ext2.mk +1 -1
@@ -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=$(BR_PATH) $(EXT2_ENV) fs/ext2/genext2fs.sh -d $(TARGET_DIR) $(EXT2_OPTS) $@ endef rootfs-ext2-symlink:
package/Makefile.in +4 -4
@@ -208,7 +208,7 @@ HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \ HOST_PERL_ARCHNAME := $(shell perl -MConfig -e "print Config->{archname}") export PERL5LIB := $(HOST_DIR)/usr/lib/perl5/$(HOST_PERL_ARCHNAME):$(HOST_DIR)/usr/lib/perl5 -TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ +TARGET_CONFIGURE_OPTS=PATH=$(BR_PATH) \ AR="$(TARGET_AR)" \ AS="$(TARGET_AS)" \ LD="$(TARGET_LD)" \
@@ -245,10 +245,10 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ STAGING_DIR="$(STAGING_DIR)" -TARGET_MAKE_ENV=PATH=$(TARGET_PATH) +TARGET_MAKE_ENV=PATH=$(BR_PATH) -HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \ +HOST_CONFIGURE_OPTS=PATH=$(BR_PATH) \ AR="$(HOSTAR)" \ AS="$(HOSTAS)" \ LD="$(HOSTLD)" \
@@ -270,7 +270,7 @@ HOST_CONFIGURE_OPTS=PATH=$(HOST_PATH) \ PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \ LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" -HOST_MAKE_ENV=PATH=$(HOST_PATH) \ +HOST_MAKE_ENV=PATH=$(BR_PATH) \ LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib:$(LD_LIBRARY_PATH)" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ PKG_CONFIG_SYSROOT_DIR="/" \
package/gpm/gpm.mk +1 -1
@@ -27,7 +27,7 @@ GPM_CONF_OPT = --without-curses # configure is missing but gpm seems not compatible with our autoreconf # mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES define GPM_RUN_AUTOGEN - cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh endef GPM_PRE_CONFIGURE_HOOKS += GPM_RUN_AUTOGEN
package/libhid/libhid.mk +1 -1
@@ -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:$(BR_PATH) LIBHID_CONF_OPT = \ --disable-swig \ --disable-werror \
package/pkg-python.mk +4 -4
@@ -22,7 +22,7 @@ # Target distutils-based packages PKG_PYTHON_DISTUTILS_ENV = \ - PATH="$(TARGET_PATH)" \ + PATH="$(BR_PATH)" \ CC="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \
@@ -40,14 +40,14 @@ PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ # Host distutils-based packages HOST_PKG_PYTHON_DISTUTILS_ENV = \ - PATH="$(HOST_PATH)" + PATH="$(BR_PATH)" HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ --prefix=$(HOST_DIR)/usr # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH="$(TARGET_PATH)" \ + PATH="$(BR_PATH)" \ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \
@@ -61,7 +61,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ # Host setuptools-based packages HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH="$(HOST_PATH)" + PATH="$(BR_PATH)" HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ --prefix=$(HOST_DIR)/usr
package/sdl/sdl.mk +1 -1
@@ -14,7 +14,7 @@ SDL_INSTALL_STAGING = YES # we're patching configure.in, but package cannot autoreconf with our version of # autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES define SDL_RUN_AUTOGEN - cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh endef SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
Signature · 1 line
1.9.0
PATCH v6 3/6 *.mk: replace (TARGET|HOST)_PATH by BR_PATH
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 8 lines
Thanks to the 2 previous patches of the series,
BR_PATHcontains all locations in which host-packages may install programs.This patch replaces the occurrences
TARGET_PATHandHOST_PATHwithBR_PATH, everywhere these variables are used in the *.mk files.Signed-off-by Samuel Martin <[email protected]>
[--SNIP--]
package/pkg-python.mk line 25
Quoted 10 lines
package/pkg-python.mk +1
-1@@ -22,7 +22,7 @@ # Target distutils-based packages PKG_PYTHON_DISTUTILS_ENV = \ - PATH="$(TARGET_PATH)" \ + PATH="$(BR_PATH)" \
Don't you lareday have quotes in the definitions of BR_PATH. From patch 1/1:
BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
So they are not needed here.
That's even worse: the quotes above would nullify the ones in the BR_PATH definition, and if a component in the PATH has a sapce, you're toast. ;-)
package/pkg-python.mk PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ · line 43
Quoted 9 lines
package/pkg-python.mk +1
-1CC="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \@@ -40,14 +40,14 @@ PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ # Host distutils-based packages HOST_PKG_PYTHON_DISTUTILS_ENV = \ - PATH="$(HOST_PATH)" + PATH="$(BR_PATH)"
Ditto.
package/pkg-python.mk PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ · line 50
Quoted 7 lines
package/pkg-python.mk +1
-1HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ --prefix=$(HOST_DIR)/usr # Target setuptools-based packages PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH="$(TARGET_PATH)" \ + PATH="$(BR_PATH)" \
Ditto.
package/pkg-python.mk PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ · line 64
Quoted 9 lines
package/pkg-python.mk +1
-1PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ _python_sysroot=$(STAGING_DIR) \ _python_prefix=/usr \@@ -61,7 +61,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ # Host setuptools-based packages HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ - PATH="$(HOST_PATH)" + PATH="$(BR_PATH)"
Ditto.
package/sdl/sdl.mk SDL_INSTALL_STAGING = YES · line 17
Quoted 12 lines
package/pkg-python.mk +0
-0HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ --prefix=$(HOST_DIR)/usrpackage/sdl/sdl.mk +1
-1@@ -14,7 +14,7 @@ SDL_INSTALL_STAGING = YES # we're patching configure.in, but package cannot autoreconf with our version of # autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES define SDL_RUN_AUTOGEN - cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
Also note how we do not quote BR_PATH here, although this is the exact same conditions as the ones for python, above: passing the variable in the shell environment.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 3/6 *.mk: replace (TARGET|HOST)_PATH by BR_PATH
Samuel, All,
On 2014-03-10 00:05 +0100, Yann E. MORIN spake thusly:
Quoted 16 lines
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 8 lines
Thanks to the 2 previous patches of the series,
BR_PATHcontains all locations in which host-packages may install programs.This patch replaces the occurrences
TARGET_PATHandHOST_PATHwithBR_PATH, everywhere these variables are used in the *.mk files.Signed-off-by Samuel Martin <[email protected]>[--SNIP--]
Quoted 6 lines
package/pkg-python.mk +0
-0@@ -22,7 +22,7 @@
Quoted 6 lines
package/pkg-python.mk line 25
Quoted 4 lines
package/pkg-python.mk +1
-1# Target distutils-based packages PKG_PYTHON_DISTUTILS_ENV = \ - PATH="$(TARGET_PATH)" \ + PATH="$(BR_PATH)" \Don't you lareday have quotes in the definitions of
BR_PATH.
s/lareday/already/
Time to go to bed, I guess... :-/
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 4/6 infra: remove unused {TARGET, HOST}_PATH definition
In reply to Samuel MartinSince the variables TARGET_PATH and HOST_PATH are not used anymore, let's remove them.
---
changes v4 -> v6:
- rebase
changes v3 -> v4:
- rebase
- rename BR2_PATH -> BR_PATH
changes v2 -> v3:
- rebase
- no one-line commit log (ThomasP)
changes v1 -> v2:
- rebase
--- package/Makefile.in | 3 --- 1 file changed, 3 deletions(-)
package/Makefile.in +0 -3
@@ -144,8 +144,6 @@ else TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- endif -TARGET_PATH = $(BR_PATH) - # Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar TARGET_AS = $(TARGET_CROSS)as
@@ -199,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 = $(BR_PATH) # hostcc version as an integer - E.G. 4.3.2 => 432 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \
Signature · 1 line
1.9.0
PATCH v6 4/6 infra: remove unused {TARGET, HOST}_PATH definition
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 4 lines
Since the variables
TARGET_PATHandHOST_PATHare not used anymore, let's remove them.Signed-off-by Samuel Martin <[email protected]>
This one is trivial enough:
Regards,
Yann E. MORIN.
Quoted 46 lines
---
changes v4 -> v6:
- rebasechanges v3 -> v4:
- rebase
- renameBR2_PATH->BR_PATHchanges v2 -> v3:
- rebase
- no one-line commit log (ThomasP)changes v1 -> v2:
- rebase--- package/Makefile.in | 3 --- 1 file changed, 3 deletions(-)package/Makefile.in +0
-3@@ -144,8 +144,6 @@ else TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- endif -TARGET_PATH = $(BR_PATH) - # Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar TARGET_AS = $(TARGET_CROSS)as@@ -199,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 = $(BR_PATH) # hostcc version as an integer - E.G. 4.3.2 => 432 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \Signature · 6 lines
1.9.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 5/6 pkg-cmake.mk: add PATH in the configure command environment
In reply to Samuel MartinBecause BR_PATH is not exported in the environment beforehand running cmake, it is necessary to add it on the cmake configure command.
---
changes v4 -> v6:
- rebase
changes v3 -> v4:
- rebase
- rename BR2_PATH -> BR_PATH
changes v2 -> v3:
- rebase
- no one-line commit log (ThomasP)
changes v1 -> v2:
- remove explicit PATH=... in configure commands in pkg-autotools.mk because it is already added via *_CONFIGURE_OPTS (ThomasP), and reword the commit message.
--- package/pkg-cmake.mk | 2 ++ 1 file changed, 2 insertions(+)
package/pkg-cmake.mk +2 -0
@@ -60,6 +60,7 @@ ifeq ($(4),target) define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ + PATH=$(BR_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=$(BR_PATH) \ $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ -DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
Signature · 1 line
1.9.0
PATCH v6 5/6 pkg-cmake.mk: add PATH in the configure command environment
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 4 lines
Because
BR_PATHis not exported in the environment beforehand running cmake, it is necessary to add it on the cmake configure command.Signed-off-by Samuel Martin <[email protected]>
Regards,
Yann E. MORIN.
Quoted 47 lines
---
changes v4 -> v6:
- rebasechanges v3 -> v4:
- rebase
- renameBR2_PATH->BR_PATHchanges v2 -> v3:
- rebase
- no one-line commit log (ThomasP)changes v1 -> v2:
- remove explicit PATH=... in configure commands in pkg-autotools.mk because it is already added via*_CONFIGURE_OPTS(ThomasP), and reword the commit message.--- package/pkg-cmake.mk | 2 ++ 1 file changed, 2 insertions(+)package/pkg-cmake.mk +2
-0@@ -60,6 +60,7 @@ ifeq ($(4),target) define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ + PATH=$(BR_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=$(BR_PATH) \ $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ -DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \Signature · 6 lines
1.9.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v6 6/6 Makefile: add PATH to the USER_HOOKS_EXTRA_ENV
In reply to Samuel MartinThis can be useful for post-{build,image} scripts, in case some host-tools were specifically built to be used by these scripts.
---
changes v5 -> v6:
- add this cset
--- package/Makefile.in | 1 + 1 file changed, 1 insertion(+)
package/Makefile.in +1 -0
@@ -278,6 +278,7 @@ HOST_MAKE_ENV=PATH=$(BR_PATH) \ # explicitly pass it to user-supplied external hooks (eg. post-build, # post-images) USER_HOOKS_EXTRA_ENV=\ + PATH=$(BR_PATH) \ BUILD_DIR=$(BUILD_DIR) ################################################################################
Signature · 1 line
1.9.0
PATCH v6 6/6 Makefile: add PATH to the USER_HOOKS_EXTRA_ENV
Samuel, All,
On 2014-03-09 15:00 +0100, Samuel Martin spake thusly:
Quoted 5 lines
This can be useful for post-{build,image} scripts, in case some host-tools were specifically built to be used by these scripts.
Signed-off-by Samuel Martin <[email protected]>Cc "Yann E. MORIN" <[email protected]>
Regards,
Yann E. MORIN.
Quoted 22 lines
---
changes v5 -> v6:
- add this cset--- package/Makefile.in | 1 + 1 file changed, 1 insertion(+)package/Makefile.in +1
-0@@ -278,6 +278,7 @@ HOST_MAKE_ENV=PATH=$(BR_PATH) \ # explicitly pass it to user-supplied external hooks (eg. post-build, # post-images) USER_HOOKS_EXTRA_ENV=\ + PATH=$(BR_PATH) \ BUILD_DIR=$(BUILD_DIR) ################################################################################Signature · 1 line
1.9.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'