[Mono-list] Tabs / Space in Makefile

Jonathan Pryor jonpryor at vt.edu
Wed May 18 15:07:29 EDT 2011

See `info make` or the GNU Make Manual:


In short, commands for a rule _must_ be indented with TABs, not spaces:


On May 18, 2011, at 4:22 AM, Mujahid Azam wrote:
> .PHONY:all clean distclean
> all:HelloWorld.exe.so
> HelloWorld.exe:
> gmcs -checked+ -debug- -optimize+ -unsafe+ HelloWorld.cs -out:HelloWorld.exe

This is a rule, thus the command `gmcs -checked ...` must be indented with a TAB.

> HelloWorld.exe.so:HelloWorld.exe
> mono --aot -O=all HelloWorld.exe

Same here; HelloWorld.exe.so is a rule, so `mono --aot ...` must be indented with a TAB.

> clean:
> @- $(RM) HelloWorld.exe.so @- $(RM) HelloWorld.exe

Ditto, you need to indent `@-$(RM) ...` with a TAB.

 - Jon

More information about the Mono-list mailing list