Index: tools/autocheck.awk
===================================================================
--- tools/autocheck.awk	(revision 093e956411e17852a3512765596e707c0683f2cc)
+++ tools/autocheck.awk	(revision 04c0fc5aa45ec90f84d2ef0b8b067f698c6f5f0e)
@@ -33,6 +33,11 @@
 BEGIN {
 	filename = ARGV[1]
+	output_lines = 0
 	print "// Generated file. Fix the included header if static assert fails."
-	print "#include \"" filename "\""
+	print "// Inlined \"" filename "\""
+}
+
+{
+	print $0
 }
 
@@ -44,5 +49,5 @@
 	}
 	macro_name = toupper(struct_name) "_SIZE"
-	print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"
+	output[output_lines++] = "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"
 	struct_name = ""
 }
@@ -55,10 +60,10 @@
 
 		macro_name = toupper(struct_name) "_OFFSET_" toupper(member)
-		print "_Static_assert(" macro_name " == __builtin_offsetof(struct " struct_name ", " member "), \"\");"
+		output[output_lines++] = "_Static_assert(" macro_name " == __builtin_offsetof(struct " struct_name ", " member "), \"\");"
 
 		macro_name = toupper(struct_name) "_SIZE_" toupper(member)
-		print "#ifdef " macro_name
-		print "_Static_assert(" macro_name " == sizeof(((struct " struct_name "){ })." member "), \"\");"
-		print "#endif"
+		output[output_lines++] = "#ifdef " macro_name
+		output[output_lines++] = "_Static_assert(" macro_name " == sizeof(((struct " struct_name "){ })." member "), \"\");"
+		output[output_lines++] = "#endif"
 	}
 }
@@ -67,2 +72,8 @@
 	struct_name = $3
 }
+
+END {
+	for ( i = 0; i < output_lines; i++ ) {
+		print output[i]
+	}
+}
