haserl: depend on haserl binary in TARGET_DIR and also cleanup TARGET_DIR.
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 12 Apr 2008 13:26:57 +0000 (13:26 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 12 Apr 2008 13:26:57 +0000 (13:26 -0000)
package/haserl/haserl.mk

index 9aca060600a785c4efd32bb6e76abe7d80d6eb57..bea7b2b2b1e9a1d616df87bdafdeb43dc2752716 100644 (file)
@@ -10,6 +10,7 @@ HASERL_SOURCE:=haserl-$(HASERL_VERSION).tar.gz
 HASERL_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/haserl/
 HASERL_DIR:=$(BUILD_DIR)/haserl-$(HASERL_VERSION)
 HASERL_CAT:=$(ZCAT)
+HASERL_BINARY:=usr/bin/haserl
 
 $(DL_DIR)/$(HASERL_SOURCE):
        $(WGET) -P $(DL_DIR) $(HASERL_SITE)/$(HASERL_SOURCE)
@@ -35,11 +36,10 @@ $(HASERL_DIR)/.configured: $(HASERL_DIR)/.unpacked
 $(HASERL_DIR)/src/haserl: $(HASERL_DIR)/.configured
        $(MAKE) CC=$(TARGET_CC) -C $(HASERL_DIR)
 
-$(HASERL_DIR)/.installed: $(HASERL_DIR)/src/haserl
-       cp $(HASERL_DIR)/src/haserl $(TARGET_DIR)/usr/bin
-       touch $@
+$(TARGET_DIR)/$(HASERL_BINARY): $(HASERL_DIR)/src/haserl
+       cp $^ $@
 
-haserl: uclibc $(HASERL_DIR)/.installed
+haserl: uclibc $(TARGET_DIR)/$(HASERL_BINARY)
 
 haserl-source: $(DL_DIR)/$(HASERL_SOURCE)
 
@@ -47,6 +47,7 @@ haserl-unpacked: $(HASERL_DIR)/.unpacked
 
 haserl-clean:
        -$(MAKE) -C $(HASERL_DIR) clean
+       rm -f $(TARGET_DIR)/$(HASERL_BINARY)
 
 haserl-dirclean:
        rm -rf $(HASERL_DIR)