Henrik Carlqvist wrote:
> [EMAIL PROTECTED] wrote:
> > I don't, however, want 'myBinary' relinked, since the interface to
> > the .so file hasn't changed--relinking is unnecessary.
>
> But you want the .so file created if it doesn't already exist I suppose?

Correct.

> One way to fix this would be:
>
> myBinary: myBinary.o $(filter-out $(wildcard myLibrary.so), myLibrary.so)
>         g++ --go-go-gadget-linker
>
> With the above rule myBinary depends on myLibrary.so if it doesn't
> already exist. But if the file already exist it doesn't care if it is
> newer than myBinary.

Perfect!  Thanks!  I don't claim to understand how that works, but it
does work.

> > How do I change this Makefile to keep the relinking from happening?
> > Dropping the .so dependency creates pain, because then 'make -j' doesn't
> > work right.
>
> What is the problem with make -j? To me it seems as if dropping the
> dependency only would cause the .so file not to be created, regardless of
> if the -j flag is used.

The problem with dropping the dependency was that if I do a 'make
clean' then a 'make -j 4 all' (all is a target that depends on all the
.so files and all of the binaries), the binary may be linked before the
.so file is created, which is an error.

Vince

_______________________________________________
help-gnu-utils mailing list
help-gnu-utils@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to