fixed some build file flaws

This commit is contained in:
2022-09-25 02:08:01 +09:00
parent a828f82670
commit 9efdf82b16
204 changed files with 1160 additions and 91 deletions

33
scripts/generrcode.hawk Normal file
View File

@ -0,0 +1,33 @@
#
# generrcode.hawk
#
# hawk -f generrcode.hawk hawk-cmn.h
#
BEGIN {
collect=0;
tab3="\t\t";
tab4="\t\t\t";
}
/^[[:space:]]*enum[[:space:]]+hawk_errnum_t[[:space:]]*$/ {
collect=1;
print tab3 "// generated by generrcode.awk";
print tab3 "enum ErrorNumber";
print tab3 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
print tab3 "};";
print tab3 "// end of enum ErrorNumber";
print "";
collect=0;
}
collect && /^[[:space:]]*HAWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab4 "ERR_" substr (name,7,length(name)-6) " = " name ",";
}