fs/common.mk: unbreak .xz compression when host-xz isn't built
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 4 Jun 2014 06:33:17 +0000 (08:33 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 4 Jun 2014 06:33:17 +0000 (08:33 +0200)
Closes #7160

Since f46f81de1315 (Don't build host-xz needlessly), host-xz is no longer
unconditionally built when xz fs compression is requested, so don't
explicitly refer to it.

Instead, rely on our check-host-xzcat logic to ensure xz is available and
set the path to ensure our host variant gets picked up if not available on
the build machine.

While we're at it, get rid of the now unused XZ variable.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
fs/common.mk
package/xz/xz.mk

index 919db2561cb972a59b1595621a1dfa328f196f7a..2adaf8ce832f82cf2ae4d57f0b1cbc4eb9acbf03 100644 (file)
@@ -61,7 +61,7 @@ ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) -9 -c
 endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y)
 ROOTFS_$(2)_COMPRESS_EXT = .xz
-ROOTFS_$(2)_COMPRESS_CMD = $$(XZ) -9 -C crc32 -c
+ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
 endif
 
 $$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
@@ -90,7 +90,7 @@ endif
        $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
        -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
 ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
-       $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
+       PATH=$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
 endif
 
 rootfs-$(1)-show-depends:
index af90f05919a2614dca2c3d6e3559a58162d147e9..0ecd049092c3c29af63589d175883a5230fcd636 100644 (file)
@@ -14,5 +14,3 @@ XZ_LICENSE_FILES = COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-
-XZ = $(HOST_DIR)/usr/bin/xz