将 Makefile 内容转换为 Apache Ant
Convert Makefile content to Apache Ant
Ant 构建系统的 '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>
Ant 构建系统的 '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>