[Cook] non-existent includes
Peter Miller
peterm at platypus.net
Thu Oct 31 08:28:27 EST 2002
Aryeh M. Friedman writes...
> If I need to do the following order of things:
> (assuming I am doing it by hand in this example)
>
> In tools/utils
>
> cc -c str.c
> ar rv libutils.a str.o
> install libutils.a ../lib
> install includes.h ../include/util.h
>
> In tools/foobar
> cc -I../include -c foo.c
> [note foo.c has #include <utils.h> in it]
> cc foo.o -o ../bin/foo
>
> Now here is what cook does:
This may be a rather obvious question, but - did you tell cook it needed
to? Did you supply complete dependency information?
lib/libutils.a: tools/libutils.a
tools/utils/libutils.a: tools/utils/str.o
tools/utils/str.o: tools/utils/util.h
include/util.h: tools/utils/util.h
tools/foobar/foo.o: include/util.h
bin/foo: tools/foobar/foo.o lib/libutils.a
I suspect the last two (at least) were omitted. Cook isn't psychic - if
you don't tell it, it doesn't know.
> Now my question is how do I force it to cook
> tools/lib/libutils.a before it
> attempts to cook tools/foo/foo.c.
No force required, just give it complete dependency information.
(See also my "Recursive Make Considered Harmful" paper.)
Regards
Peter Miller <millerp at canb.auug.org.au>
/\/\* http://www.canb.auug.org.au/~millerp/
More information about the Cook-users
mailing list