vslavik / bakefile

Bakefile makefiles generator
http://bakefile.org
MIT License
142 stars 20 forks source link

Improve wxrc support #126

Closed vslavik closed 2 years ago

vslavik commented 3 years ago

See #124.

07acb7c allows constructs like this in makefiles too:

if ( $config == Release ) {
    sources { foo.xrc }
}
vadz commented 3 years ago

Sorry, I remember now why I've used my own custom build step even for MSVS: with just

if ( $config == Release ) {
    sources { foo.xrc }
}

MSVS thinks the file needs to be rebuilt every time foo.xrc is modified even in Debug configuration. This seems logical: the generated file foo.cpp is excluded from build, but foo.xrc itself isn't, so it still wants to run the custom build step. IOW we need ExcludedFromBuild in CustomBuild itself, not only in ClCompile node.

(there is also a cosmetic issue of using foo.cpp as the name of the file generated from foo.xrc, which is not ideal as it can clash with an existing foo.cpp, but changing it to foo_xrc.cpp should be trivial and I could do it myself if you don't mind).

vslavik commented 3 years ago

IOW we need ExcludedFromBuild in CustomBuild itself, not only in ClCompile node.

Makes sense to me.

(there is also a cosmetic issue of using foo.cpp as the name of the file generated from foo.xrc, which is not ideal as it can clash with an existing foo.cpp, but changing it to foo_xrc.cpp should be trivial and I could do it myself if you don't mind

There already is code that is supposed to handle this sanely, see disambiguate_intermediate_file_names

vslavik commented 3 years ago

if you don't mind

Feel free to push whatever here.

vslavik commented 2 years ago

Outdated by #131