$(..)elf/dl-tunables.list \
$(wildcard $(subdirs:%=$(..)%/dl-tunables.list)) \
$(wildcard $(sysdirs:%=%/dl-tunables.list))
- $(AWK) -f $^ > ${@:stmp=T}
+ LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
$(move-if-change) ${@:stmp=T} ${@:stmp=h}
touch $@
exit 1
}
+ # TYPES is an associative array where the index is the data
+ # TYPESA is an indexed array where the value is the data
+ # We sort TYPESA
+ typecount = asorti (types, typesa)
+
print "/* AUTOGENERATED by gen-tunables.awk. */"
print "#ifndef _TUNABLES_H_"
print "# error \"Do not include this file directly.\""
# Now, the enum names
print "\ntypedef enum"
print "{"
- for (tnm in types) {
+ for (i = 1; i <= typecount; i++) {
+ tnm = typesa[i];
split (tnm, indices, SUBSEP);
t = indices[1];
n = indices[2];
print "# include \"dl-tunable-types.h\""
# Finally, the tunable list.
print "static tunable_t tunable_list[] attribute_relro __attribute_used__ = {"
- for (tnm in types) {
+ for (i = 1; i <= typecount; i++) {
+ tnm = typesa[i];
split (tnm, indices, SUBSEP);
t = indices[1];
n = indices[2];
# Map of tunable with environment variables aliases used during parsing. */
print "\nstatic const tunable_id_t tunable_env_alias_list[] ="
printf "{\n"
- for (tnm in types) {
+ for (i = 1; i <= typecount; i++) {
+ tnm = typesa[i];
split (tnm, indices, SUBSEP);
t = indices[1];
n = indices[2];