naming convention for shell script and makefile

What you've got are the bits that glue a build together. Build scripts, auto-generated configs, makefiles that other makefiles include - questioning how that stuff should be named is a good idea.

Most of all, be consistent.

I've seen a lot of .mk extensions for files included via the Makefile. However, as Gyom suggests, it's a very subjective question.

Whatever makes the syntax highlighter in your editor of choice happy is probably a good choice. If you're on a team where everyone uses something different, ask folks. For me, naming a makefile include with a .mk extension highlights correctly for everyone. Naming shell scripts with a .sh suffix helps in a similar way.

In short, make the file names obvious and try to make syntax highlighting work on as many editors / IDEs as possible. Makefile.common might not do that, common.mk may have a better shot.


Google's open-source style uses underscores as separators: https://google.github.io/styleguide/shellguide.html#s7.4-source-filenames.

So in your case, it would be do_this_please.sh or do_this_please using this style.