add toolchain/download target
[openwrt.git] / toolchain / sed / Makefile
index 637bc65..bbf8502 100644 (file)
@@ -13,14 +13,16 @@ SED_DIR1:=$(TOOL_BUILD_DIR)/sed-$(SED_VER)
 SED_DIR2:=$(BUILD_DIR)/sed-$(SED_VER)
 SED_BINARY:=sed/sed
 SED_TARGET_BINARY:=bin/sed
+SED_MD5SUM:=928f0e06422f414091917401f1a834d0
 ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
 SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
 endif
 HOST_SED_TARGET=$(shell ./sedcheck.sh)
+DOWNLOAD_TARGET=$(shell ./sedcheck.sh)
 
 $(DL_DIR)/$(SED_SOURCE):
        mkdir -p $(DL_DIR)
-       $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) x $(SED_SITE)
+       $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SED_SOURCE) $(SED_MD5SUM) $(SED_SITE)
 
 #############################################################
 #
@@ -46,7 +48,7 @@ $(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured
        $(MAKE) -C $(SED_DIR1)
 
 # This stuff is needed to work around GNU make deficiencies
-build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
+build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) FORCE
        @if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \
                rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi;
        @if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \
@@ -58,18 +60,20 @@ build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
            rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
                    $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi
 
-use-sed-host-binary:
+use-sed-host-binary: FORCE
        @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \
            if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \
            mkdir -p $(STAGING_DIR)/bin; \
            rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \
            ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY)
 
-source: 
+download-sed-binary: sed-$(SED_VER).tar.gz
+
+source: $(DOWNLOAD_TARGET)
 prepare: 
 compile: 
 install: $(HOST_SED_TARGET)
-clean: 
+clean: FORCE
        rm -rf $(SED_DIR1)
        rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY)
 
This page took 0.024078 seconds and 4 git commands to generate.