Table of Contents
In case you want to edit your makefile by hand, WinGDB offers an editor extension enhancing the experience. Currently it supports the following features:
WinGDB will open a file named makefile or Makefile in the enhanced editor by default. Also, files with *.mk extension are opened this way. Other files can be treated as makefiles by selecting Open With option when using the File / Open / File... menu option in Visual Studio (choose WinGDB Makefile editor from the list).
The makefile editor works just as any other language-specific editor in Visual Studio. It highlights GNU Make syntax and is able to detect a number of syntax errors "on the fly". One notable make-specific detail is that the editor highlights tabulation characters which prefix commands (recipes). Those tab characters are one of the most typical sources of errors in makefiles. They are often overlooked or spaces are used instead. WinGDB editor will make such errors immediately visible. Note that tabs in other contexts are not highlighted, because WinGDB is smart enough to tell whether they are required or optional in particular place.
The editor looks like on the screenshot below:
Colors in the makefile editor can be customized same way as other colors in Visual Studio. Open Tools / Options / Fonts and colors dialog, ensure Text editor category is chosen and scroll the list to the WinGDB Makefile group of settings:
Customize colors and fonts you like and click OK. Note that for the tab color setting, you need to edit the background color.
The makefile editor behavior can be altered by using Tools / Options dialog. Find the Text Editor / WinGDB Makefile category. Most options are same as for other languages. The Advanced page provides makefile-specific options:
These options are self-descriptive. You can use the Enable editor features to enable/disable the editor extension as a whole.
Table of Contents