ifneq ($(CONFIG_PACKAGE_$(1))$(SDK)$(DEVELOPER),)
IPKGS += $(1)
compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
+ ifneq ($(ABI_VERSION),)
+ compile: $(PKG_INFO_DIR)/$(1).version
+ endif
ifeq ($(CONFIG_PACKAGE_$(1)),y)
.PHONY: $(PKG_INSTALL_STAMP).$(1)
rm -rf $(STAGING_DIR_ROOT)/tmp-$(1)
touch $$@
+ $(PKG_INFO_DIR)/$(1).version: $$(IPKG_$(1))
+ echo '$(ABI_VERSION)' | cmp -s - $$@ || \
+ echo '$(ABI_VERSION)' > $$@
+
$(PKG_INFO_DIR)/$(1).provides: $$(IPKG_$(1))
$$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
@rm -rf $(PACKAGE_DIR)/$(1)_* $$(IDIR_$(1))
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),)
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)