Makefile depencies broken?

Derrell Lipman derrell.lipman at unwireduniverse.com
Sat Oct 3 09:48:37 MDT 2009


On Sat, Oct 3, 2009 at 11:43, Volker Lendecke <Volker.Lendecke at sernet.de>wrote:

> Hi, Björn!
>
> d7795f2afa3 brought me an annoyance: Every time I type in
> "make", everything is re-linked. This happens because for
> example smbd now depends on "libtalloc". The problem is that
> there is no file called "libtalloc" created by the
> libtalloc: target. "make" thus can not determine that this
> target is already fulfilled and re-links smbd.
>
> I tried the attached patch, but this scheme breaks down for
> libaddns, because there is a directory with that name which
> we can not "touch" so that "make" will detect it's older
> than bin/net.
>
> Björn, can you think of a proper fix? Re-linking always is
> pretty annoying. If not, can we revert those changes?
>

I think the target .PHONY is often used to avoid this problem, although I
don't know if that's unique to GNU make or if it's commonly available. To
use it,
you'd add a new target like this, putting any phony targets in the list:

.PHONY: libtalloc

Then you don't need to create a libtalloc file to avoid the repeated
linking.

Derrell


More information about the samba-technical mailing list