I am using the following structure that does not require commenting and un-commenting the score parts but this requires to create one more file for each part to generate the individual part.
I thought about defining a macro (like IFDEF in C++) that would un-comment the \score block in each of the instrument part if the file has been included.
Example in pseudo code:
pieceName_instrument-1-part.ly => contains the following code: