Skip to contentSkip to conversation

PATH cleanup

PATCH Superseded Samuel Martin 2 participants 6 messages Jan 18, 2014 – Jan 27, 2014

Subsystems (2)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v2 cover PATH cleanup

All,

Here is the 2nd round of the PATH cleanup series.
Not that much to say about this new round (the changes are mostly due to the rebasing onto master).

Note that I've re-posted the following patches because they are unchanged and still apply properly on master:
* patch 1/6: http://patchwork.ozlabs.org/patch/290493/
* patch 2/6: http://patchwork.ozlabs.org/patch/290494/
* patch 4/6: http://patchwork.ozlabs.org/patch/290495/

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: 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-cmake.mk     |  2 ++
 package/pkg-python.mk    |  8 ++++----
 package/sdl/sdl.mk       |  2 +-
 8 files changed, 18 insertions(+), 16 deletions(-)

--
1.8.5.3

#1 lore raw

PATCH v2 3/6 *.mk: replace (TARGET|HOST)_PATH by BR2_PATH

---
changes v1 -> v2:
- make substitution of new occurenrces (pkg-python.mk and sdl.mk)

---
 fs/ext2/ext2.mk          | 2 +-
 package/Makefile.in      | 8 ++++----
 package/bustle/bustle.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
index 0af955f..7b96dda 100644
@@ -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:
package/Makefile.in +4 -4
index a940f54..bf6efe1 100644
@@ -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)" \
@@ -270,7 +270,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="/" \
package/bustle/bustle.mk +1 -1
index 2330c08..c488dfa 100644
@@ -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
 
package/libhid/libhid.mk +1 -1
index 97aab5d..ba0ad6b 100644
@@ -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 \
package/pkg-python.mk +4 -4
index 79e6bcf..357ed8d 100644
@@ -22,7 +22,7 @@
 
 # Target distutils-based packages
 PKG_PYTHON_DISTUTILS_ENV = \
-	PATH="$(TARGET_PATH)" \
+	PATH="$(BR2_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="$(BR2_PATH)"
 
 HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \
 	--prefix=$(HOST_DIR)/usr
 
 # Target setuptools-based packages
 PKG_PYTHON_SETUPTOOLS_ENV = \
-	PATH="$(TARGET_PATH)" \
+	PATH="$(BR2_PATH)" \
 	PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
 	PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
 	CROSS_COMPILING=yes \
@@ -63,7 +63,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \
 
 # Host setuptools-based packages
 HOST_PKG_PYTHON_SETUPTOOLS_ENV = \
-	PATH="$(HOST_PATH)" \
+	PATH="$(BR2_PATH)" \
 	PYTHONXCPREFIX="$(HOST_DIR)/usr/"
 
 HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \
package/sdl/sdl.mk +1 -1
index ba5fbca..4789ea2 100644
@@ -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 SD_AUTORECONF = YES
 define SDL_RUN_AUTOGEN
-	cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh
+	cd $(@D) && PATH=$(BR2_PATH) ./autogen.sh
 endef
 
 SDL_POST_PATCH_HOOKS += SDL_RUN_AUTOGEN
Signature · 1 line
1.8.5.3
#2 lore raw

PATCH v2 3/6 *.mk: replace (TARGET|HOST)_PATH by BR2_PATH

Dear Samuel Martin,

Quoted 1 line · Samuel Martin

Please give a proper commit log for this patch, as well as for PATCH 5/6.

I have already asked multiple times to do this, and you continue to send patches without a proper commit log. A good rule of thumb is that *all* commits should always have a non-empty commit log. The commit title is very often insufficient to explain *why* the commit is made.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 5/6 pkg-cmake.mk: add PATH in the configure command environment

In reply to Samuel Martin

---
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
index 463cd63..36d8648 100644
@@ -61,6 +61,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" \
@@ -73,6 +74,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)" \
Signature · 1 line
1.8.5.3
#4 lore raw

PATCH v2 6/6 Makefile: export PATH

In reply to Samuel Martin

This can be useful for:
- package using custom build system that are not aware that the host tree is in $(O)/host/;
- post-{build,image} scripts, in case some host-tools were specifically built to be used by these scripts.

---
changes v1 -> v2:
- extend commit message

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index a9178aa..a8e1585 100644
@@ -332,6 +332,7 @@ export STAGING_DIR
 export HOST_DIR
 export BINARIES_DIR
 export BASE_DIR
+export PATH:=$(BR2_PATH)
 
 ################################################################################
 #
Signature · 1 line
1.8.5.3
#5 lore raw

v2 cover PATH cleanup

In reply to Samuel Martin

Dear Samuel Martin,

Quoted 2 lines · Samuel Martin

Note that I've re-posted the following patches because they are unchanged and still apply properly on master:

Please always post complete patch series, even if some of the patches haven't changed. It's very confusing to receive partial patch series, and it also makes things confusing to handle in patchwork.

Thanks!

Thomas

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