aboutsummaryrefslogtreecommitdiffstats
path: root/include/package.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-02-23 17:32:04 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-02-23 17:32:04 +0000
commit31e661bebd86209f48b80b093e74d671c97e5a27 (patch)
tree0e02563129b530e939475086d0f318b9882fc75f /include/package.mk
parent278803f5ca0c072f0d9c308a75732c2e378ccd51 (diff)
downloadmaster-187ad058-31e661bebd86209f48b80b093e74d671c97e5a27.tar.gz
master-187ad058-31e661bebd86209f48b80b093e74d671c97e5a27.tar.bz2
master-187ad058-31e661bebd86209f48b80b093e74d671c97e5a27.zip
build: allow packages to declare ABI versions to detect necessary package rebuilds
If a package directly depends on another package that recently changed its ABI version, it will be cleaned up and rebuilt (assuming quilt is not used). This helps with packages that have no stable ABI, e.g. libubox, ubus, etc. Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39720 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/package.mk')
-rw-r--r--include/package.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index 79066fe1e2..d14c525506 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -39,6 +39,15 @@ include $(INCLUDE_DIR)/host.mk
include $(INCLUDE_DIR)/unpack.mk
include $(INCLUDE_DIR)/depends.mk
+find_library_dependencies = $(wildcard $(patsubst %,$(STAGING_DIR)/pkginfo/%.version, \
+ $(filter-out $(BUILD_PACKAGES),$(foreach dep, \
+ $(filter-out @%, $(patsubst +%,%,$(1))), \
+ $(if $(findstring :,$(dep)), \
+ $(word 2,$(subst :,$(space),$(dep))), \
+ $(dep) \
+ ) \
+ ))))
+
STAMP_NO_AUTOREBUILD=$(wildcard $(PKG_BUILD_DIR)/.no_autorebuild)
PREV_STAMP_PREPARED:=$(if $(STAMP_NO_AUTOREBUILD),$(wildcard $(PKG_BUILD_DIR)/.prepared*))
ifneq ($(PREV_STAMP_PREPARED),)
@@ -227,6 +236,9 @@ define Package/$(1)/description
endef
endif
+ BUILD_PACKAGES += $(1)
+ $(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(DEPENDS)))
+
$(foreach FIELD, TITLE CATEGORY SECTION VERSION,
ifeq ($($(FIELD)),)
$$(error Package/$(1) is missing the $(FIELD) field)