Re: [PATCH RFC 0/3] Adding trailing slash to $(srctree)

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

 



On Thu, Feb 22, 2024 at 01:38:36PM +0900, Masahiro Yamada wrote:
> On Thu, Feb 22, 2024 at 8:16 AM Elliott Mitchell <ehem+linux@xxxxxxx> wrote:
> >
> > The subject states exactly what I'm suggesting.
> >
> > The reason is the fallback value for $(srctree) of "." doesn't work
> > properly in several places under some conditions.  In particular in
> > several places a pattern of "$(srctree)/$(src)" is used.  If $(srctree)
> > ends up with the value "." and $(src) ends up with the value `pwd`, the
> > build breaks.  This can be triggered via in-tree/out-of-tree build
> > mechanisms.
> 
> 
> I really do not understand what you are trying to achieve,
> but this is just about
> "Do not try to build upstream drivers with M=".
> 
> 
> If you hack it, it is what you should do locally.

I think it is acceptable to state this usage of the build system is
unsupported.  This is not an acceptable reason to reject proposed
patches.

While this use of M= might be considered a hack, adjusting $(srctree) to
include the trailing slash is entirely appropriate.  Everything which
worked before still works and more situations now work.  This also
slightly shrinks the Makefiles.

Notice 306 Makefiles (excluding the top-level) reference $(srctree).  Of
those 26 include the construct which appears to be working around this
problem.  So 8.5% of Makefiles work around this problem, which seems a
pretty good hint the feature is desired.

This doesn't account for Makefiles which had such during development, but
was removed before submission.  This also doesn't account for ones which
had it removed after being brought into the Linux source tree.  The
differences between implementations suggest it might have been
independently implemented as many as 3-4 times.

That seems a good hint this is desired by a notable percentage of
developers.


In other news, examination of tools/testing/selftests/nolibc/Makefile
suggests $(objtree) needs similar treatment.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@xxxxxxx  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445






[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux