LIBTOOL_HOST_DIR:=$(TOOL_BUILD_DIR)/libtool-$(LIBTOOL_VERSION)-host
LIBTOOL_BINARY:=libtool
LIBTOOL_TARGET_BINARY:=usr/bin/libtool
+LIBTOOL:=$(STAGING_DIR)/usr/bin/libtool
$(DL_DIR)/$(LIBTOOL_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBTOOL_SITE)/$(LIBTOOL_SOURCE)
$(MAKE) -C $(LIBTOOL_HOST_DIR)
touch -c $@
-$(STAGING_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_HOST_DIR)/$(LIBTOOL_BINARY)
+$(LIBTOOL): $(LIBTOOL_HOST_DIR)/$(LIBTOOL_BINARY)
$(MAKE) -C $(LIBTOOL_HOST_DIR) install
rm -rf $(STAGING_DIR)/share/locale
rm -rf $(STAGING_DIR)/usr/share/doc
endif
touch -c $@
-host-libtool: $(STAGING_DIR)/$(LIBTOOL_TARGET_BINARY)
+host-libtool: $(LIBTOOL)
host-libtool-clean:
$(MAKE) -C $(LIBTOOL_HOST_DIR) uninstall
libusb-source: $(DL_DIR)/$(LIBUSB_SOURCE) $(LIBUSB_PATCH)
libusb-unpacked: $(LIBUSB_DIR)/.unpacked
-$(LIBUSB_DIR)/.unpacked: $(AUTOCONF) $(AUTOMAKE) $(STAGING_DIR)/$(LIBTOOL_TARGET_BINARY) $(DL_DIR)/$(LIBUSB_SOURCE)
+$(LIBUSB_DIR)/.unpacked: $(AUTOCONF) $(AUTOMAKE) $(LIBTOOL) $(DL_DIR)/$(LIBUSB_SOURCE)
$(LIBUSB_CAT) $(DL_DIR)/$(LIBUSB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
ifneq ($(LIBUSB_PATCH_FILE),)
(cd $(LIBUSB_DIR) && $(LIBUSB_CAT) $(LIBUSB_PATCH) | patch -p1)