-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
144 lines (133 loc) · 7.02 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8"?>
<project name='copper' basedir='.'>
<property environment='env'/>
<property name='src' location='src'/>
<property name='build' location='bin'/>
<property name='dist' location='jar'/>
<property name='javadoc' location='doc/javadoc'/>
<property name='etcbase' location='.'/>
<property file='Build.properties' prefix='ext'/>
<property name='doc' location='doc'/>
<property name='debug' value='false'/>
<target name='init'>
<tstamp>
<format property='TIMESTAMP' pattern='yyyyMMdd-HHmm'/>
</tstamp>
<mkdir dir='${build}'/>
<mkdir dir='${dist}'/>
</target>
<target name='build' depends='init'>
<javac source='1.5' target='1.5' includeantruntime='true' debug='true' srcdir='${src}' destdir='${build}' includes='edu/umn/cs/melt/copper/**/*.java' excludes='edu/umn/cs/melt/copper/compiletime/concretesyntax/skins/**/*.java'>
<!--<compilerarg value='-Xlint:unchecked'/>-->
</javac>
</target>
<target name='gethgrev'>
<exec resultproperty='Hg.Result' outputproperty='Hg.Output' failifexecutionfails='false' executable="hg">
<arg value="identify"/>
<arg value='--debug'/>
<arg value='-i'/>
</exec>
<condition property='Revision' value='${Hg.Output}' else='unknown'>
<and>
<not><isfailure code='${Hg.Result}'/></not>
<matches string='${Hg.Output}' pattern='^[0-9a-f]{40}\+?$'/>
</and>
</condition>
<echo message='Mercurial revision: ${Revision}'/>
</target>
<target name='javadoc'>
<javadoc access='protected'
author='true'
classpath='tests:/usr/share/ant/lib/ant.jar'
destdir='${javadoc}'
doctitle='Copper ${ext.Version} Javadoc'
nodeprecated='false'
nodeprecatedlist='false'
noindex='false'
nonavbar='false'
notree='false'
packagenames='edu.umn.cs.melt.copper.ant,edu.umn.cs.melt.copper.main,edu.umn.cs.melt.copper.compiletime.spec.grammarbeans,edu.umn.cs.melt.copper.runtime,edu.umn.cs.melt.copper.runtime.io,edu.umn.cs.melt.copper.runtime.auxiliary,edu.umn.cs.melt.copper.runtime.engines,edu.umn.cs.melt.copper.runtime.engines.semantics,edu.umn.cs.melt.copper.compiletime.logging,edu.umn.cs.melt.copper.runtime.logging'
source="1.5"
sourcepath='tests:src'
splitindex='true'
use='true'
version='true'>
<group title='Copper ANT task'>
<package name='edu.umn.cs.melt.copper.ant'/>
</group>
<group title='Copper compiler API'>
<package name='edu.umn.cs.melt.copper.main'/>
<package name='edu.umn.cs.melt.copper.compiletime.spec.grammarbeans'/>
</group>
<group title='Copper parser API'>
<package name='edu.umn.cs.melt.copper.runtime'/>
<package name='edu.umn.cs.melt.copper.runtime.engines'/>
</group>
<group title='Other packages'>
<package name='edu.umn.cs.melt.copper.runtime.io'/>
<package name='edu.umn.cs.melt.copper.runtime.auxiliary'/>
<package name='edu.umn.cs.melt.copper.runtime.engines.semantics'/>
<package name='edu.umn.cs.melt.copper.compiletime.logging'/>
<package name='edu.umn.cs.melt.copper.runtime.logging'/>
</group>
</javadoc>
</target>
<target name='CopperCompilerJar' depends='build,gethgrev'>
<delete file='etc/Copper.properties' quiet='true'/>
<propertyfile file='etc/Copper.properties' comment='The contents of this file are regenerated by Ant at each build of CopperCompiler.jar.'>
<entry key='Version' value='${ext.Version}'/>
<entry key='Revision' value='${Revision}'/>
<entry key='Build' value='${TIMESTAMP}'/>
</propertyfile>
<jar destfile='${dist}/CopperCompiler.jar' index='true'>
<fileset dir='${build}' includes='**/*.class'/>
<fileset dir='${etcbase}' includes='etc/*'/>
<manifest>
<attribute name='Main-Class' value='edu.umn.cs.melt.copper.main.ParserCompiler'/>
<attribute name='Bundle-Name' value='Copper Compile and Runtime'/>
<attribute name='Bundle-Version' value='${ext.Version}'/>
<attribute name='Bundle-SymbolicName' value='edu.umn.cs.melt.copper'/>
<attribute name='Export-Package' value='edu.umn.cs.melt.copper;version="${ext.Version}", edu.umn.cs.melt.copper.runtime;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.auxiliary;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.semantics;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single.scanner;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single.semantics;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.logging;version="${ext.Version}"'/>
<section name='Version'>
<attribute name='Version' value='${ext.Version}'/>
<attribute name='Revision' value='${Revision}'/>
<attribute name='Build' value='${TIMESTAMP}'/>
</section>
</manifest>
</jar>
</target>
<target name='CopperRuntimeJar' depends='build,gethgrev'>
<jar destfile='${dist}/CopperRuntime.jar' index='true'>
<fileset dir='${build}' includes='edu/umn/cs/melt/copper/runtime/**/*.class'/>
<manifest>
<attribute name='Main-Class' value='edu.umn.cs.melt.copper.main.ParserCompiler'/>
<attribute name='Built-By' value='${user.name}'/>
<attribute name='Bundle-Name' value='Copper Runtime'/>
<attribute name='Bundle-SymbolicName' value='edu.umn.cs.melt.copper.runtime'/>
<attribute name='Export-Package' value='edu.umn.cs.melt.copper;version="${ext.Version}", edu.umn.cs.melt.copper.runtime;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.auxiliary;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.semantics;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single.scanner;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.engines.single.semantics;version="${ext.Version}", edu.umn.cs.melt.copper.runtime.logging;version="${ext.Version}"'/>
<section name='Version'>
<attribute name='Version' value='${ext.Version}'/>
<attribute name='Revision' value='${Revision}'/>
<attribute name='Build' value='${TIMESTAMP}'/>
</section>
</manifest>
</jar>
</target>
<target name='dist' depends='CopperCompilerJar,CopperRuntimeJar'/>
<target name='build_clean' depends=''>
<delete includeemptydirs='true' verbose='false' quiet='true'>
<fileset dir='${build}' includes='**/*'/>
</delete>
</target>
<target name='dist_clean' depends=''>
<delete verbose='true'>
<fileset dir='${dist}' includes='CopperCompiler.jar,CopperRuntime.jar'/>
</delete>
</target>
<target name='javadoc_clean' depends=''>
<delete includeemptydirs='true' verbose='false'>
<fileset dir='${javadoc}' includes='**/*' excludes='README.txt'/>
</delete>
</target>
<target name='clean' depends='build_clean,dist_clean,javadoc_clean'/>
</project>