将makefile内容转换为apache ant



and build System的'build.xml'语法是什么与makefile的以下内容相对应(gnu make(:

target: dependency0 dependency1
     shell command 1  # Not java, cc or the like
     shell command 2
     shell command 3

示例

$ ant
dependency0:
     [echo] Hello world one
dependency1:
     [echo] Hello world two
build:
     [exec] command 1
     [exec] command 2
     [exec] command 3

build.xml

<project name="demo" default="build">
  <target name="dependency0">
    <echo>Hello world one</echo>
  </target>
  <target name="dependency1">
    <echo>Hello world two</echo>
  </target>
  <target name="build" depends="dependency0,dependency1">
    <exec executable="echo">
      <arg line="command 1"/>
    </exec>
    <exec executable="echo">
      <arg line="command 2"/>
    </exec>
    <exec executable="echo">
      <arg line="command 3"/>
    </exec>
  </target>
</project>

最新更新