define Build/Prepare/Default
mkdir -p $(PKG_BUILD_DIR)
ln -s $(CURDIR)/git-src $(PKG_BUILD_DIR)/.git
- ( cd $(PKG_BUILD_DIR); git checkout .)
+ ( cd $(PKG_BUILD_DIR); \
+ git checkout .; \
+ git submodule update --recursive; \
+ git submodule foreach git config --unset core.worktree; \
+ git submodule foreach git checkout .; \
+ )
endef
endif
ifdef USE_SOURCE_DIR
$(call Build/Exports,$(STAMP_CONFIGURED))
$(STAMP_CONFIGURED): $(STAMP_PREPARED) $(STAMP_CONFIGURED_DEPENDS)
+ rm -f $(STAMP_CONFIGURED_WILDCARD)
$(CleanStaging)
$(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep))
$(Build/Configure)
$(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep))
- rm -f $(STAMP_CONFIGURED_WILDCARD)
touch $$@
$(call Build/Exports,$(STAMP_BUILT))
ifneq ($(CONFIG_AUTOREMOVE),)
compile:
- -touch $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
+ -touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
$(XARGS) rm -rf
endif