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}"/> |
77 </condition> |
71 </condition> |
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> |
|
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 |
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" |
|
120 file="${jaf.src.dir}/META-INF/mailcap.default"/> |
|
121 <copy todir="${build.classes.dir}/META-INF" |
|
122 file="${jaf.src.dir}/META-INF/mimetypes.default"/> |
|
123 <copy todir="${build.classes.dir}/META-INF/services" |
|
124 file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin"/> |
|
125 <copy todir="${build.classes.dir}/META-INF/services" |
|
126 file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/> |
|
127 <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/> |
|
128 <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"> |
|
129 <fileset dir="${jaxws.src.dir}/com/sun/tools/internal/xjc/runtime" |
|
130 includes="**/*.java" |
|
131 excludes="**/*.package.html"/> |
|
132 </copy> |
108 </target> |
133 </target> |
109 |
134 |
110 <!-- Build (compilation) of sources to class files. --> |
135 <!-- Build (compilation) of sources to class files. --> |
111 <target name="build" |
136 <target name="build" |
112 depends="compile, -build-setup"> |
137 depends="compile, -build-setup"> |
113 </target> |
138 </target> |
114 <target name="compile" |
139 <target name="compile" |
115 depends="init, -init-src-dirs"> |
140 depends="init"> |
116 <mkdir dir="${build.classes.dir}"/> |
141 <mkdir dir="${build.classes.dir}"/> |
117 <javac |
142 <javac |
118 includeAntRuntime="false" |
143 includeAntRuntime="false" |
119 classpath="${build.classes.dir}:${tools.jar}" |
144 classpath="${build.classes.dir}:${tools.jar}" |
120 fork="true" |
145 fork="true" |
130 </javac> |
155 </javac> |
131 </target> |
156 </target> |
132 |
157 |
133 <!-- Test. (FIXME: Need to know how to run tests.) --> |
158 <!-- Test. (FIXME: Need to know how to run tests.) --> |
134 <target name="test" |
159 <target name="test" |
135 depends="init, -init-src-dirs, dist"> |
160 depends="init, dist"> |
136 <echo message="FIXME: How do you run the tests"/> |
161 <echo message="FIXME: How do you run the tests"/> |
137 </target> |
162 </target> |
138 |
163 |
139 <!-- Populate source area if needed. --> |
164 <!-- Populate source area if needed. --> |
140 <target name="source" |
165 <target name="source" |
141 depends="init, -init-src-dirs" |
166 depends="init" |
142 description="Populate all source file directories"> |
167 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> |
168 </target> |
154 |
169 |
155 <!-- Clean up compiled files. --> |
170 <!-- Clean up compiled files. --> |
156 <target name="clean" |
171 <target name="clean" |
157 description="Delete all generated files"> |
172 description="Delete all generated files"> |