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?
Thanks Paul,
I've learnt a lot from your mail.
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
__
From: ljh
Sent: Thursday, August 11, 2022 11:37
To: Martin Dorey ; Philip Guenther
Cc: psmith ; bug-make
Subject: 回复: 回复: Implicit rule for linking multiple object files
* EXTERNAL EMAIL *
Thanks Martin,
Your Makefile is too advanced for me to understand by now.
I tes
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,
Stop.
z.o: y.o
x.o: z.o
martind@sirius:~/tmp/ljh-2022-08-11$
From: Bug-make on behalf of ljh
Sent: Thursday, August 11, 2022 01:56
To: Philip Guenther
Cc: psmith ; bug-make
Subject: 回复: Implicit rule for linking multiple object files
* EXTERNAL EMAIL *
Tha
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
gt; Copyright (C) 1988-2020 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> $
>
>
On Thu, 11 Aug 2022 14:18:29 +0800
"ljh" wrote:
> main : c.o b.o a.o d.o main.o
> A: note: imports must be built before being imported
> A: fatal error: returning to the gate for a mechanical issue
> compilation terminated.
> make: *** [ 3. ok: with target.o and recipe
>
> $ rm -fr *.o gcm.cach
Hi Paul,
I don't know if this is related to gcc support of c++20.
But mentioning target.o ("x.o") and recipe or not in my Makefile, does have
different result. My test follows.
Thanks
---
1. error: with target.o ("x.o"), without recipe
$ ls
a.cpp b.cpp c.cpp d.cpp main.cpp
On Thu, 2022-08-11 at 01:58 +0800, ljh wrote:
> I have three c source files: x.c, y.c, z.c and I name x as the target
> on left. Can I put x.o in the prerequisites on the right too? Are
> they the same, with or without x.o in the prerequisites on the right?
>
> x: y.o z.o x.o # with x.o
I
Hello list,
GNU Make Manual / 10.2 / Linking a single object file, mentions this:
x: y.o z.o
I have three c source files: x.c, y.c, z.c and I name x as the target on left.
Can I put x.o in the prerequisites on the right too? Are they the same, with or
without x.o in the prerequisites on
12 matches
Mail list logo