libk  gen-ident.awk at [12a51d9c50]

File global/gen-ident.awk artifact 730afca5a3 part of check-in 12a51d9c50


BEGIN {
	defs = ""
	FS = ":"
	ORS = ""
	print "#include <k/internal.egroup.h>\n"
	print "extern const char"
}

{
	if (NR != 1) sep = ","
	print sep"\n\t*"$1"_error_strings[]"
	defs = defs "\t{ \""$1"\", \"k "$4"\", "$1"_error_strings },\n"
}

END {
	print ";\n"
	print "struct kglobal_module_record kglobal_module_ident[] = {\n"
		print defs
	print "};"
}