-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
63 lines (51 loc) · 1.68 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<project name="privacy-proxy-server" default="compile" basedir=".">
<description>
</description>
<!-- set global properties for this build -->
<property name="src.py" location="src"/>
<property name="src.proto" location="common/protobuf"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source ">
<echo>Compiling protobuf files into python ...</echo>
<pathconvert property="src.protoFilesString" pathsep=" ">
<fileset dir="${src.proto}">
<include name="*.proto" />
</fileset>
</pathconvert>
<exec executable="/opt/local/bin/protoc" dir="./">
<arg value="--python_out=${build}" />
<arg value="--proto_path=${src.proto}" />
<arg value="${src.protoFilesString}" />
</exec>
<echo>Finished compiling protobuf files.</echo>
</target>
<target name="dist" depends="compile">
<echo>Copying files to dist folder ...</echo>
<copy todir="${dist}">
<fileset dir="${src.py}">
<include name="**/*.py"/>
<include name="**/*.tac"/>
</fileset>
<fileset dir="${build}">
<include name="**/*.py"/>
</fileset>
<fileset dir="${basedir}">
<include name="privacyproxy.cfg"/>
</fileset>
</copy>
<echo>Finished copying files to dist folder.</echo>
</target>
<target name="clean" description="clean up">
<echo>Cleaning working directory ...</echo>
<delete dir="${build}"/>
<delete dir="${dist}"/>
<echo>Finished cleaning working dir.</echo>
</target>
</project>