[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Built sources always regenerated
From: |
Stepan Kasal |
Subject: |
Re: Built sources always regenerated |
Date: |
Sat, 31 Dec 2005 14:22:45 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Sat, Dec 31, 2005 at 02:51:30AM -0500, Braden McDaniel wrote:
> but the behavior is the same: the sources are regenerated every time,
> regardless of whether the antlr grammar has been modified.
I can imagine several problems:
1) there is a prerequisite which is always refreshed and causes this
2) If you use non-GNU make, it can may not understand that "./foo.c" and
"foo.c" is the same file.
3) If you work on a networked drive, the target may have time stamp in the
future, and make decides to refresh it.
I cannot guess more without seeing the makefile. Could you please post
(an URL to) a self-contained example? If you are able to cut some parts
and make the example smaller, that would definitely help.
> I have some sources that are generated with antlr. I have custom make
> rules that generate the sources from the antlr grammar. I have tried
> listing the generated sources in both BUILT_SOURCES and _DEPENDENCIES,
Overriding *_DEPENDENCIES is dangerous, it is better to let Automake
compute it.
The BUILT_SOURCES hack is useful sometimes, but it's better to avoid it.
Perhaps you could use a suffix rule
.antlr.c:
custom commands
and then add the antlr grammar file to *_SOURCES:
myprog_SOURCES = ... foo.antlr ...
Happy hacking in the New Year!
Stepan Kasal