1 # Makefile for the OpenMoko SHR development system
2 # Licensed under the GPL v2 or later
4 BITBAKE_VERSION
= branches
/bitbake-1.8
6 FSO_STABLE_MILESTONE
= milestone3
7 FSO_STABLE_VERSION
= HEAD
9 SHR_STABLE_MILESTONE
= milestone1
10 SHR_STABLE_VERSION
= HEAD
16 prefetch
: prefetch-fso-unstable prefetch-fso-testing prefetch-fso-
${FSO_STABLE_MILESTONE} \
17 prefetch-shr-unstable prefetch-shr-testing prefetch-shr-
${SHR_STABLE_MILESTONE}
21 [ ! -e fso-unstable
] ||
${MAKE} fso-unstable-image
22 [ ! -e fso-testing
] ||
${MAKE} fso-testing-image
23 # [ ! -e fso-${FSO_STABLE_MILESTONE} ] || ${MAKE} fso-${FSO_STABLE_MILESTONE}-image
24 [ ! -e shr-unstable
] ||
${MAKE} shr-unstable-image
25 # [ ! -e shr-testing ] || ${MAKE} shr-testing-image
26 # [ ! -e shr-${SHR_STABLE_MILESTONE} ] || ${MAKE} shr-${SHR_STABLE_MILESTONE}-image
27 [ ! -e fso-unstable
] ||
${MAKE} fso-unstable-packages
28 [ ! -e fso-testing
] ||
${MAKE} fso-testing-packages
29 # [ ! -e fso-${FSO_STABLE_MILESTONE} ] || ${MAKE} fso-${FSO_STABLE_MILESTONE}-packages
32 setup
: setup-common setup-bitbake setup-openembedded \
33 setup-fso-unstable setup-fso-testing setup-fso-
${FSO_STABLE_MILESTONE} \
34 setup-shr-unstable setup-shr-testing setup-shr-
${SHR_STABLE_MILESTONE}
37 update
: update-common update-bitbake update-openembedded
38 [ ! -e shr
] ||
${MAKE} update-shr
41 status
: status-common status-bitbake status-openembedded
42 [ ! -e shr
] ||
${MAKE} status-shr
45 clobber: clobber-fso-unstable clobber-fso-testing clobber-fso-
${FSO_STABLE_MILESTONE} \
46 clobber-shr-unstable clobber-shr-testing clobber-shr-
${SHR_STABLE_MILESTONE}
49 distclean: distclean-bitbake distclean-openembedded \
50 distclean-fso-unstable distclean-fso-testing distclean-fso-
${FSO_STABLE_MILESTONE} \
51 distclean-shr-unstable distclean-shr-testing distclean-shr-
${SHR_STABLE_MILESTONE}
54 prefetch-
%: %/.configured
55 ( cd
$* ; ${MAKE} prefetch
)
58 fso-
%-image
: fso-
%/.configured
60 ${MAKE} setup-image-fso-image
; \
61 ${MAKE} setup-machine-om-gta01
; \
64 ${MAKE} setup-image-fso-image
; \
65 ${MAKE} setup-machine-om-gta02
; \
68 .PHONY
: fso-
%-packages
69 fso-
%-packages
: fso-
%/.configured
71 ${MAKE} setup-image-fso-image
; \
72 ${MAKE} setup-machine-om-gta01
; \
73 ${MAKE} -k distro index
)
75 ${MAKE} setup-image-fso-image
; \
76 ${MAKE} setup-machine-om-gta02
; \
77 ${MAKE} -k distro index
)
80 fso-
%-index
: fso-
%/.configured
82 ${MAKE} setup-image-fso-image
; \
86 shr-
%-image
: shr-
%/.configured
88 ${MAKE} setup-image-shr-image
; \
89 ${MAKE} setup-machine-om-gta01
; \
92 ${MAKE} setup-image-shr-image
; \
93 ${MAKE} setup-machine-om-gta02
; \
96 .PHONY
: shr-
%-packages
97 shr-
%-packages
: shr-
%/.configured
99 ${MAKE} setup-image-shr-image
; \
100 ${MAKE} setup-machine-om-gta01
; \
101 ${MAKE} -k distro index
)
103 ${MAKE} setup-image-shr-image
; \
104 ${MAKE} setup-machine-om-gta02
; \
105 ${MAKE} -k distro index
)
108 shr-
%-index
: shr-
%/.configured
110 ${MAKE} setup-image-shr-image
; \
114 .PRECIOUS
: common
/.git
/config
115 setup-common common
/.git
/config
:
116 [ -e common
/.git
/config
] || \
117 ( git clone git
://git.freesmartphone.org
/fso-makefile.git common
&& \
119 ln
-s common
/Makefile Makefile
)
120 touch common
/.git
/config
122 .PHONY
: setup-bitbake
123 .PRECIOUS
: bitbake
/.svn
/entries
124 setup-bitbake bitbake
/.svn
/entries
:
125 [ -e bitbake
/.svn
/entries
] || \
126 ( svn
co svn
://svn.berlios.de
/bitbake
/${BITBAKE_VERSION} bitbake
)
127 touch bitbake
/.svn
/entries
129 .PHONY
: setup-openembedded
130 .PRECIOUS
: openembedded
/.git
/config
131 setup-openembedded openembedded
/.git
/config
:
132 [ -e openembedded
/.git
/config
] || \
133 ( git clone git
://git.openembedded.net
/openembedded openembedded
; \
135 git config
--add remote.
origin.fetch
'+refs/heads/*:refs/remotes/*' )
136 ( cd openembedded
&& \
137 ( git branch | egrep
-e
' org.openembedded.dev$$' > /dev
/null || \
138 git checkout
-b org.openembedded.dev
--track
origin/org.openembedded.dev
))
139 ( cd openembedded
&& git checkout org.openembedded.dev
)
140 touch openembedded
/.git
/config
143 .PRECIOUS
: shr
/.svn
/entries
144 setup-shr shr
/.svn
/entries
:
145 [ -e shr
/.git
/config
] || \
146 ( git clone http
://shr.bearstech.com
/repo
/shr.git shr
)
147 touch shr
/.git
/config
151 ${MAKE} $*/.configured
153 .PRECIOUS
: setup-fso-
${FSO_STABLE_MILESTONE}
154 setup-fso-
${FSO_STABLE_MILESTONE}:
155 ${MAKE} fso-
${FSO_STABLE_MILESTONE}/.configured
156 rm -f fso-
${FSO_STABLE_MILESTONE}/.configured
157 rm -rf fso-
${FSO_STABLE_MILESTONE}/openembedded
158 ( cd fso-
${FSO_STABLE_MILESTONE} ; \
159 git clone ..
/openembedded
; \
161 git checkout
-b
${FSO_STABLE_MILESTONE} ${FSO_STABLE_VERSION} )
162 touch fso-
${FSO_STABLE_MILESTONE}/.configured
164 .PRECIOUS
: fso-
%/.configured
165 fso-
%/.configured
: common
/.git
/config bitbake
/.svn
/entries openembedded
/.git
/config
166 [ -d fso-
$* ] ||
( mkdir
-p fso-
$* )
167 [ -e downloads
] ||
( mkdir
-p downloads
)
168 [ -e fso-
$*/Makefile
] ||
( cd fso-
$* ; ln
-sf ..
/common
/openembedded.mk Makefile
)
169 [ -e fso-
$*/setup-env
] ||
( cd fso-
$* ; ln
-sf ..
/common
/setup-env .
)
170 [ -e fso-
$*/downloads
] ||
( cd fso-
$* ; ln
-sf ..
/downloads .
)
171 [ -e fso-
$*/bitbake
] ||
( cd fso-
$* ; ln
-sf ..
/bitbake .
)
172 [ -e fso-
$*/openembedded
] ||
( cd fso-
$* ; ln
-sf ..
/openembedded .
)
173 [ -d fso-
$*/conf
] ||
( mkdir
-p fso-
$*/conf
)
174 [ -e fso-
$*/conf
/site.conf
] ||
( cd fso-
$*/conf
; ln
-sf ..
/..
/common
/conf
/site.conf .
)
175 [ -e fso-
$*/conf
/auto.conf
] ||
( \
176 echo
"DISTRO = \"openmoko\"" > fso-
$*/conf
/auto.conf
; \
177 echo
"MACHINE = \"om-gta02\"" >> fso-
$*/conf
/auto.conf
; \
178 echo
"IMAGE_TARGET = \"fso-image\"" >> fso-
$*/conf
/auto.conf
; \
179 echo
"DISTRO_TARGET = \"openmoko-feed\"" >> fso-
$*/conf
/auto.conf
; \
180 echo
"INHERIT += \"rm_work\"" >> fso-
$*/conf
/auto.conf
; \
182 [ -e fso-
$*/conf
/local.conf
] ||
( \
183 echo
"# require conf/distro/include/moko-autorev.inc" > fso-
$*/conf
/local.conf
; \
184 echo
"# require conf/distro/include/fso-autorev.inc" >> fso-
$*/conf
/local.conf
; \
186 rm -rf fso-
$*/tmp
/cache
187 touch fso-
$*/.configured
189 .PRECIOUS
: shr-
%/.configured
190 shr-
%/.configured
: common
/.git
/config bitbake
/.svn
/entries openembedded
/.git
/config shr
/.svn
/entries
191 [ -d shr-
$* ] ||
( mkdir
-p shr-
$* )
192 [ -e downloads
] ||
( mkdir
-p downloads
)
193 [ -e shr-
$*/Makefile
] ||
( cd shr-
$* ; ln
-sf ..
/common
/openembedded.mk Makefile
)
194 [ -e shr-
$*/setup-env
] ||
( cd shr-
$* ; ln
-sf ..
/common
/setup-env .
)
195 [ -e shr-
$*/downloads
] ||
( cd shr-
$* ; ln
-sf ..
/downloads .
)
196 [ -e shr-
$*/bitbake
] ||
( cd shr-
$* ; ln
-sf ..
/bitbake .
)
197 [ -e shr-
$*/openembedded
] ||
( cd shr-
$* ; ln
-sf ..
/openembedded .
)
198 [ -e shr-
$*/shr
] ||
( cd shr-
$* ; ln
-sf ..
/shr .
)
199 [ -d shr-
$*/conf
] ||
( mkdir
-p shr-
$*/conf
)
200 [ -e shr-
$*/conf
/site.conf
] ||
( cd shr-
$*/conf
; ln
-sf ..
/..
/common
/conf
/site.conf .
)
201 [ -e shr-
$*/conf
/topdir.conf
] ||
( \
202 echo
"TOPDIR = '`pwd`'" > shr-
$*/conf
/topdir.conf
; \
204 [ -e shr-
$*/conf
/auto.conf
] ||
( \
205 echo
"DISTRO = \"openmoko\"" > shr-
$*/conf
/auto.conf
; \
206 echo
"MACHINE = \"om-gta02\"" >> shr-
$*/conf
/auto.conf
; \
207 echo
"IMAGE_TARGET = \"shr-image\"" >> shr-
$*/conf
/auto.conf
; \
208 echo
"DISTRO_TARGET = \"openmoko-feed\"" >> shr-
$*/conf
/auto.conf
; \
209 echo
"INHERIT += \"rm_work\"" >> shr-
$*/conf
/auto.conf
; \
211 [ -e shr-
$*/conf
/local.conf
] ||
( \
212 echo
"# require conf/distro/include/moko-autorev.inc" > shr-
$*/conf
/local.conf
; \
213 echo
"# require conf/distro/include/fso-autorev.inc" >> shr-
$*/conf
/local.conf
; \
214 echo
"BBFILES += \"\$${TOPDIR}/shr/openembedded/packages/*/*.bb\"" >> shr-
$*/conf
/local.conf
; \
215 echo
"BB_GIT_CLONE_FOR_SRCREV = \"1\"" >> shr-
$*/conf
/local.conf
; \
216 echo
"OE_ALLOW_INSECURE_DOWNLOADS=1" >> shr-
$*/conf
/local.conf
; \
217 echo
"require conf/distro/include/sane-srcrevs.inc" >> shr-
$*/conf
/local.conf
; \
218 echo
"require conf/distro/include/sane-srcdates.inc" >> shr-
$*/conf
/local.conf
; \
219 echo
"require conf/distro/include/shr-autorev.inc" >> shr-
$*/conf
/local.conf
; \
221 rm -rf shr-
$*/tmp
/cache
222 touch shr-
$*/.configured
224 .PHONY
: update-common
225 update-common
: common
/.git
/config
226 ( cd common
; git pull
)
228 .PHONY
: update-bitbake
229 update-bitbake
: bitbake
/.svn
/entries
230 ( cd bitbake
; svn up
)
232 .PHONY
: update-openembedded
233 update-openembedded
: openembedded
/.git
/config
234 ( cd openembedded
; git pull
)
237 update-shr
: shr
/.svn
/entries
238 ( cd shr
; git pull
)
240 .PHONY
: status-common
241 status-common
: common
/.git
/config
242 ( cd common
; git diff
--stat
)
244 .PHONY
: status-bitbake
245 status-bitbake
: bitbake
/.svn
/entries
246 ( cd bitbake
; svn status
)
248 .PHONY
: status-openembedded
249 status-openembedded
: openembedded
/.git
/config
250 ( cd openembedded
; git diff
--stat
)
253 status-shr
: shr
/.svn
/entries
254 ( cd shr
; git status
)
258 [ ! -e
$*/Makefile
] ||
( cd
$* ; ${MAKE} clobber )
260 .PHONY
: distclean-bitbake
264 .PHONY
: distclean-openembedded
265 distclean-openembedded
:
268 .PHONY
: distclean-shr
280 push-common
: update-common
281 ( cd common
; git push
--all ssh
://git@git.freesmartphone.org
/fso-makefile.git
)