build: clean up redundant touching of the package install info file
[openwrt/staging/yousong.git] / include / package.mk
index 91871f06fbebf24245df3467757175cd1ed6aa51..bf308bb5c076aa8f01eeb8638bdd60103abb273a 100644 (file)
@@ -37,7 +37,6 @@ endif
 
 include $(INCLUDE_DIR)/hardening.mk
 include $(INCLUDE_DIR)/prereq.mk
-include $(INCLUDE_DIR)/host.mk
 include $(INCLUDE_DIR)/unpack.mk
 include $(INCLUDE_DIR)/depends.mk
 
@@ -156,6 +155,7 @@ define Build/CoreTargets
   $(STAMP_PREPARED): $(STAMP_PREPARED_DEPENDS)
        @-rm -rf $(PKG_BUILD_DIR)
        @mkdir -p $(PKG_BUILD_DIR)
+       touch $$@_check
        $(foreach hook,$(Hooks/Prepare/Pre),$(call $(hook))$(sep))
        $(Build/Prepare)
        $(foreach hook,$(Hooks/Prepare/Post),$(call $(hook))$(sep))
@@ -172,6 +172,8 @@ define Build/CoreTargets
 
   $(call Build/Exports,$(STAMP_BUILT))
   $(STAMP_BUILT): $(STAMP_CONFIGURED) $(STAMP_BUILT_DEPENDS)
+       rm -f $$@
+       touch $$@_check
        $(foreach hook,$(Hooks/Compile/Pre),$(call $(hook))$(sep))
        $(Build/Compile)
        $(foreach hook,$(Hooks/Compile/Post),$(call $(hook))$(sep))
@@ -291,13 +293,13 @@ Build/DistCheck=$(call Build/DistCheck/Default,)
 .PHONY: prepare-package-install
 prepare-package-install:
        @mkdir -p $(PKG_INFO_DIR)
-       @touch $(PKG_INSTALL_STAMP).clean
+       @rm -f $(PKG_INSTALL_STAMP)
        @echo "$(filter-out essential nonshared,$(PKG_FLAGS))" > $(PKG_INSTALL_STAMP).flags
 
 $(PACKAGE_DIR):
        mkdir -p $@
 
-compile: prepare-package-install
+compile:
 .install: .compile
 install: compile