![Shawn Landden](/assets/img/avatar_default.png)
Distcc removes comments, making the comment silencing
not work.
I know there was a decision against a macro in commit
ec251fe7d5
16 lines
434 B
Bash
Executable file
16 lines
434 B
Bash
Executable file
#!/bin/sh -eu
|
|
awk ' BEGIN {
|
|
print "%{\n\
|
|
#if __GNUC__ >= 7\n\
|
|
_Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
|
|
#endif\n\
|
|
%}"
|
|
print "struct key_name { const char* name; unsigned short id; };"
|
|
print "%null-strings"
|
|
print "%%"
|
|
}
|
|
|
|
/^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
|
|
{ print tolower($1) ", " $1 }
|
|
' < "$1"
|