tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make: .OPTIONAL inheritance?



> That seems like a bug...
I was slightly short of getting mad, but there seem to be two unrelated bugs,
the combination thereof hitting my real case and one of them hitting my
test case (which was different from what I gave in my mail):

First bug: If you reference a varaiable and mis-spell the closing parenthesis
as a normal one (instead of a curly brace), nothing gets substituted.

Second bug (or feature): If the only dependency of a target is optional,
doesn't exist, and the target also doesn't exist, it's not built:
	/tmp/x: /tmp/y
		touch ${.TARGET}

	/tmp/y: .OPTIONAL
If neither /tmp/x nor /tmp/y exist, /tmp/x is not built.

Combine the two bugs into a dependency reading
	/tmp/x: /tmp/y ${z)
(note that the reference to z is ${z) and not ${z} as it should be)
you get a rule that seems to have two dependencies, actually only has one
(because ${z) expands to nothing) and you run into the case of a single,
non-existant optional dependency.

I sincerely hope you can reproduce this. I was hitting this on 6_STABLE, the
experiments were on bmake-20140314.


Home | Main Index | Thread Index | Old Index