Search code examples
apache-flexmxmlc

How to determine what files MXMLC compiles


I need a way to programmatically record what source files are consumed in an MXMLC compile. Ideally there would be a flag to pass to MXMLC to have it report the complete list of source files it is compiling, but there doesn't seem to be such a flag. It seems generally you just pass a main.mxml file to MXMLC and it goes off and compiles everything it needs to without telling you what it's doing. As far as I can tell, you also cannot explicitly list the files for it to compile; it will resolve references automatically and compile referenced sources without any way to control that behavior or report on it.

If the compiler cannot supply this information and a user cannot control this behavior, the only other option I can think of is write my own source code scanner for MXML that will traverse all the references in a code tree to give a report of what MXMLC should be compiling, though that's obviously error prone and certainly not something I'm looking forward to.

Of course, since I don't have a whole lot of experience with Flex, there may be an obvious answer that I'm missing.


Solution

  • You should find what you're after in the link report:

    Add this param to your compiler arguments:

    -link-report output.xml
    

    It gives you a tonne of information, so there's also a handy AIR tool for parsing the results.