STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),)_installed
STAGING_FILES_LIST:=$(PKG_NAME)$(if $(BUILD_VARIANT),.$(BUILD_VARIANT),).list
+
+define CleanStaging
+ rm -f $(STAMP_INSTALLED)
+ @-(\
+ cd "$(STAGING_DIR)"; \
+ if [ -f packages/$(STAGING_FILES_LIST) ]; then \
+ cat packages/$(STAGING_FILES_LIST) | xargs -r rm -f 2>/dev/null; \
+ fi; \
+ )
+endef
+
ifneq ($(if $(CONFIG_SRC_TREE_OVERRIDE),$(wildcard ./git-src)),)
USE_GIT_TREE:=1
QUILT:=1
$(call Build/Exports,$(STAMP_CONFIGURED))
$(STAMP_CONFIGURED): $(STAMP_PREPARED)
+ $(CleanStaging)
$(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep))
$(Build/Configure)
$(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep))
$(STAMP_INSTALLED) : export PATH=$$(TARGET_PATH_PKG)
$(STAMP_INSTALLED): $(STAMP_BUILT)
- $(SUBMAKE) -j1 clean-staging
rm -rf $(TMP_DIR)/stage-$(PKG_NAME)
mkdir -p $(TMP_DIR)/stage-$(PKG_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
$(foreach hook,$(Hooks/InstallDev/Pre),\
configure:
compile: prepare-package-install
install: compile
-clean-staging: FORCE
- rm -f $(STAMP_INSTALLED)
- @-(\
- cd "$(STAGING_DIR)"; \
- if [ -f packages/$(STAGING_FILES_LIST) ]; then \
- cat packages/$(STAGING_FILES_LIST) | xargs -r rm -f 2>/dev/null; \
- fi; \
- )
-clean: clean-staging FORCE
+clean: FORCE
+ $(CleanStaging)
$(call Build/UninstallDev,$(STAGING_DIR),$(STAGING_DIR_HOST))
$(Build/Clean)
rm -f $(STAGING_DIR)/packages/$(STAGING_FILES_LIST) $(STAGING_DIR_HOST)/packages/$(STAGING_FILES_LIST)