-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
37 lines (32 loc) · 1.25 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<project name = "Rofficetool" default = "install" basedir = ".">
<property environment = "env" />
<property name = "package.name" value = "Rofficetool" />
<property name = "r.home" value = "C:/R/R-3.1.3" />
<property name = "rtools.home" value = "C:/R/Rtools31" />
<property name = "gcc.home" value = "C:/R/Rtools31/gcc-4.6.3" />
<property name = "path" value = "${r.home}/bin;${rtools.home}/bin;${gcc.home}/bin;"/>
<property name = "output.folder" value = "${basedir}/output/"/>
<target name="clean">
<delete dir="${output.folder}" failonerror = "false"/>
<mkdir dir="${output.folder}/${package.name}"/>
<copy todir="${output.folder}/${package.name}">
<fileset dir="${basedir}">
<include name="**"/>
</fileset>
</copy>
</target>
<target name ="build" depends="clean">
<exec executable="${r.home}/bin/R" dir ="${output.folder}" failonerror = "true">
<env key="Path" value="${path}"/>
<arg value="CMD"/>
<arg line ='build ${package.name}'/>
</exec>
</target>
<target name ='install' depends ='build'>
<exec executable="${r.home}/bin/R" dir ="${output.folder}" failonerror = "true">
<env key="Path" value="${path}"/>
<arg value="CMD"/>
<arg line ='INSTALL --build ${package.name}'/>
</exec>
</target>
</project>