markfinal / BuildAMation

Build system and project generator for C/C++ desktop software development. Uses C# for build scripts. It is no longer under active development.
http://buildamation.com
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Defer prebuilt tool existence validation until after Init() #443

Open markfinal opened 6 years ago

markfinal commented 6 years ago

Any module that is a prebuilt tool, has to have it's Executable path validated for existence. This currently happens in the Init() function. Custom modules need to invoke the base.Init() call after any macros are set up that are used in the Executable property. However, if base.Init() sets up values that the above logic requires, it's incorrect.

So... push the executable path check until after Init() has finished.

markfinal commented 6 years ago

Unfortunately, this is part of the Init() chain, in particular in PrebuiltTool. However, I see that Evaluate() also checks for the existence of the tool, so one of the checks is redundant.