Button: A fast, correct, and elegantly simple build system.

Fool via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jun 15 03:53:36 PDT 2016


On Wednesday, 15 June 2016 at 05:04:28 UTC, Jason White wrote:
> If you want to depend on the compiler version, then you can add 
> a dependency on the compiler executable. It might be a good 
> idea to have Button do this automatically for every command. 
> That is, finding the path to the command's executable and 
> making it a dependency.

I think you are fine if adding a dependency works. If it's done 
automatically someone will ask for a way to disable this feature.


> However, I can think of another scenario where it would just as 
> well be incorrect behavior: Linking an executable and then 
> running tests on it. The executable could then be seen by the 
> build system as the "secondary" or "intermediate" output. If it 
> gets deleted, I think we'd want it rebuilt.
>
> I'm not sure how Make or Shake implement this without doing it 
> incorrectly in certain scenarios. There would need to be a way 
> to differentiate between necessary and unnecessary outputs. 
> I'll have to think about this more.

Shake has 'order only' dependencies that cover the 'intermediate' 
case. GNU make supports special targets '.INTERMEDIATE' and 
'.SECONDARY' [1].

[1] 
http://www.gnu.org/software/make/manual/make.html#Chained-Rules


More information about the Digitalmars-d-announce mailing list