tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: avoid breaking backwards compatability
On Mon, Sep 01, 2014 at 12:15:58PM -0700, Simon Gerraty wrote:
> The recent changes to suffix white-space handling are cool,
> but they break a number of existing makefiles.
> [...]
>
> A target that has a \ at the end of the last line of its script now breaks.
> Such targets were valid until recently and the practice is not uncommonn
> since it reduces noise in diff's when additional commands added
> (eg. great log sed commands)
Oh please, that's a bug in the makefile. What does an escaped nothing
mean? If you're so concerned about the diffs, stick a blank line at
the end.
And yeah, that means changing some makefiles; if you've been doing
something so obviously invalid you need to expect that. Sorry.
> The other case I hit was where SRCS contains sub/file.c
> sometimes adding the dir where sub/file.c lives to .PATH isn't an option
> because of other files present that are not the desired ones.
>
> Until recently
>
> foo.o: subdir/foo.c
>
> worked, but now even after subdir/foo.c has been correctly found
> a search for foo.c is made and overrides the previous result - which can
> cause the wrong foo.c to be compiled.
> [...]
Why add a knob for this? It is just a bug. Unless there is some part
of the recent set of discussions and changes that I've missed (which
may be the case, and I haven't read all of it in detail either because
it's large and I've been waiting for an uninterrupted chunk of time) I
don't see how this pertains to any of the cited POSIX issues.
If you understand where the wrong behavior comes from, please fix it.
I do not, even after looking through your patch, and the patch itself
seems questionable as it seems to add a special case rather than
dealing with the issue in a systematic way.
Since .PATH is only supposed to be used for files that are not found
in the current directory, and in the case you care about subdir/foo.c
is found in (or at least relative to) the current directory, it seems
that there should not need to be special-case handling to prevent
searching for it.
Even if the recent batch of changes is wrong, please don't add
special-case bodges. I'd rather revert the recent changes (that has
already been seeming like a good idea) and rework them.
Make has too many special-case bodges already.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index