summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/scan.awk17
-rw-r--r--include/scan.mk2
2 files changed, 18 insertions, 1 deletions
diff --git a/include/scan.awk b/include/scan.awk
new file mode 100644
index 0000000..39b2977
--- /dev/null
+++ b/include/scan.awk
@@ -0,0 +1,17 @@
+BEGIN { FS="/" }
+$1 ~ /^feeds/ { FEEDS[$NF]=$0 }
+$1 !~ /^feeds/ { PKGS[$NF]=$0 }
+END {
+ # Filter-out OpenWrt packages which have a feeds equivalent
+ for (pkg in PKGS)
+ if (pkg in FEEDS)
+ delete PKGS[pkg]
+ n = asort(PKGS)
+ for (i=1; i <= n; i++) {
+ print PKGS[i]
+ }
+ n = asort(FEEDS)
+ for (i=1; i <= n; i++){
+ print FEEDS[i]
+ }
+}
diff --git a/include/scan.mk b/include/scan.mk
index 0998333..138707d 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -43,7 +43,7 @@ endef
$(FILELIST):
rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
- $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
+ $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk > $@
$(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
( \