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

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to