diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-18 16:19:03 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-01-18 23:57:08 +0100 |
commit | 87d9e3462d25e16abb6b5c18da56312d7b90d7b6 (patch) | |
tree | a56342164b870eae167fdf3df5c06e225a5ba873 /include | |
parent | 8aa93dafc86d804a396fca42e5d7ecdffb53852d (diff) | |
download | upstream-87d9e3462d25e16abb6b5c18da56312d7b90d7b6.tar.gz upstream-87d9e3462d25e16abb6b5c18da56312d7b90d7b6.tar.bz2 upstream-87d9e3462d25e16abb6b5c18da56312d7b90d7b6.zip |
build: stage unstripped packages inside PKG_BUILD_DIR
This makes the build slightly more efficient by avoiding the need to
re-stage packages on every full build run.
It is also necessary for the upcoming CONFIG_AUTOREMOVE feature
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include')
-rw-r--r-- | include/depends.mk | 2 | ||||
-rw-r--r-- | include/package-ipkg.mk | 22 |
2 files changed, 14 insertions, 10 deletions
diff --git a/include/depends.mk b/include/depends.mk index c26c8e547e..1b74a840b7 100644 --- a/include/depends.mk +++ b/include/depends.mk @@ -11,7 +11,7 @@ # 3: tempfile for file listings # 4: find options -DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" +DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir" find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) | mkhash md5 diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index c56aeaa1a5..8a9c10f64b 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -106,7 +106,8 @@ ifeq ($(DUMP),) ifdef do_install ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) IPKGS += $(1) - .compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed + .compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed + compile: $(STAGING_DIR_ROOT)/stamp/.$(1)_installed else $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected)) endif @@ -137,15 +138,18 @@ ifeq ($(DUMP),) $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1)) $(eval $(call BuildIPKGVariable,$(1),postrm,,1)) - $(STAGING_DIR_ROOT)/stamp/.$(1)_installed : export PATH=$$(TARGET_PATH_PKG) - $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT) - rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) - mkdir -p $(STAGING_DIR_ROOT)/stamp $(STAGING_DIR_ROOT)/tmp-$(1) + $(PKG_BUILD_DIR)/.pkgdir/$(1).installed : export PATH=$$(TARGET_PATH_PKG) + $(PKG_BUILD_DIR)/.pkgdir/$(1).installed: $(STAMP_BUILT) + rm -rf $$@ $(PKG_BUILD_DIR)/.pkgdir/$(1) + mkdir -p $(PKG_BUILD_DIR)/.pkgdir/$(1) + $(call Package/$(1)/install,$(PKG_BUILD_DIR)/.pkgdir/$(1)) + $(call Package/$(1)/install_lib,$(PKG_BUILD_DIR)/.pkgdir/$(1)) + touch $$@ + + $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed + mkdir -p $(STAGING_DIR_ROOT)/stamp $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $$@ || echo '$(ABI_VERSION)' > $$@) - $(call Package/$(1)/install,$(STAGING_DIR_ROOT)/tmp-$(1)) - $(call Package/$(1)/install_lib,$(STAGING_DIR_ROOT)/tmp-$(1)) - $(call locked,$(CP) $(STAGING_DIR_ROOT)/tmp-$(1)/. $(STAGING_DIR_ROOT)/,root-copy) - rm -rf $(STAGING_DIR_ROOT)/tmp-$(1) + $(call locked,$(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(STAGING_DIR_ROOT)/,root-copy) touch $$@ Package/$(1)/DEPENDS := $$(call mergelist,$$(filter-out @%,$$(IDEPEND_$(1)))) |