Re: State and plans for C++20 module support?

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

 



On Fri, 2025-02-21 at 16:53 +0100, Ben Boeckel wrote:
> > I think it should be possible to preserve the per-directory entry
> > points, now that POSIX make supports "include".
> 
> Does it preserve the "defer actually including until its associated
> recipe is up-to-date" behavior? If my memory serves at least…I've
> been able to live happily in ninja-land for a long time :) .

If by "does it preserve" you mean, is that behavior defined by POSIX
then no, it is not.  That is still a GNU Make-only feature (I'm not
aware of any other implementation of make that does this).

Just to be clear, what you say above is not precisely the behavior you
get from GNU Make.  GNU Make considers every makefile it reads (for any
reason including "include") to be a goal and tries to rebuild it first
before any other targets are built.  If any makefile is rebuilt, then
make re-execs itself from scratch and starts over again.

This has broadly the same effect you describe above but not exactly;
for example, in GNU Make _all_ makefiles are rebuilt using the current
dependency graph, before _any_ re-exec happens to acquire a new
dependency graph.  It's not the case that each time a makefile is built
we immediately re-exec before trying the next one.

But, I'm not exactly sure what use CMake could make of this facility
anyway since CMake files are not makefiles and can't be included...? 
If you took advantage of other GNU Make facilities you could maybe take
advantage; for example you could have a $(shell ...) operation that
updated a makefile if a CMakeFile was newer, that would force cmake to
be re-run and re-generate all the makefiles.

There are also more portable options to run a script at makefile parse
time than using $(shell ...), such as the "!=" operator which is now
standardized in POSIX.

Anyway I'm happy to discuss but I doubt this mailing list is the right
place to talk about improvements to CMake :)





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux