3 ms·
So that you can do include gmsl as much as you want in nested Makefiles and you won't get problems with redefinitions. The top level gmsl decides whether
by jgrahamc 3y ago
So that you can do
include gmsl
as much as you want in nested Makefiles and you won't get problems with redefinitions. The top level gmsl decides whether to include __gmsl. It could have been done as a single file but I wanted to minimize the parse time on large make processes to you include a small file that can quickly decide whether the larger one is needed.
- chrismorgan 3y agoWell, I guess that’s a reason, at least. I’m intensely sceptical about its value, though, when the difference is less than a thousand lines: a subfile containing the usual ifndef gating and a million `a := b` lines adds less than 0.05s on each subsequent inclusion, on my laptop (the first, about 0.15s.) 10,000× `include gmsl`: around 0.1s. 10,000× on including a single-file modification: around 0.7s. Cull all the blank lines and comments and merge continued lines, 197 lines left (excluding license information, which I will acknowledge has some purpose) and it’s around 0.28s. I haven’t ever used makefiles on large projects, but the performance difference feels like it should be completely negligible.
- jgrahamc 3y agoAt the time I wrote the initial GMSL I was particularly focused on parse times for Makefiles because they are a large factor in the "null makes" (i.e. you type 'make' and nothing needs to be done). It's probably an over optimization and I guess I could merge it into a single file.