[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Addint additional dependencies to a target
From: |
Ruediger Ranft |
Subject: |
Addint additional dependencies to a target |
Date: |
Thu, 28 Apr 2005 09:04:17 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.5) Gecko/20041217 |
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 <----
signature.asc
Description: OpenPGP digital signature
- Addint additional dependencies to a target,
Ruediger Ranft <=