ath10k-ct: fix missing symbols if ath9k is not selected
[openwrt/openwrt.git] / package / Makefile
index d4081cf6897165aee2a6b1d2bc47e846d92dcfe5..9f39395bae6a7ef5e912c62300285d14f575ec12 100644 (file)
@@ -44,19 +44,28 @@ PACKAGE_INSTALL_FILES:= \
 $(curdir)/cleanup: $(TMP_DIR)/.build
        rm -rf $(STAGING_DIR_ROOT)
 
-$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install
+$(curdir)/merge:
+       rm -rf $(PACKAGE_DIR_ALL)
+       mkdir -p $(PACKAGE_DIR_ALL)
+       -$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
+
+$(curdir)/merge-index: $(curdir)/merge
+       (cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
+
+$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
        - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
        rm -rf $(TARGET_DIR)
        [ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp
-       @echo $(wildcard $(foreach dir,$(PACKAGE_SUBDIRS),$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(dir)/$(pkg)_*.ipk))) | $(OPKG) install
+       $(call opkg,$(TARGET_DIR)) install \
+               $(call opkg_package_files,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null))
        @for file in $(PACKAGE_INSTALL_FILES); do \
                [ -s $$file.flags ] || continue; \
                for flag in `cat $$file.flags`; do \
-                       $(OPKG) flag $$flag < $$file; \
+                       $(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
                done; \
        done || true
        @-$(MAKE) package/preconfig
-       $(prepare_rootfs)
+       $(call prepare_rootfs,$(TARGET_DIR))
 
 PASSOPT=""
 PASSARG=""