tech-toolchain archive

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

Re: make: avoid breaking backwards compatability



On Fri, 05 Sep 2014, Jarmo Jaakkola wrote:
On Fri, Sep 05, 2014 at 12:36:18AM +0200, Alan Barrett wrote:
We do want to consistently override on a file by file basis. [...]

Please somebody tell me why are you people so dead set against using a directory in the dependency? It would explicitly remove all ambiguity and would not rely on implementation specific tricks.

If we were designing a build system with a version of make that behaved in the new way, perhaps we would have done that. But we are not designing a new build system; we already have a build system that has grown around make's old behaviour. We can change NetBSD's build system, but third parties may rely on the same old behaviour, and we can't break it lightly.

What is wrong with (not intended to be syntactically correct):

   .if arch = arch1
   exe: arch1/foo.o
   .elif arch = arch2
   exe: arch2/foo.o
   .else
   exe: foo.o
   .fi

or

   .if exists(${arch}/foo.S)
   exe: ${arch}/foo.o
   .else
   exe: foo.o
   .fi

Those would work fine, but they are not what we have.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index