开发者

Compile files with certain pattern names in ANT

I need to compile a set of files say they have a pattern "*_modules.F" (fortran files). Using ant, I have a PCC compiler set up on the machine to compile such files. How would I be able to do it via ant script开发者_Go百科s, So far I have

       <exec dir="ModuleDir" executable="PCC">
            <arg line="1_module.F"/>
       </exec>

The above would work for a single module, how can get it to work for all the module with the pattern "*_modules.F"? Any ideas?


This can be done using the apply ant task which takes a fileset as a parameter. Without the "parallel" attribute the executable would be invoked separately for each input file.

<apply executable="PCC" parallel="true">
    <fileset dir="." includes="*_modules.F"/>
</apply>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜