The first place to consult in understanding how to build your code is the
documentation of your compiler. C++20 *module* support is very new in at
least gcc and they have not provided direct guidance on how to use modules
with 'make', at least I don't see any such guidance here:
https://gcc.gnu.o
Jean-Baptiste Poittevin (10 August 2022 22:19) wrote:
> By using a lot of PHONY targets, I think you're closing a door to one
> make greatest feature : not redoing those things that are already up
> to date.
While that's entirely true of make's "design-basis" use-case, I am
familiar with the mostl
Thanks Philip,
I want to compile objects in order of the writting: y.o z.o x.o .
The order of compiling x.o are different in below three cases.
I don't understand the difference.
x : y.o z.o x.o # compiles x.o last
$(CC) $^ -o $@ # with recipe
x : y.o z.o # compiles x.o last
> I want to compile objects in order of the writting
Just because, today, make happens to pick nearly what you want it to do without
being told about your ordering constraint, doesn't mean that you should rely on
it continuing to do so. You should teach make about that order. You could
contr
Thanks Martin,
Your Makefile is too advanced for me to understand by now.
I tested out the below five rules.
Aren't the order of compiling object files of first two rules certain?
Will GNU Make keep their ordering behavior or are they just some random ordering
caused by some random bugs (sorry,
> Aren't the order of compiling object files of first two rules certain?
No, it's unspecified. Earlier in this thread, you wrote:
>> The manual states that the x.c compiles first.
The example you're looking at just teaches that compiling x.c first is allowed.
It doesn't teach that x.c will al
On Fri, 2022-08-12 at 02:37 +0800, ljh wrote:
> Aren't the order of compiling object files of first two rules
> certain?
The POSIX standard for make mandates that prerequisites are tried by
make in the order they are listed in the prerequisite list, with the
exception that implicit rules will prep
Thanks Paul,
I've learnt a lot from your mail.
On Wed, 2022-08-10 at 19:08 +, Katherine Pata wrote:
> I often find myself using makefiles to handle things like project
> linting, container images, various scripts, initiating tests, and
> other misc tasks. Sometimes these include tasks that have real
> dependencies that make should keep trac
Hi Paul,
I use some example code which uses C++20 modules.
There are five .cpp files, e.g:
main.c depends on a.c b.c c.c d.c
b.c d.c depends on c.c
a.c depends on b.c
d.c depends on a.c
I update my Makefile like the following. Is it correct and guaranteed to work
under parallel make?
10 matches
Mail list logo