[antlr-interest] C++ file timestamps and makefiles

Stuart Dootson stuart.dootson at gmail.com
Thu Dec 16 15:09:09 PST 2004


On Thu, 16 Dec 2004 21:19:27 +0100, Ric Klaren <ric.klaren at gmail.com> wrote:
> 
> On Thu, 16 Dec 2004 18:32:09 +0000, Stuart Dootson
> <stuart.dootson at gmail.com> wrote:
> > I've observed that behaviour - I thought I remembered there being a
> > command-line switch or option to alter the behaviour, but I can't find
> > it now :-(
> 
> There's no switch for it.
> 
> > What I do is to delete any Antlr outputs before running Antlr,
> > ensuring they are all generated again. Unless I do this, Visual Studio
> > & make think that the Antlr outputs are always out of date and need
> > regenerating. Here's an example from a makefile rule - it uses cantlr,
> > not the Java Antlr, but it's the same principle.
> 
> You can also use a timestamp file that you touch after running antlr.
> Then set up dependencies from that. (As was mentioned in the last
> thread on Makefile's and is done in the Makefile's from antlr itself)
> Probably doesn't work for VC though.
> 
> Cheers,
> 
> Ric
> 

It probably would work - I have to set up a custom build rule in the
VC project for any .g files included in the project. That build rule
can contain any commands (and looks remarkably like the makefile
extract I included before :-), and I have to specify the output(s) of
the command, i.e. I've got as much freedom as in a makefile.

I'll try using a timestamp file, anyway - my machine at work is too
slow to be doing unnecessary compilations!

Thanks for that

Stuart Dootson


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list