|
@ -23,8 +23,6 @@ |
|
|
|
|
|
|
|
|
BEGIN { |
|
|
BEGIN { |
|
|
PAT = tolower(PAT); |
|
|
PAT = tolower(PAT); |
|
|
if (length(MODE) == 0) |
|
|
|
|
|
MODE = ".*"; |
|
|
|
|
|
} |
|
|
} |
|
|
!/^#/{ |
|
|
!/^#/{ |
|
|
#remove cr on windows |
|
|
#remove cr on windows |
|
@ -41,37 +39,37 @@ BEGIN { |
|
|
PAT=$2; |
|
|
PAT=$2; |
|
|
for (i = 3; i <= NF; i = i + 1) { |
|
|
for (i = 3; i <= NF; i = i + 1) { |
|
|
if ($i ~ /^CPU=/) { |
|
|
if ($i ~ /^CPU=/) { |
|
|
if ("CPU" ~ MODE){ |
|
|
if ("CPU" == MODE){ |
|
|
sub(/[^=]*=/,"",$i); |
|
|
sub(/[^=]*=/,"",$i); |
|
|
printf "%s",$i; |
|
|
printf "%s",$i; |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ($i ~ /^FPU=/) { |
|
|
else if ($i ~ /^FPU=/) { |
|
|
if ("FPU" ~ MODE){ |
|
|
if ("FPU" == MODE){ |
|
|
sub(/[^=]*=/,"",$i); |
|
|
sub(/[^=]*=/,"",$i); |
|
|
printf "%s",$i; |
|
|
printf "%s",$i; |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ($i ~ /[[:upper:]]*=/) { |
|
|
else if ($i ~ /[[:upper:]]*=/) { |
|
|
if ("DEFS" ~ MODE) |
|
|
if ("DEFS" == MODE) |
|
|
printf "-D_%s ",$i; |
|
|
printf "-D_%s ",$i; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (PAT=="END"){ |
|
|
if (PAT=="END"){ |
|
|
if ("FAMILY" ~ MODE) |
|
|
if ("FAMILY" == MODE) |
|
|
printf "%s",family; |
|
|
printf "%s",family; |
|
|
else if ("SUBFAMILY" ~ MODE) |
|
|
else if ("SUBFAMILY" == MODE) |
|
|
printf "%s",subfamily; |
|
|
printf "%s",subfamily; |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
else{ |
|
|
else{ |
|
|
subfamily = family; |
|
|
subfamily = family; |
|
|
family = PAT; |
|
|
family = PAT; |
|
|
if ("CPPFLAGS" ~ MODE) |
|
|
if ("CPPFLAGS" == MODE) |
|
|
printf "-D%s ",toupper(PAT); |
|
|
printf "-D%s ",toupper(PAT); |
|
|
else if("DEFS" ~ MODE) |
|
|
else if("DEFS" == MODE) |
|
|
printf "-D%s ",toupper(PAT); |
|
|
printf "-D%s ",toupper(PAT); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|