Re: [Vala] Rules for updating generated C files
- From: Jan Hudec <bulb ucw cz>
- To: Jürg Billeter <j bitron ch>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Rules for updating generated C files
- Date: Wed, 9 Jun 2010 21:28:15 +0200
On Tue, Jun 08, 2010 at 22:58:09 +0200, Jürg Billeter wrote:
On Tue, 2010-06-08 at 13:36 -0700, Robert Powell wrote:
You snipped the important bit "For this simple system, it would be easy
enough to update the makefile to watch for this dependency." It was meant
to illuminate the fact that when systems get larger, trying to maintain
dependencies becomes terribly complicated.
I would never ever consider maintaining the dependencies manually an option
even for single source. The techinque using gcc -M is reasonably easy and
reliable.
I suggested a solution for the problem.
Unfortunately it was not a solution. If the dependent code is compiled in
separate step and the chage does not induce change in content of the .c file,
valac wouldn't know to touch the output anyway.
Does anyone have any better
suggestions (other than use automake--automake is not an option for our
projects here) for dealing with larger systems?
You could use a similar approach and use gcc -M or makedepend to
generate Makefile rules describing header file dependencies. The
Makefiles would certainly get a bit more complicated but it should be
possible and not require manual dependency maintenance. If that's
possible, I'd prefer to keep the simple update logic we currently have
in valac.
As far as I can see there is no way to detect dependencies correctly short of
full preprocess of the C file. That is IMO outside of scope of valac.
On the other hand valac is able to call the C compiler itself and it should
make sure the output is rebuilt correctly when it does. It recompiles
everything everytime though, no?
--
Jan 'Bulb' Hudec <bulb ucw cz>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]