Hi Guys,<br><br>Further thoughts on how to allow variations on the commands associated with a filetype, I would propose having a concept of a variant of a filetype. This is just extra information determined from a subset of the filetypes extensions.  It can be implemented fully configurable from the filetypes.xxx file so no hard coded magic.  An extract of the extended filetypes.c below shows what I mean:<br>
<br>[settings]<br># list of the variants supported<br>variants=hdrs<br><br># definition of how the variant is detected, list of extension patterns<br>[variants]<br>hdrs=*.h<br><br># default build settings for no variants<br>
[build_settings]<br>compiler=gcc -Wall -c "%f"<br>linker=gcc -Wall -o "%e" "%f"<br>run_cmd="./%e"<br><br># buld settings for variant hdrs<br>[build_settings_hdrs]<br>compiler=gcc -Wall -c "%f"<br>
# no linker or run for headers<br><br>This is backward compatible with existing filetypes .c because the default [build_settings] is still there and the same.<br><br>The document has a pointer to the variant information so the build menu can be set from it per file.<br>
<br>Attached is a patch against the build-system branch revision 3195 which was before header filetypes changes.  It gives you an idea of the amount of code needed to set the variant commands, not too much really and fairly localised.  Obviously saving/restoring and using them is part of the upcoming build system changes so the patch does nothing visible.<br>
<br>Other variants can be defined, which I suspect could be useful when some of the upcoming incompatible language changes hit eg python 3 & perl 6 so that commands can vary with dialect.<br><br>Cheers<br>Lex<br>