gen_compile_commands: extract compiler command from a series of commands