]> git.proxmox.com Git - extjs.git/blob - extjs/modern/theme-cupertino/.sencha/package/sub-builds.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / modern / theme-cupertino / .sencha / package / sub-builds.xml
1 <project name="x-sub-builds-impl">
2
3 <macrodef name="x-process-sub-packages">
4 <attribute name="all" default="false"/>
5 <element name="tasks" implicit="true"/>
6 <sequential>
7 <if>
8 <and>
9 <isset property="package.subpkgs.dir"/>
10 <available file="${package.subpkgs.dir}" type="dir"/>
11 </and>
12 <then>
13 <local name="sub.packages.list"/>
14 <condition property="sub.packages.list" value="${package.subpkgs}">
15 <and>
16 <isset property="package.subpkgs"/>
17 <equals arg1="@{all}" arg2="false"/>
18 </and>
19 </condition>
20 <property name="sub.packages.list" value="*"/>
21 <for param="pkg-dir">
22 <dirset dir="${package.subpkgs.dir}" includes="${sub.packages.list}"/>
23 <sequential>
24 <if>
25 <available file="@{pkg-dir}/.sencha/package/sencha.cfg"/>
26 <then>
27 <tasks/>
28 </then>
29 </if>
30 </sequential>
31 </for>
32 </then>
33 </if>
34 </sequential>
35 </macrodef>
36
37 <macrodef name="x-process-examples">
38 <attribute name="all" default="false"/>
39 <element name="tasks" implicit="true"/>
40 <sequential>
41 <local name="example.apps"/>
42 <local name="example.path"/>
43 <local name="example.dir"/>
44
45 <condition property="example.apps" value="*">
46 <equals arg1="@{all}" arg2="true"/>
47 </condition>
48 <condition property="example.apps" value="${package.example.apps}">
49 <isset property="package.example.apps"/>
50 </condition>
51 <condition property="example.apps" value="${package.examples}">
52 <isset property="package.examples"/> <!-- legacy value -->
53 </condition>
54
55 <condition property="example.path" value="${package.example.path}">
56 <isset property="package.example.path"/>
57 </condition>
58 <condition property="example.path" value="${package.examples.dir}">
59 <isset property="package.examples.dir"/> <!-- legacy value -->
60 </condition>
61
62 <if>
63 <isset property="example.path"/>
64 <then>
65 <for list="${example.path}" delimiter="," param="dir">
66 <sequential>
67 <x-canonical-path property="example.dir" overwrite="true"
68 path="@{dir}"
69 basedir="${package.dir}"/>
70
71 <x-echo>Processing examples in "@{dir}" (${example.dir})</x-echo>
72
73 <if>
74 <isset property="example.apps"/>
75 <then>
76 <for list="${example.apps}" delimiter="," param="app">
77 <sequential>
78 <if>
79 <available file="${example.dir}/@{app}/.sencha/app/sencha.cfg"/>
80 <then>
81 <!--
82 Use for loop so <tasks> can use the
83 pieces @{app} and @{dir} of the full
84 path @{example-dir}
85 -->
86 <for param="example-dir">
87 <dirset dir="${example.dir}" includes="@{app}"/>
88 <sequential>
89 <tasks/>
90 </sequential>
91 </for>
92 </then>
93 <else>
94 <if>
95 <available file="${example.dir}/@{app}" type="dir"/>
96 <then>
97 <x-echo>No app at ${example.dir}/@{app}</x-echo>
98 </then>
99 </if>
100 </else>
101 </if>
102 </sequential>
103 </for>
104 </then>
105 <elseif>
106 <available file="@{dir}" type="dir"/>
107 <then>
108 <for param="example-dir">
109 <dirset dir="@{dir}" includes="*"/>
110 <sequential>
111 <if>
112 <available file="@{example-dir}/.sencha/app/sencha.cfg"/>
113 <then>
114 <tasks/>
115 </then>
116 </if>
117 </sequential>
118 </for>
119 </then>
120 </elseif>
121 </if>
122 </sequential>
123 </for>
124 </then>
125 </if>
126 </sequential>
127 </macrodef>
128
129 <macrodef name="x-run-sub-build">
130 <attribute name="dir"/>
131 <attribute name="target"/>
132 <element name="properties" implicit="true"/>
133 <sequential>
134 <if>
135 <available file="@{dir}/build.xml"/>
136 <then>
137 <local name="sub.name"/>
138 <basename file="@{dir}"
139 property="sub.name"/>
140 <ant dir="@{dir}"
141 inheritall="false"
142 inheritrefs="true"
143 target="@{target}">
144 <property name="compiler.ref.id" value="compiler-${sub.name}"/>
145 <properties/>
146 </ant>
147 </then>
148 </if>
149 </sequential>
150 </macrodef>
151
152 <macrodef name="x-sub-build">
153 <attribute name="dir"/>
154 <attribute name="target" default="build"/>
155 <attribute name="inherit-version" default="0"/>
156 <sequential>
157 <if>
158 <x-is-true value="@{inherit-version}"/>
159 <then>
160 <x-run-sub-build dir="@{dir}" target="@{target}">
161 <property name="cmd.dir" value="${cmd.dir}"/>
162 <property name="build.version" value="${build.version}"/>
163 </x-run-sub-build>
164 </then>
165 <else>
166 <x-run-sub-build dir="@{dir}" target="@{target}">
167 <property name="cmd.dir" value="${cmd.dir}"/>
168 </x-run-sub-build>
169 </else>
170 </if>
171 </sequential>
172 </macrodef>
173
174 <target name="-before-subpkgs"/>
175 <target name="-after-subpkgs"/>
176 <target name="-subpkgs">
177 <x-process-sub-packages>
178 <local name="sub.name"/>
179 <basename file="@{pkg-dir}"
180 property="sub.name"/>
181 <x-echo>Building sub package ${sub.name}</x-echo>
182 <if>
183 <x-is-true value="${build.subpkgs.inherit.version}"/>
184 <then>
185 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
186 <property name="compiler.ref.id" value="compiler-${sub.name}"/>
187 <property name="build.version" value="${build.version}"/>
188 <property name="package.sass.rhino" value="${package.sass.rhino}"/>
189 package
190 build
191 </x-sencha-command>
192 </then>
193 <else>
194 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
195 <property name="compiler.ref.id" value="compiler-${sub.name}"/>
196 <property name="package.sass.rhino" value="${package.sass.rhino}"/>
197 package
198 build
199 </x-sencha-command>
200 </else>
201 </if>
202 </x-process-sub-packages>
203 </target>
204
205 <target name="-before-clean-subpkgs"/>
206 <target name="-after-clean-subpkgs"/>
207 <target name="-clean-subpkgs">
208 <x-process-sub-packages>
209 <x-echo>Cleaning sub package in @{pkg-dir}</x-echo>
210 <x-sub-build dir="@{pkg-dir}"
211 target="clean"
212 inherit-version="${build.subpkgs.inherit.version}"/>
213 </x-process-sub-packages>
214 </target>
215
216 <target name="-before-upgrade-subpkgs"/>
217 <target name="-after-upgrade-subpkgs"/>
218 <target name="-upgrade-subpkgs">
219 <x-process-sub-packages>
220 <x-echo>Upgrading sub package in @{pkg-dir}</x-echo>
221 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
222 <property name="args.force" value="true"/>
223 package
224 upgrade
225 </x-sencha-command>
226 <delete dir="@{example-dir}/.sencha_backup"/>
227 </x-process-sub-packages>
228 </target>
229
230 <target name="-before-examples"/>
231 <target name="-after-examples"/>
232 <target name="-examples">
233 <x-process-examples>
234 <x-echo>Building example in @{example-dir}</x-echo>
235 <x-sencha-command dir="@{example-dir}" inheritall="false">
236 <property name="app.sass.rhino" value="${package.sass.rhino}"/>
237 app
238 build
239 </x-sencha-command>
240 </x-process-examples>
241 </target>
242
243 <target name="-before-upgrade-examples"/>
244 <target name="-after-upgrade-examples"/>
245 <target name="-upgrade-examples">
246 <x-process-examples>
247 <x-echo>Upgrading example in @{example-dir}</x-echo>
248 <x-sencha-command dir="@{example-dir}" inheritall="false">
249 <property name="args.force" value="true"/>
250 app
251 upgrade
252 </x-sencha-command>
253 <delete dir="@{example-dir}/.sencha_backup"/>
254 </x-process-examples>
255 </target>
256
257 <target name="-before-clean-examples"/>
258 <target name="-after-clean-examples"/>
259 <target name="-clean-examples">
260 <x-process-examples>
261 <x-echo>Cleaning example in @{example-dir}</x-echo>
262 <x-sub-build dir="@{example-dir}"
263 target="clean"/>
264 </x-process-examples>
265 </target>
266
267 <target name="list-examples" depends="init"
268 description="List all example apps for this package">
269 <x-process-examples>
270 <x-echo> @{example-dir}</x-echo>
271 </x-process-examples>
272 </target>
273
274 </project>