[gnome-love] automake dependences in separately directories



Hi all, 

I'll try to simplify my problem so it becomes easy for all to
understand.

Let's say I have a 'foo' project with all the source code in foo/src.
Now, i have added src/foo-bar.{c,h} files, wich implements a incredible
'bar' feature on 'foo' and I would love to test it separately from my
main 'foo' application.

src/foo-bar.c depends on src/foo-marshal.c, wich is generated without
problems when I compile 'foo', a la automake (e.g. by 'cd src && make').

Then, I have created a tests/ directory, and a test-foo-bar.c program
wich tests only the features of foo-bar.{c,h}, without messing with the
original 'foo' code.

One problem I have, is that when I compile tests/foo-bar-test a la
automake, src/foo-bar.o is to be built but if src/foo-marshal.c is not
previously generated, then the compilation fails.

The big question is, how do I set correctly automake/autoconf tools so
when I 'cd tests && make' the dependence on 'src/foo-bar.{c,h} and
subsequent dependence on 'src/foo-marshal.c' is tested and
'tests/test-foo-bar' is correctly compiled?

As extra information, all sources depends too on gtk+/glib libraries.

If something isn't clear enough, I can provide more info.

Thanks, 

Claudio
-- 
Claudio Saavedra <csaavedra alumnos utalca cl>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]