views:

31

answers:

2

My goal is to have a rule that file.asm should be built exactly the same as file.ASM (or similar variations e.g. file.[aA][sS][mM]). I would like to avoid stepping on a convention that I'm unaware of.

Case-sensitive File Extension Convention Examples:

Assembly
Files with .S and .s extensions are treated differently under GNU Assembler (.S goes through a preprocessor; .s does not).

C/C++
.C is sometimes (depending on compiler?) compiled as a C++ file and .c is compiled as C.

+2  A: 

gcc has the -x flag to solve this problem for you. Specify the language explicitly, and presto - no more problems. Other compilers may or may not have similar capabilities, but reading the documentation in the only way to find out.

Carl Norum
I agree that this is a viable option, but I want to know for sure that nobody is expecting certain assembler options or behavior by changing the case on a .asm file. Any ideas?
stever
I'll accept this one. If the compiler manual doesn't list .asm as an accepted extension, then the user can't complain when .ASM and .asm are treated the same. The goal is convenience, but you have to draw the line somewhere. Thanks for your help.
stever
I don't think ".asm" is particularly standard in the first place.
tc.
A: 

At least on Windows, assemblers such as MASM or TASM don't care about the case of the file extension, i.e. .asm = .ASM as far as I am aware.

PhiS