Prefix output with a newline to cope with Makefiles not having a newline at the end
$_ = <OMKF>;
}
# insert dependencies
-print $Begin_magic_str, @Depend_lines, $End_magic_str || die "Failed to write out dependencies ($!)";
+print "\n$Begin_magic_str", @Depend_lines, $End_magic_str || die "Failed to write out dependencies ($!)";
while (<OMKF>) { # copy the rest through
print $_ || die "Failed to write out dependencies ($!)";