summaryrefslogtreecommitdiff
path: root/package/pkgmaker
diff options
context:
space:
mode:
Diffstat (limited to 'package/pkgmaker')
-rw-r--r--package/pkgmaker26
1 files changed, 25 insertions, 1 deletions
diff --git a/package/pkgmaker b/package/pkgmaker
index ea89424e7..4cf2181ef 100644
--- a/package/pkgmaker
+++ b/package/pkgmaker
@@ -50,6 +50,7 @@ for dn in */Makefile; do
# PKG_NAME: package name (directory, free-format)
# PKG_FLAVOURS: all package flavours (boolean options), uppercase
+ # PKG_CHOICES: all package choices (boolean options), uppercase
# PKG_DESCR: package description (directory)
# PKG_URL: package homepage
# PKG_CXX: uppercase varname part to use for CFrustFrust checks
@@ -61,10 +62,12 @@ for dn in */Makefile; do
# CFLINE_*: one free-format Config.in line per subpackage option
# PKGFD_*: flavour description, per package flavour option
# PKG_{HOST,TARGET}_DEPENDS: add host or target dependencies
- eval $($GMAKE dump="PKG_NAME PKG_FLAVOURS PKG_DESCR PKG_URL PKG_MULTI PKG_CXX \
+ eval $($GMAKE dump="PKG_NAME PKG_FLAVOURS PKG_CHOICES PKG_DESCR PKG_URL PKG_MULTI PKG_CXX \
ALL_PKGOPTS \$(foreach x,\${ALL_PKGOPTS},PKGNAME_\${x} \
PKGDESC_\${x} PKGDEPS_\${x} PKGDFLT_\${x} CFLINE_\${x}) \
\$(foreach x,\${PKG_FLAVOURS},PKGFD_\${x}) \
+ \$(foreach x,\${PKG_CHOICES},PKGCD_\${x}) \
+ \$(foreach x,\${PKG_CHOICES},PKGCS_\${x}) \
PKG_HOST_DEPENDS PKG_TARGET_DEPENDS")
# dnu: directory name, uppercase, y/-+/_X/
@@ -249,6 +252,27 @@ config ADK_COMPILE_${PKG_CXX}_WITH_UCLIBCXX
endchoice
EOF
+ [[ -n $PKG_CHOICES ]] && cat >&4 <<EOF
+
+choice
+prompt "Package flavour choice"
+depends on ADK_COMPILE_$dnu
+EOF
+ # Handle choices
+ for pfco in $PKG_CHOICES; do
+ eval pfcd=\$PKGCD_$pfco
+ eval pfcs=\$PKGCS_$pfco
+ typeset -u pfcs=${pfcs#!}
+ print
+ print config ADK_PACKAGE_${dnu}_$pfco
+ print "\tbool \"${pfd:-$PKG_NAME -> $pfcd}\""
+ print "\\tselect ADK_PACKAGE_${pfcs}"
+ done >&4
+ [[ -n $PKG_CHOICES ]] && cat >&4 <<EOF
+
+endchoice
+EOF
+
# Handle flavours (per directory)
for pfcu in $PKG_FLAVOURS; do # pfcu: pkg flavour conf opt.
eval pfd=\$PKGFD_$pfcu # pfd: pkg flavour description