diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 45d2e58bf5..ce8f2472ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1189,7 +1189,7 @@ src/resolve/dns_type-list.txt: src/resolve/dns-type.h $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ src/resolve/dns_type-to-name.h: src/resolve/dns_type-list.txt - $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(uint16_t type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@ + $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print "\ndefault: return NULL;\n\t}\n}\n" }' <$< >$@ src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@ |