Don't rebuild the boot image every time

Fugu uses this for 2ndbootloader.bin, which is included in the boot and
recovery images. Since the size check destination never existed, it was
marked dirty and was re-run on every build. Change the size check to use
an empty file so that it's only run when the built image updates.

Change-Id: I0b1cef1ef0a825b1a1f89b0e90dda8706fbf7bf6
diff --git a/bootstub.mk b/bootstub.mk
index 56adcfe..97df35d 100644
--- a/bootstub.mk
+++ b/bootstub.mk
@@ -44,17 +44,17 @@
 		-o $(PRIVATE_ELF_FILE)
 	$(hide) $(TARGET_OBJCOPY) -O binary -R .note -R .comment -S $(PRIVATE_ELF_FILE) $@
 
-# Then assemble the final bootstub file
-
-bootstub_full := $(PRODUCT_OUT)/$(BOOTSTUB_BINARY)
-$(BOOTSTUB_BINARY)_CHECK_BOOTSTUB_SIZE : $(LOCAL_BUILT_MODULE)
+$(LOCAL_BUILT_MODULE).size_check: $(LOCAL_BUILT_MODULE)
 	$(hide) ACTUAL_SIZE=`$(call get-file-size,$<)`; \
 	if [ "$$ACTUAL_SIZE" -gt "$(BOOTSTUB_SIZE)" ]; then \
 		echo "$<: $$ACTUAL_SIZE exceeds size limit of $(BOOTSTUB_SIZE) bytes, aborting."; \
 		exit 1; \
 	fi
+	$(hide) touch $@
 
-$(bootstub_full) : $(LOCAL_BUILT_MODULE) $(BOOTSTUB_BINARY)_CHECK_BOOTSTUB_SIZE
+# Then assemble the final bootstub file
+bootstub_full := $(PRODUCT_OUT)/$(BOOTSTUB_BINARY)
+$(bootstub_full) : $(LOCAL_BUILT_MODULE) $(LOCAL_BUILT_MODULE).size_check
 	@echo "Generating bootstub: $@"
 	$(hide) cat $< /dev/zero | dd bs=$(BOOTSTUB_SIZE) count=1 > $@