Matt Armstrong | 3 Jan 2002 17:38

Re: Dependency with files with the same name in different directory

"BROSSIER Florent" <F.BROSSIER <at> csee-transport.fr> writes:

> Now the problem:
>
> When I start Jam. The compilation is ok. (Test/foo.hpp was included!)
>
> If I modifie Test/foo.hpp and start Jam again nothing is done.
>
> If I modifie Other/foo.hpp and start Jam again the executable is rebuild.
>
> Is it a bug of Jam?

Yes, I think there is a bug in Jambase here.

The Object rule in Jambase sets HDRS on targets to:

    $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS)

But it sets HDRSEARCH to:

    $(HDRS) $(SUBDIRHDRS) $(SEARCH_SOURCE) $(STDHDRS)

I think the bug is that the two do not specify the same order.  So the
compiler will search with one order, and Jam another.

HDRSEARCH should probably be:

    $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) $(STDHDRS)

> What can I do to solve this problem?
(Continue reading)


Gmane