summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-10-12 10:00:19 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-10-12 10:02:25 +0200
commit80930676e56382db17d76814f0cd6fc924b11826 (patch)
tree7b54d136071d1bb21c3287474394320e93520a29
parent7298d8486f9dc56aca56a41a060a326d44d02ffc (diff)
downloadptxdist-80930676e56382db17d76814f0cd6fc924b11826.tar.gz
ptxdist-80930676e56382db17d76814f0cd6fc924b11826.tar.xz
ptx/collection: new macro to generate a package list from a collectionconfig
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/post/ptxd_make_collection.make13
-rw-r--r--scripts/lib/ptxd_lib_dgen.awk1
2 files changed, 14 insertions, 0 deletions
diff --git a/rules/post/ptxd_make_collection.make b/rules/post/ptxd_make_collection.make
new file mode 100644
index 000000000..1d11cdd53
--- /dev/null
+++ b/rules/post/ptxd_make_collection.make
@@ -0,0 +1,13 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+ptx/collection = $(PACKAGES-y) $(filter $(foreach PKG,$(shell sed -n 's/^PTXCONF_\([^_][^=]*\)=y$$/\1/p' "$(strip $(1))"),$(PTX_MAP_TO_package_$(PKG))), $(PACKAGES-m))
+
+# vim: syntax=make
diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk
index b3ad35382..d2e19e510 100644
--- a/scripts/lib/ptxd_lib_dgen.awk
+++ b/scripts/lib/ptxd_lib_dgen.awk
@@ -103,6 +103,7 @@ $1 ~ /^[A-Z_]*PACKAGES-/ {
PKG_to_filename[this_PKG] = FILENAME;
print "PTX_MAP_TO_package_" this_PKG "=\"" this_pkg "\"" > MAP_ALL;
+ print "PTX_MAP_TO_package_" this_PKG "=" this_pkg > MAP_ALL_MAKE;
print "PTX_MAP_TO_PACKAGE_" this_pkg "=" this_PKG > MAP_ALL_MAKE;
next;