comparison build.xml @ 952:ea1e6f01f95c

Merge
author asaha
date Fri, 13 Jun 2014 17:16:51 -0700
parents 15dfd3addae0
children
comparison
equal deleted inserted replaced
6:9e8e06cf7e0b 7:fbf3a6dd1339
34 Input Properties: (see build.properties for the ant defaults) 34 Input Properties: (see build.properties for the ant defaults)
35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath 35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
36 javac.debug - true or false for debug classfiles 36 javac.debug - true or false for debug classfiles
37 javac.target - classfile version target 37 javac.target - classfile version target
38 javac.source - source version 38 javac.source - source version
39 drops.dir - directory that holds source drop bundles
40 allow.download - permit downloads from public url (default is false)
41 (used if bundles not found in drops.dir)
42 39
43 Run 'make help' for help using the Makefile. 40 Run 'make help' for help using the Makefile.
44 </description> 41 </description>
45 42
46 <!-- Project build properties. --> 43 <!-- Project build properties. -->
47 <property file="build.properties"/> 44 <property file="build.properties"/>
48 45
49 <!-- See if drop sources were included. --> 46 <property name="jaxws.src.dir" value="src/share/jaxws_classes"/>
50 <condition property="drop.dir" 47 <property name="jaf.src.dir" value="src/share/jaf_classes"/>
51 value="${drop.included.dir}" 48 <path id="src.dir.id">
52 else="${drop.expanded.dir}"> 49 <pathelement path="${jaxws.src.dir}"/>
53 <available file="${drop.included.dir}" type="dir"/> 50 <pathelement path="${jaf.src.dir}"/>
54 </condition> 51 </path>
55
56 <!-- Get shared targets. -->
57 <import file="build-defs.xml"/>
58 52
59 <!-- Initialization of directories needed for build. --> 53 <!-- Initialization of directories needed for build. -->
60 <target name="init"> 54 <target name="init">
61 <mkdir dir="${build.dir}"/> 55 <mkdir dir="${build.dir}"/>
62 <mkdir dir="${build.classes.dir}"/> 56 <mkdir dir="${build.classes.dir}"/>
78 <target name="-javac-jar-exists" 72 <target name="-javac-jar-exists"
79 unless="javac.jar.exists"> 73 unless="javac.jar.exists">
80 <echo message="WARNING: Cannot find ${javac.jar}"/> 74 <echo message="WARNING: Cannot find ${javac.jar}"/>
81 </target> 75 </target>
82 76
77 <!-- Create src.zip. -->
78 <target name="-dist-src-zip" depends="init">
79 <zip file="${dist.src.zip}" basedir="${jaxws.src.dir}"/>
80 <zip file="${dist.src.zip}" basedir="${jaf.src.dir}" update="true"/>
81 </target>
82
83 <!-- Creation of distribution files to jdk build process. --> 83 <!-- Creation of distribution files to jdk build process. -->
84 <target name="dist" 84 <target name="dist"
85 depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" 85 depends="init, build, -dist-classes-jar, -dist-src-zip"
86 description="Create all built distribution files."> 86 description="Create all built distribution files.">
87 </target> 87 </target>
88 <target name="-dist-classes-jar-uptodate" 88 <target name="-dist-classes-jar-uptodate"
89 depends="init, -init-src-dirs"> 89 depends="init">
90 <condition property="dist.classes.jar.uptodate"> 90 <condition property="dist.classes.jar.uptodate">
91 <and> 91 <and>
92 <available file="${dist.classes.jar}" type="file"/> 92 <available file="${dist.classes.jar}" type="file"/>
93 <uptodate targetfile="${dist.classes.jar}"> 93 <uptodate targetfile="${dist.classes.jar}">
94 <srcfiles dir="${build.classes.dir}" includes="**"/> 94 <srcfiles dir="${build.classes.dir}" includes="**"/>
95 </uptodate> 95 </uptodate>
96 </and> 96 </and>
97 </condition> 97 </condition>
98 </target> 98 </target>
99 <target name="-dist-classes-jar" 99 <target name="-dist-classes-jar"
100 depends="init, -init-src-dirs, -dist-classes-jar-uptodate" 100 depends="init, -dist-classes-jar-uptodate"
101 unless="dist.classes.jar.uptodate"> 101 unless="dist.classes.jar.uptodate">
102 <delete file="${dist.classes.jar}"/> 102 <delete file="${dist.classes.jar}"/>
103 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> 103 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
104 </target> 104 </target>
105 105
106 <target name="-build-setup" 106 <!-- Special build area setup. -->
107 depends="init, -init-src-dirs, -drop-build-setup"> 107 <target name="-build-setup" depends="init">
108 <mkdir dir="${build.classes.dir}"/>
109 <copy todir="${build.classes.dir}">
110 <fileset dir="${jaxws.src.dir}"
111 includes="**/*.xsd, **/*.default, **/*.properties"
112 excludes="**/*.java, **/*.package.html"/>
113 </copy>
114 <replaceregexp match="#(.*)$" replace="#" flags="gm">
115 <fileset dir="${build.classes.dir}" includes="**/*.properties"/>
116 </replaceregexp>
117
118 <mkdir dir="${build.classes.dir}/META-INF/services"/>
119 <copy todir="${build.classes.dir}/META-INF/services"
120 file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
121 <copy todir="${build.classes.dir}/META-INF/services"
122 file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory"/>
123 <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
124 <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
125 <fileset dir="${jaxws.src.dir}/com/sun/tools/internal/xjc/runtime"
126 includes="**/*.java"
127 excludes="**/*.package.html"/>
128 </copy>
108 </target> 129 </target>
109 130
110 <!-- Build (compilation) of sources to class files. --> 131 <!-- Build (compilation) of sources to class files. -->
111 <target name="build" 132 <target name="build"
112 depends="compile, -build-setup"> 133 depends="compile, -build-setup">
113 </target> 134 </target>
114 <target name="compile" 135 <target name="compile"
115 depends="init, -init-src-dirs"> 136 depends="init">
116 <mkdir dir="${build.classes.dir}"/> 137 <mkdir dir="${build.classes.dir}"/>
117 <javac 138 <javac
118 includeAntRuntime="false" 139 includeAntRuntime="false"
119 classpath="${build.classes.dir}:${tools.jar}" 140 classpath="${build.classes.dir}:${tools.jar}"
120 fork="true" 141 fork="true"
130 </javac> 151 </javac>
131 </target> 152 </target>
132 153
133 <!-- Test. (FIXME: Need to know how to run tests.) --> 154 <!-- Test. (FIXME: Need to know how to run tests.) -->
134 <target name="test" 155 <target name="test"
135 depends="init, -init-src-dirs, dist"> 156 depends="init, dist">
136 <echo message="FIXME: How do you run the tests"/> 157 <echo message="FIXME: How do you run the tests"/>
137 </target> 158 </target>
138 159
139 <!-- Populate source area if needed. --> 160 <!-- Populate source area if needed. -->
140 <target name="source" 161 <target name="source"
141 depends="init, -init-src-dirs" 162 depends="init"
142 description="Populate all source file directories"> 163 description="Populate all source file directories">
143 </target>
144
145 <!-- Populate drop_included area. -->
146 <target name="drop_included"
147 depends="clobber"
148 description="Populate all source file directories">
149 <delete dir="${drop.included.dir}"/>
150 <antcall target="source"/>
151 <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
152 <delete dir="${drop.included.dir}/bundles"/>
153 </target> 164 </target>
154 165
155 <!-- Clean up compiled files. --> 166 <!-- Clean up compiled files. -->
156 <target name="clean" 167 <target name="clean"
157 description="Delete all generated files"> 168 description="Delete all generated files">
161 172
162 <!-- Clean up compiled files and all imported source files. --> 173 <!-- Clean up compiled files and all imported source files. -->
163 <target name="clobber" 174 <target name="clobber"
164 depends="clean" 175 depends="clean"
165 description="Delete all generated files, including imported sources"> 176 description="Delete all generated files, including imported sources">
166 <delete dir="${drop.expanded.dir}"/>
167 </target> 177 </target>
168 178
169 <target name="-banner"> 179 <target name="-banner">
170 <echo message="+---------------------------------------+"/> 180 <echo message="+---------------------------------------+"/>
171 <echo message="+ Starting ant project ${ant.project.name} +"/> 181 <echo message="+ Starting ant project ${ant.project.name} +"/>