Fix hosttar generation not to depend on PHONY targets

Instead of depending on the phony targets, which are never considered
clean (so the tar will always rebuild), and include all versions of a
particular module (host, target, etc), use the real files that we're
about to package.

Test: m hosttar
Test: cvd-host_package.tar.gz is the same before&after (except timestamps)
Change-Id: If5e28bfa33bc53e6d451ebd084ab69c2ba567034
diff --git a/host_package.mk b/host_package.mk
index 257bffc..fd902d0 100644
--- a/host_package.mk
+++ b/host_package.mk
@@ -8,8 +8,9 @@
 .PHONY: cf_local_image
 cf_local_image: bootimage cacheimage hosttar systemimage userdataimage vendorimage
 
+$(cvd_host_package_tar): PRIVATE_TAR_FORMAT :=
 ifeq ($(HOST_OS),linux)
-CVD_TAR_FORMAT := --format=gnu
+$(cvd_host_package_tar): PRIVATE_TAR_FORMAT := --format=gnu
 endif
 
 # Build and store them on the build server.
@@ -52,17 +53,13 @@
 cvd_host_configs := \
     cuttlefish.dtb
 
-cvd_host_packages := \
-    cuttlefish_dtb \
-    $(cvd_host_executables) \
-    $(cvd_host_tests) \
-
 cvd_host_package_files := \
      $(addprefix config/,$(cvd_host_configs)) \
      $(addprefix $(bin_path)/,$(cvd_host_executables)) \
      $(addprefix $(lib_path)/,$(addsuffix .so,$(cvd_host_shared_libraries))) \
      $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
 
-$(cvd_host_package_tar): $(cvd_host_packages)
-	$(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(CVD_TAR_FORMAT) $(cvd_host_package_files)
+$(cvd_host_package_tar): PRIVATE_FILES := $(cvd_host_package_files)
+$(cvd_host_package_tar): $(addprefix $(HOST_OUT)/,$(cvd_host_package_files))
+	$(hide) rm -rf $@ && tar Scfz $@.tmp -C $(HOST_OUT) $(PRIVATE_TAR_FORMAT) $(PRIVATE_FILES)
 	$(hide) mv $@.tmp $@