tech-toolchain archive

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

Re: make: avoid breaking backwards compatability



On Tue, 2 Sep 2014 16:59:11 +0200, Antoine LECA writes:
>On 2014-09-01 19:15Z, Simon Gerraty wrote:
>> The patch below adds a knob "POSIX_STRICT" (better names welcome),
>
>Posix standard did specify a way to achieve it: the implementation is
>supposed to detect the occurring of the special
>       .POSIX:
>target [first] in the makefile, and then turns on its "compatibility
>mode" (the very effect of your posix_strict flag, AFAICT.)

Yes .POSIX: is already implemented, it results in setting
%POSIX= 1003.2

make itself does not currently pay any attention to this.
It is mainly for the benefit of the makefiles.

Using:

        posix_strict = getInt("%POSIX", 0);

works just as well.

But use of %POSIX implies the new behaviour would be off by default.
That's fine by me, but not sure everyone would agree.

>Would it be very complex to implement that instead of the detection of a
>brand new POSIX_STRICT=1 macro?

As above it isn't complex at all, but the semantics are a bit more
restricted.

With something like POSIX_STRICT it doesn't matter (as much) what the
default value is because it can be set in the environment or anywhere
else to the opposite value.

With .POSIX: (%POSIX) you cannot do that and you cannot have it default
on.

That aside; the precise knob used isn't as important (to me) as the
issue of breaking backwards compatability.

A knob is only needed if we chose to keep the incompatible behavior
changes.  


Thanks
--sjg


Home | Main Index | Thread Index | Old Index