- lzma needs a CXX cross-compiler
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jul 2007 16:13:00 +0000 (16:13 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jul 2007 16:13:00 +0000 (16:13 -0000)
- minor cleanups while at it

package/lzma/Config.in
package/lzma/lzma.mk

index 774d7711b696ccefaeba340fdaba3aebb766de8c..a72616fa9bc2c9ffdc2c8f3026e26c75d39342e6 100644 (file)
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LZMA_TARGET
        bool "Install lzma for the target system"
        default n
+       select BR2_GCC_CROSS_CXX
        help
          lzma utils on the target
 
index 49a426ecdd3cac97511d74d593d84fdd1866a68a..ed511c9e030cb30ca257debd5d1c186a5e975fbf 100644 (file)
@@ -24,19 +24,19 @@ $(DL_DIR)/$(LZMA_SOURCE):
 #
 ######################################################################
 
-$(LZMA_HOST_DIR)/.source: $(DL_DIR)/$(LZMA_SOURCE)
+$(LZMA_HOST_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE)
        $(LZMA_CAT) $(DL_DIR)/$(LZMA_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
        toolchain/patch-kernel.sh $(LZMA_HOST_DIR) package/lzma/ lzma\*.patch
-       touch $(LZMA_HOST_DIR)/.source
+       touch $@
 
-$(LZMA_HOST_DIR)/.configured: $(LZMA_HOST_DIR)/.source
+$(LZMA_HOST_DIR)/.configured: $(LZMA_HOST_DIR)/.unpacked
        (cd $(LZMA_HOST_DIR); rm -f config.cache ;\
                CC="$(HOSTCC)" \
                CXX="$(HOSTCXX)" \
                ./configure \
                --prefix=/ \
        );
-       touch $(LZMA_HOST_DIR)/.configured;
+       touch $@
 
 $(LZMA_HOST_DIR)/src/lzma/lzma: $(LZMA_HOST_DIR)/.configured
        $(MAKE) -C $(LZMA_HOST_DIR) all
@@ -45,20 +45,24 @@ $(LZMA_HOST_DIR)/src/lzma/lzma: $(LZMA_HOST_DIR)/.configured
 $(STAGING_DIR)/bin/lzma: $(LZMA_HOST_DIR)/src/lzma/lzma
        $(MAKE) DESTDIR=$(STAGING_DIR) -C $(LZMA_HOST_DIR) install
 
-lzma-host: uclibc $(STAGING_DIR)/bin/lzma
-
+lzma-host: $(STAGING_DIR)/bin/lzma
+lzma-host-clean:
+       rm -f $(STAGING_DIR)/bin/lzma
+       -$(MAKE) -C $(LZMA_HOST_DIR) clean
+lzma-host-dirclean:
+       rm -rf $(LZMA_HOST_DIR)
 ######################################################################
 #
 # lzma target
 #
 ######################################################################
 
-$(LZMA_TARGET_DIR)/.source: $(DL_DIR)/$(LZMA_SOURCE)
+$(LZMA_TARGET_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE)
        $(LZMA_CAT) $(DL_DIR)/$(LZMA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
        toolchain/patch-kernel.sh $(LZMA_TARGET_DIR) package/lzma/ lzma\*.patch
-       touch $(LZMA_TARGET_DIR)/.source
+       touch $@
 
-$(LZMA_TARGET_DIR)/.configured: $(LZMA_TARGET_DIR)/.source
+$(LZMA_TARGET_DIR)/.configured: $(LZMA_TARGET_DIR)/.unpacked
        (cd $(LZMA_TARGET_DIR); rm -f config.cache ;\
                $(TARGET_CONFIGURE_OPTS) \
                $(TARGET_CONFIGURE_ARGS) \
@@ -76,7 +80,7 @@ $(LZMA_TARGET_DIR)/.configured: $(LZMA_TARGET_DIR)/.source
                $(DISABLE_NLS) \
                $(DISABLE_LARGEFILE) \
        );
-       touch $(LZMA_TARGET_DIR)/.configured;
+       touch $@
 
 $(LZMA_TARGET_DIR)/src/lzma/lzma: $(LZMA_TARGET_DIR)/.configured
        $(MAKE) -C $(LZMA_TARGET_DIR) all
@@ -107,6 +111,7 @@ lzma-dirclean:
 #############################################################
 ifeq ($(strip $(BR2_PACKAGE_LZMA_HOST)),y)
 TARGETS+=lzma-host
+HOST_SOURCE+=lzma-source
 endif
 
 ifeq ($(strip $(BR2_PACKAGE_LZMA_TARGET)),y)