Hi all,

currently I have a project where some C sources are automaticly generated by other programms during the build stage. So I added some rules like
foo.c foo.h : foo.othersouce
foocompiler $(srcdir)/foo.othersouce -o $(top_builddir)/bar/foo

There are some other source file which have dependencies to this files, so I want this dependencies resolved by make when buildung the project.
So I added a rule for one of the dependant files like

baz.c: foo.h

at the top of my Makefile.am. But when I generate the files, the first build goes wrong with gcc complaining there is no baz.c, while the secound run of make succed. Also the automatic dependency resolving seems to fail, since there is no foo.h while collecting dependencies for baz.c.

My current work-around is to place foo.c at the first position after the blubb_SOURCES = line, so it currently works. But I feel this is a dirty hach, so I want to know if there is a clean solution for my situation.

bye
Rudi

--
GPG encrypted mails preferred.
GPG verschl�sselte Mails bevorzugt.
---> https://dsred.ccc.de/085/tkuev <----



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to