views:

282

answers:

2

hi, yet another newbie question

i have a few makefiles that store shared variables, such as CC=gcc , how should i name them ? candidates are common.mk Make.common Makefile.common

which is more classic?

similarly, i have some shell scripts, which should i choose among the following: do_this_please.sh do-this-please.sh DoThisPlease.sh doThisPlease.sh

can anyone give me some advices?

+1  A: 

It is quite a subjective question, so I'll answer it with a subjective answer :-)

IMHO, go for Makefile.common and do-this-please (with or without .sh suffix). I've seen these a lot and they are indisputably readable.

Gyom
A: 

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

I would suggest that you use whatever makes the syntax highlighter in your editor of choice happy. For me, naming a makefile include with a .mk extension makes that happen. 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.

Tim Post