[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Check if target is up to date?
From: |
Erik Rull |
Subject: |
Check if target is up to date? |
Date: |
Sat, 27 Feb 2016 11:29:02 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 |
Hi all,
I have the following scenario:
./Makefile:
all:
make -C dir_a
make -C dir_b
dir_a/Makefile:
liba.so: a.o b.o
gcc (link a.o b.o)
dir_b/Makefile:
libd.so: c.o d.o
gcc (link c.o d.o) -L../dir_a -la
It works - but when building it with -jx it is not as optimal as expected
because everything beside the .o files for each lib is built sequentially.
What would definitively work due to my code structures:
- Build all .o files for all libs in parallel
- Build all libs in their dependency sequence as soon as all of the
prerequisites are fulfilled
How can I solve that?
I would like to prevent that libd.so needs to know which prerequisites and
dependencies are needed to check whether liba.so is up to date or not.
Is there a way to transfer the knowledge in a generic way through make
whether a certain file is up to date or not?
Is there a way to just "wait" for the dependency to be up to date without
actually trying to build it? (My structures will assert that it will be
built if it's necessary)
Make knows whether a target is up to date or not - can I get this
information "somehow"?
Thanks.
Best regards,
Erik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Check if target is up to date?,
Erik Rull <=