tech-toolchain archive

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

Re: make: avoid breaking backwards compatability

On Thu, Sep 04, 2014 at 04:32:31PM -0700, Simon J. Gerraty wrote:
> target0 is the fiding some dir/foo.c via .PATH even when foo.c is
> present in '.'

This behavior would be a horrendous bug!  If the manual page should be
trusted (which I've come to suspect lately...):

    .PATH   The sources are directories which are to be searched for files
            not found in the current directory.

And looking at your test case, I see that you probably meant to say:
"use a loosely applicable explicit dependency as the implicit source, then
try to make or find that normally."

> target1 is relying on the suffix rules to apply the dependency foo.c ->
> foo.o even when there is an explicit rule for foo.o

This is 100 % wrong.  This should never have worked and if you have
a makefile that relies on this behavior, it is broken and needs to be
fixed.  Even if you've managed to find some use case for buggy behavior
does not remove the fact that it is a bug.  I really hope that no one
else is advocating for re-implementing this bug.

This was listed as issue 8 in PR 49086 and also in PR 5370, which was
submitted in 1998.  You're saying "this is how things've worked for
15 years", I'm saying "this has been a bug for 16 years". ;)

Anyway, I will never re-implement this.  If you want this behavior, you
either revert the changes or do it yourself.

As for the override-functionality, I'm open to restoring it in one form
or another (as I expressed elsewhere in this thread).  I can see it
being important to someone even if I've shown it to be a bug under
other circumstances.  I just need someone to provide a spec on how it
should be done so people can choose between it or the way others and
POSIX do it.

> Stupid or not, in each case the real makefiles that rely on this
> behavior have worked with every version of bmake posted for the last 15
> years.  They should contine to work.

Are you really saying that we should allow ourselves to be held hostage
by the past?  Because what you're saying means that no changes should
ever be made.  There are bound to be some backward incompatible changes
when bugs are fixed or new features introduced.  Sometimes you just have
to bite the bullet and change the ways you did it before.

Jarmo Jaakkola

Home | Main Index | Thread Index | Old Index