-$(curdir)/builddirs-install:=. $(sort $(package-y))
-
-$(curdir)//compile = $(1)/prepare
-$(curdir)//install = $(1)/compile
-$(curdir)/install:=$(curdir)/install-cleanup
-$(curdir)/install-cleanup:
- rm -rf $(BUILD_DIR)/root
- $(MAKE) install-targets
- $(MAKE) preconfig
- @if [ -d $(TOPDIR)/files ]; then \
- $(CP) $(TOPDIR)/files/. $(BUILD_DIR)/root; \
- fi
- @mkdir -p $(BUILD_DIR)/root/etc/rc.d
- @( \
- cd $(BUILD_DIR)/root; \
- for script in ./etc/init.d/*; do \
- grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
- IPKG_INSTROOT=$(BUILD_DIR)/root $(which bash) ./etc/rc.common $$script enable; \
- done || true \
+ifdef CHECK_ALL
+$(curdir)/builddirs-check:=$($(curdir)/builddirs)
+$(curdir)/builddirs-download:=$($(curdir)/builddirs)
+endif
+ifneq ($(IGNORE_ERRORS),)
+ package-y-filter := $(package-y)
+ package-m-filter := $(filter-out $(package-y),$(package-m))
+ package-n-filter := $(filter-out $(package-y) $(package-m),$(package-))
+ package-ignore-errors := $(filter n m y,$(IGNORE_ERRORS))
+ package-ignore-errors := $(if $(package-ignore-errors),$(package-ignore-errors),n m)
+ package-ignore-subdirs := $(sort $(foreach m,$(package-ignore-errors),$(package-$(m)-filter)))
+ $(curdir)/builddirs-ignore-download := $(package-ignore-subdirs)
+ $(curdir)/builddirs-ignore-compile := $(package-ignore-subdirs)
+ $(curdir)/builddirs-ignore-host-download := $(package-ignore-subdirs)
+ $(curdir)/builddirs-ignore-host-compile := $(package-ignore-subdirs)
+endif
+
+PACKAGE_INSTALL_FILES:= \
+ $(foreach pkg,$(sort $(package-y)), \
+ $(foreach variant, \
+ $(if $(strip $(package/$(pkg)/variants)), \
+ $(package/$(pkg)/variants), \
+ $(if $(package/$(pkg)/default-variant), \
+ $(package/$(pkg)/default-variant), \
+ default \
+ ) \
+ ), \
+ $(PKG_INFO_DIR)/$(lastword $(subst /,$(space),$(pkg))).$(variant).install \
+ ) \