X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=include%2Fpackage.mk;h=ef1fc48ec83dd6f9a514bce1d5b6decc6e3a8c1c;hb=722a23d418f716ce4b9d554add3143c6c81e1548;hp=ce3c4b6a1b22a27cf13d9414757b57f0bf0fc134;hpb=eac6330602f08ef254803e17c7bde2ed22f5c7b8;p=openwrt.git diff --git a/include/package.mk b/include/package.mk index ce3c4b6a1b..ef1fc48ec8 100644 --- a/include/package.mk +++ b/include/package.mk @@ -17,20 +17,10 @@ define Build/DefaultTargets ifeq ($(CONFIG_AUTOREBUILD),y) _INFO:= ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) .),$(PKG_BUILD_DIR)) - _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) + _INFO+=$(subst $(TOPDIR)/,,$(PKG_BUILD_DIR)) $(PKG_BUILD_DIR)/.prepared: package-clean endif - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - _INFO+=$(subst $(TOPDIR)/,,$(IPKG_$(1))) - $(PKG_BUILD_DIR)/.built: package-rebuild - endif - - ifneq ($(MAKECMDGOALS),prereq) - ifneq ($$(_INFO),) - $$(info Rebuilding $$(_INFO)) - endif - endif endif endif @@ -49,6 +39,10 @@ define Build/DefaultTargets touch $$@ ifdef Build/InstallDev + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed $(PKG_BUILD_DIR)),$(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/stampfiles $(call Build/InstallDev) @@ -237,10 +231,25 @@ define BuildPackage clean: $(1)-clean $(PKG_BUILD_DIR)/.version-$(1)_$(VERSION)_$(PKGARCH): $(PKG_BUILD_DIR)/.prepared - -rm $(PKG_BUILD_DIR)/.version-$(1)_* + -@rm $(PKG_BUILD_DIR)/.version-$(1)_* 2>/dev/null @touch $$@ $$(eval $$(call Build/DefaultTargets,$(1))) + + ifneq ($$(CONFIG_PACKAGE_$(1)),) + ifneq ($(MAKECMDGOALS),prereq) + ifneq ($(DUMP),1) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg -x ipkg-install '$$(IPKG_$(1))' '$(PKG_BUILD_DIR)'),$$(IPKG_$(1))) + _INFO+=$(subst $(TOPDIR)/,,$$(IPKG_$(1))) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + + ifneq ($$(_INFO),) + $$(info Rebuilding $$(_INFO)) + endif + endif + endif + endif endef ifneq ($(strip $(PKG_CAT)),) @@ -263,7 +272,7 @@ endef define Build/Configure/Default @(cd $(PKG_BUILD_DIR)/$(3); \ - [ -x configure ] && { \ + if [ -x configure ]; then \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ @@ -287,7 +296,7 @@ define Build/Configure/Default --infodir=/usr/info \ $(DISABLE_NLS) \ $(1); \ - } || true; \ + fi; \ ) endef