views:

351

answers:

1

My ant buildfiles tell mxmlc.jar to recompile target mxml source. However, if the target mxml source file has not changed, either ant or mxmlc is ignoring the file and will not create a new swf. This is an annoyance because I'm editing files imported by the target mxml. I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash). Is this what is happening? What's the standard work-around? At the moment, I'm editing the target mxml just to cause a file change.

A: 

Does Flex SDK’s mxmlc create a cache file or hash to determine if source code has changed?

All that is required to know if a file has changed or not is to look at the last modification time.

I need it to rebuild when those files change. I'm guessing that the mxmlc is creating a cache file somewhere and comparing the target mxml (or maybe just a hash).

A clean build should work fine if it's not too expensive.

dirkgently
So, are you saying that the mxmlc.jar compiler is storing the modification time of the target mxml source somewhere. If I know where that file is, or the cache/hash files that I assumed it was creating. I could instruct ant to wipe out those files before calling mxmlc.jar and thus manually cause a clean build. I'm guess that Flex Builder does something like that when it is told to do a clean build. Maybe I'm way off here. I can't think of any other way that the mxmlc.jar (in the flex sdk) would know how to ignore unchanged source.
Michael Prescott
It doesn't have to store that info. A simple stat on the file will tell you that.
dirkgently