file: use new-style target override for uninstall
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 9 Jun 2010 06:53:56 +0000 (08:53 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 9 Jun 2010 06:53:56 +0000 (08:53 +0200)
As suggested by Thomas.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/file/file.mk

index 11fe05a853c78c72c6a29335313065722ee51229..c4f97091eb9b9933ec2a2dca67e9c1c2d0bd1aa0 100644 (file)
@@ -10,11 +10,10 @@ FILE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 FILE_DEPENDENCIES = host-file zlib
 HOST_FILE_DEPENDENCIES = host-zlib
 
-$(eval $(call AUTOTARGETS,package,file))
-$(eval $(call AUTOTARGETS,package,file,host))
-
-$(FILE_TARGET_UNINSTALL):
-       $(call MESSAGE,"Uninstalling")
+define FILE_UNINSTALL_TARGET_CMDS
        $(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(FILE_DIR)
        rm -f $(TARGET_DIR)/usr/lib/libmagic.*
-       rm -f $(FILE_TARGET_INSTALL_TARGET) $(FILE_HOOK_POST_INSTALL)
+endef
+
+$(eval $(call AUTOTARGETS,package,file))
+$(eval $(call AUTOTARGETS,package,file,host))