# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/uclibc/functions.in # Copyright (C) 2004 - 2023 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # $conffiles is a list of patters of the form # ^[XO-] [] # X means enable, O disable, and - removes it # pattern can use '*' as a wildcard for [^ #] # optionaly can set a value different that y apply_conffiles() { local file= rule= local action= prerule= value= x= if [ ! -f $builddir/config.sed ]; then for file in $conffiles $extraconffiles; do if [ -f "$file" ]; then sed -e '/^[ \t]*$/d;' -e '/^[ \t]*#.*/d;' "$file" | while read action prerule value x; do [ "${action:0:1}" = "#" -o "$action" = "" ] && continue rule="$(echo $prerule | sed 's/\*/[^ #]*/')" rule="^\(# \)\?\($rule\)[= ].*\$" if [ -z "$value" ]; then value='y' else value=\"$(eval echo $value)\" fi case "$action" in X) echo "apply_conffiles: rule $prerule=$value." echo "s,$rule,\2=$value,g" >> $builddir/config.sed ;; O) echo "apply_conffiles: rule unset $prerule." echo "s,$rule,# \2 is not set,g" >> $builddir/config.sed ;; -) echo "apply_conffiles: rule remove $prerule." echo "s,$rule,,g" >> $builddir/config.sed ;; *) abort "apply_conffiles: bad rule $action $prerule $value" ;; esac done fi; done fi sed -f $builddir/config.sed .config > $1 } # get default config, and filter considering # levels, because new options can appear and other disappear auto_config() { local j=1 n="${1:-1}" # defconfig eval "$MAKE defconfig $makeopt" cp -v .config .config.$j j=2; for ((i=1; i