-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
270 lines (225 loc) · 10.4 KB
/
Makefile
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Makefile for PreWare
#
# Copyright (C) 2009 by Rod Whitby <rod@whitby.id.au>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
SUBDIRS = apps services plugins daemons linux
.PHONY: index package toolchain upload clobber clean
.PHONY: index
index: webos-internals-index \
webos-patches-index \
optware-index \
ipkgs/precentral/Packages ipkgs/precentral-themes/Packages \
palm-index \
.PHONY: optware-index
optware-index: ipkgs/optware/all/Packages ipkgs/optware/i686/Packages ipkgs/optware/armv6/Packages ipkgs/optware/armv7/Packages
.PHONY: palm-index
palm-index: ipkgs/palm-catalog/Packages ipkgs/palm-beta/Packages ipkgs/palm-web/Packages \
ipkgs/palm-catalog-updates/Packages ipkgs/palm-beta-updates/Packages ipkgs/palm-web-updates/Packages
.PHONY: webos-patches-index
webos-patches-index: ipkgs/webos-patches/1.4.0/Packages ipkgs/webos-patches/1.4.1/Packages
rm -f ipkgs/webos-patches/1.4.1.1
ln -f -s 1.4.1 ipkgs/webos-patches/1.4.1.1
.PHONY: hardware-index
hardware-index: ipkgs/hardware/1.4.0/Packages ipkgs/hardware/1.4.1/Packages
rm -f ipkgs/hardware/1.4.1.1
ln -f -s 1.4.1 ipkgs/hardware/1.4.1.1
.PHONY: regression-index
regression-index: ipkgs/regression-testing/1.0.0/Packages ipkgs/regression-testing/2.0.0/Packages
.PHONY: webos-internals-index
webos-internals-index: ipkgs/webos-internals/all/Packages ipkgs/webos-internals/i686/Packages ipkgs/webos-internals/armv6/Packages ipkgs/webos-internals/armv7/Packages
ipkgs/webos-internals/%/Packages: package-subdirs
rm -rf ipkgs/webos-internals/$*
mkdir -p ipkgs/webos-internals/$*
if [ "$*" = "i686" -o "$*" = "all" ] ; then \
( find ${SUBDIRS} -type d -name ipkgs -print | \
xargs -I % find % -name "*_$*.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/webos-internals/$* ) ; \
else \
( find ${SUBDIRS} -type d -name ipkgs -print | \
xargs -I % find % \( -name "*_$*.ipk" -o -name "*_arm.ipk" \) -print | \
xargs -I % rsync -i -a % ipkgs/webos-internals/$* ) ; \
fi
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/webos-internals/$*/Packages ipkgs/webos-internals/$*
gzip -c ipkgs/webos-internals/$*/Packages > ipkgs/webos-internals/$*/Packages.gz
ipkgs/webos-patches/%/Packages: package-webos-patches
rm -rf ipkgs/webos-patches/$*
mkdir -p ipkgs/webos-patches/$*
( find autopatch -type d -name ipkgs -print | \
xargs -I % find % -name "*_$*-*_all.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/webos-patches/$* )
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/webos-patches/$*/Packages ipkgs/webos-patches/$*
gzip -c ipkgs/webos-patches/$*/Packages > ipkgs/webos-patches/$*/Packages.gz
ipkgs/hardware/%/Packages: package-hardware
rm -rf ipkgs/hardware/$*
mkdir -p ipkgs/hardware/$*
( find hardware -type d -name ipkgs -print | \
xargs -I % find % -name "*_$*-*_*.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/hardware/$* )
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/hardware/$*/Packages ipkgs/hardware/$*
gzip -c ipkgs/hardware/$*/Packages > ipkgs/hardware/$*/Packages.gz
ipkgs/optware/%/Packages: package-optware
rm -rf ipkgs/optware/$*
mkdir -p ipkgs/optware/$*
if [ "$*" = "i686" -o "$*" = "all" ] ; then \
( find optware -type d -name ipkgs -print | \
xargs -I % find % -name "*_$*.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/optware/$* ) ; \
else \
( find optware -type d -name ipkgs -print | \
xargs -I % find % \( -name "*_$*.ipk" -o -name "*_arm.ipk" \) -print | \
xargs -I % rsync -i -a % ipkgs/optware/$* ) ; \
fi
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/optware/$*/Packages ipkgs/optware/$*
gzip -c ipkgs/optware/$*/Packages > ipkgs/optware/$*/Packages.gz
ipkgs/regression-testing/%/Packages: package-regression
rm -rf ipkgs/regression-testing/$*
mkdir -p ipkgs/regression-testing/$*
( find regression -type d -name ipkgs -print | \
xargs -I % find % -name "*_$*_all.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/regression-testing/$* )
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/regression-testing/$*/Packages ipkgs/regression-testing/$*
gzip -c ipkgs/regression-testing/$*/Packages > ipkgs/regression-testing/$*/Packages.gz
ipkgs/palm-%/Packages: package-feeds
rm -rf ipkgs/palm-$*
mkdir -p ipkgs/palm-$*
cp feeds/palm-$*/build/Metadata ipkgs/palm-$*/Packages
gzip -c ipkgs/palm-$*/Packages > ipkgs/palm-$*/Packages.gz
ipkgs/%/Packages: package-feeds
rm -rf ipkgs/$*
mkdir -p ipkgs/$*
( find feeds/$* -type d -name ipkgs -print | \
xargs -I % find % -name "*.ipk" -print | \
xargs -I % rsync -i -a % ipkgs/$* )
TAR_OPTIONS=--wildcards \
toolchain/ipkg-utils/ipkg-make-index \
-v -p ipkgs/$*/Packages ipkgs/$*
mv ipkgs/$*/Packages ipkgs/$*/Packages.orig
scripts/merge-metadata.py feeds/$*/build/Metadata ipkgs/$*/Packages.orig > ipkgs/$*/Packages
rm -f ipkgs/$*/Packages.orig*
gzip -c ipkgs/$*/Packages > ipkgs/$*/Packages.gz
package: package-subdirs package-webos-patches package-hardware package-optware package-feeds
package-subdirs: toolchain
for f in `find ${SUBDIRS} -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
package-webos-patches:
for f in `find autopatch -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
package-hardware:
for f in `find hardware -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
package-optware: toolchain
for f in `find optware -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
package-regression: toolchain
for f in `find regression -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
package-feeds: toolchain
for f in `find feeds -mindepth 1 -maxdepth 1 -type d -print` ; do \
if [ -e $$f/Makefile ]; then \
${MAKE} -C $$f package ; \
fi; \
done
toolchain: toolchain/ipkg-utils/ipkg-make-index \
toolchain/cs07q3armel/build/arm-2007q3 \
toolchain/i686-unknown-linux-gnu/build/i686-unknown-linux-gnu \
staging/usr/include/mjson/json.h \
staging/usr/include/lunaservice.h \
staging/usr/include/glib.h
toolchain/cs07q3armel/build/arm-2007q3:
${MAKE} -C toolchain/cs07q3armel unpack
toolchain/i686-unknown-linux-gnu/build/i686-unknown-linux-gnu:
${MAKE} -C toolchain/i686-unknown-linux-gnu unpack
staging/usr/include/mjson/json.h:
${MAKE} -C toolchain/mjson stage
staging/usr/include/lunaservice.h:
${MAKE} -C toolchain/lunaservice stage
staging/usr/include/glib.h:
${MAKE} -C toolchain/glib stage
upload:
rsync -avr ipkgs/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/
rsync -avr ipkgs/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/
rsync -avr ipkgs/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/
testing: webos-internals-testing webos-patches-testing hardware-testing optware-testing regression-testing
webos-internals-testing:
${MAKE} SUBDIRS="testing" webos-internals-index
rsync -avr ipkgs/webos-internals/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/webos-internals/testing/
rsync -avr ipkgs/webos-internals/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/webos-internals/testing/
rsync -avr ipkgs/webos-internals/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/webos-internals/testing/
webos-patches-testing:
${MAKE} SUFFIX=.testing webos-patches-index
rsync -avr ipkgs/webos-patches/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/webos-patches/testing/
rsync -avr ipkgs/webos-patches/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/webos-patches/testing/
rsync -avr ipkgs/webos-patches/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/webos-patches/testing/
hardware-testing: hardware-index
rsync -avr ipkgs/hardware/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/hardware/testing/
rsync -avr ipkgs/hardware/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/hardware/testing/
rsync -avr ipkgs/hardware/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/hardware/testing/
optware-testing: optware-index
rsync -avr ipkgs/optware/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/optware/testing/
rsync -avr ipkgs/optware/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/optware/testing/
rsync -avr ipkgs/optware/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/optware/testing/
regression-testing: regression-index
rsync -avr ipkgs/regression-testing/ preware@ipkg1.preware.org:/home/preware/htdocs/ipkg/feeds/regression-testing/
rsync -avr ipkgs/regression-testing/ preware@ipkg2.preware.org:/home/preware/htdocs/ipkg/feeds/regression-testing/
rsync -avr ipkgs/regression-testing/ preware@ipkg3.preware.org:/home/preware/htdocs/ipkg/feeds/regression-testing/
distclean: clobber
find toolchain -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clobber: clean clobber-subdirs clobber-patches clobber-optware clobber-regression clobber-feeds
rm -rf ipkgs
clobber-subdirs:
find ${SUBDIRS} -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clobber-patches:
find autopatch -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clobber-optware:
find optware -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clobber-regression:
find regression -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clobber-feeds:
find feeds -mindepth 1 -maxdepth 1 -type d -print | \
xargs -I % ${MAKE} -C % clobber
clean:
find . -name "*~" -delete