Annotation of elwix/build_tools.sh, revision 1.1.2.5
1.1.2.1 misho 1: #!/bin/sh
2: #
3: # ELWIX build script for cross
4: #
5: # (C) AITNET ltd - Sofia/Bulgaria <office@aitnet.org>
6: # by Michael Pounov <misho@elwix.org>
7: #
1.1.2.5 ! misho 8: # $Id: build_tools.sh,v 1.1.2.4 2012/03/20 15:10:06 misho Exp $
1.1.2.1 misho 9: #
10:
11: [ -r ./config/rc.elwix ] && . ./config/rc.elwix
12: if [ X"${ELWIX_IS_CONFIGURED}" != X"YES" ]; then
13: echo
14: echo "ELWIX project is not configured !?!"
15: echo
16: exit 1
17: fi
1.1.2.5 ! misho 18: V=${VERSION}
1.1.2.4 misho 19: [ -r ${CENV} ] && . ${CENV}
1.1.2.5 ! misho 20: unset INSTALL
! 21: unset VERSION
! 22: VERSION="$V"
1.1.2.1 misho 23:
24: if [ ! -d $BSDSRC ]; then
25: echo
26: echo "ELWIX project is not configured - missing BSD sources !?!"
27: echo
28: exit 1
29: fi
30:
31: if [ ! -d $DEST ]; then
32: echo
33: echo "ELWIX project is not configured - missing Dest directory !?!"
34: echo
35: exit 1
36: fi
37:
38: clean_tools()
39: {
40: echo "+++ Clean ELWIX FreeBSD tools ..."
41:
42: rm -rf ${WORLD}/usr/local
43: install -d ${WORLD}/usr/local
44: install -d ${WORLD}/usr/local/bin
45: install -d ${WORLD}/usr/local/include
46: install -d ${WORLD}/usr/local/lib
47: install -d ${WORLD}/usr/local/libdata
48: install -d ${WORLD}/usr/local/sbin
49:
50: }
51:
1.1.2.4 misho 52: clean_bootstrap()
53: {
54: echo "+++ Clean ELWIX pkgsrc bootstrap tools ..."
55:
56: rm -rf ${WORLD}/usr/pkgsrc/bootstrap/work
57: rm -f /elwix ${WORLD}/usr/pkgsrc
58: rm -rf ${WORLD}/elwix
59: install -d ${WORLD}/elwix
60: ln -sf ${WORLD}/elwix /elwix
61: ln -sf ${PKGSRC} ${WORLD}/usr/pkgsrc
62:
63: install -d ${PKGDIR}
64: install -d ${PKGDIR}/db
65: }
66:
67: compile_bootstrap()
68: {
69: echo "+++ Compile ELWIX pkgsrc bootstrap tools ..."
70: if [ ! -d ${WORLD}/usr/pkgsrc/bootstrap/work ]; then
71: cd ${WORLD}/usr/pkgsrc/bootstrap
72: ./bootstrap --prefix /elwix/pkg --pkgdbdir /elwix/pkg/db
73: cd -
74: else
75: echo " Skip bootstrap pkgsrc - already inited pkgsrc"
76: fi
77:
78: echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${WORLD}/elwix/elwix.ver
79: }
80:
1.1.2.1 misho 81: compile_fbsdtools()
82: {
83: echo "+++ Compile ELWIX FreeBSD tools ..."
84:
85: cd $CROSS_FT_ATH
86: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
87: clean DESTDIR=${WORLD}
88: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
89: DESTDIR=${WORLD}
90: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
91: install DESTDIR=${WORLD}
92: cd -
93:
94: cd $CROSS_FT_IPW
95: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
96: clean DESTDIR=${WORLD}
97: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
98: DESTDIR=${WORLD}
99: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
100: install DESTDIR=${WORLD}/usr/local/bin
101: cd -
102:
103: cd $CROSS_FT_IWI
104: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
105: clean DESTDIR=${WORLD}
106: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
107: DESTDIR=${WORLD}
108: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
109: install DESTDIR=${WORLD}/usr/local/bin
110: cd -
111:
112: cd $CROSS_FT_MWL
113: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
114: clean DESTDIR=${WORLD}
115: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
116: DESTDIR=${WORLD}
117: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
118: install DESTDIR=${WORLD}
119: cd -
120:
121: cd $CROSS_FT_NET80211
122: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
123: clean DESTDIR=${WORLD}
124: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
125: DESTDIR=${WORLD}
126: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
127: install DESTDIR=${WORLD}
128: cd -
129:
130: cd $CROSS_FT_VIMAGE
131: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
132: clean DESTDIR=${WORLD}
133: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
134: DESTDIR=${WORLD}
135: env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
136: install DESTDIR=${WORLD}
137: cd -
138:
139: # cd $CROSS_FT_WTAP
140: # env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
141: # clean DESTDIR=${WORLD}
142: # env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
143: # DESTDIR=${WORLD}
144: # env MAKEOBJDIRPREFIX=${BSDOBJ} make TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
145: # install DESTDIR=${WORLD}
146: # cd -
147: }
148:
149: compile_tools()
150: {
151: echo "+++ Compile ELWIX Cross ..."
1.1.2.2 misho 152:
1.1.2.4 misho 153: unset INSTALL
154:
1.1.2.1 misho 155: cd $CROSS_AXL
156: ${AXL_CFG}
157: ${CBUILD} clean
158: ${CBUILD}
159: ${CBUILD} install
160: cd -
161:
162: cd $CROSS_AITIO
163: ${AITIO_CFG}
164: ${CBUILD} clean
165: ${CBUILD}
166: ${CBUILD} install
167: cd -
168:
169: cd $CROSS_AITCRC
170: ${AITCRC_CFG}
171: ${CBUILD} clean
172: ${CBUILD}
173: ${CBUILD} install
174: cd -
175:
176: cd $CROSS_AITCFG
177: ${AITCFG_CFG}
178: ${CBUILD} clean
179: ${CBUILD}
180: ${CBUILD} install
181: cd -
182:
183: cd $CROSS_AITSESS
184: ${AITSESS_CFG}
185: ${CBUILD} clean
186: ${CBUILD}
187: ${CBUILD} install
188: cd -
189:
190: cd $CROSS_AITRPC
191: ${AITRPC_CFG}
192: ${CBUILD} clean
193: ${CBUILD}
194: ${CBUILD} install
195: cd -
196:
197: cd $CROSS_AITSCHED
198: ${AITSCHED_CFG}
199: ${CBUILD} clean
200: ${CBUILD}
201: ${CBUILD} install
202: cd -
203:
1.1.2.3 misho 204: cd $CROSS_AITWWW
205: ${AITWWW_CFG}
206: ${CBUILD} clean
207: ${CBUILD}
208: ${CBUILD} install
209: cd -
210:
1.1.2.1 misho 211: cd $CROSS_AITPELCO
212: ${AITPELCO_CFG}
213: ${CBUILD} clean
214: ${CBUILD}
215: ${CBUILD} install
216: cd -
217:
218: cd $CROSS_AITPWD
219: ${AITPWD_CFG}
220: ${CBUILD} clean
221: ${CBUILD}
222: ${CBUILD} install
223: cd -
224:
225: cd $CROSS_AITSYNC
226: ${AITSYNC_CFG}
227: ${CBUILD} clean
228: ${CBUILD}
229: ${CBUILD} install
230: cd -
231:
232: cd $CROSS_AITCLI
233: ${AITCLI_CFG}
234: ${CBUILD} clean
235: ${CBUILD}
236: ${CBUILD} install
237: cd -
238:
239: cd $CROSS_AITMQTT
240: ${AITMQTT_CFG}
241: ${CBUILD} clean
242: ${CBUILD}
243: ${CBUILD} install
244: cd -
245:
246: cd $CROSS_EMBEDTOOLS
247: ${EMBEDTOOLS_CFG}
248: ${CBUILD} clean
249: ${CBUILD}
250: ${CBUILD} install
251: cd -
252:
253: cd $CROSS_ANSH
254: ${ANSH_CFG}
255: ${CBUILD} clean
256: ${CBUILD}
257: ${CBUILD} install
258: cd -
259:
260: echo "ELWIX Platform:${PLATFORM} Version:${VERSION} TargetArch:${TARGET_ARCH}" >${WORLD}/usr/local/elwix.ver
261: }
262:
263: ### main()
1.1.2.5 ! misho 264: if ! SnitVer ${WORLD}/elwix/elwix.ver; then
1.1.2.4 misho 265: clean_bootstrap
266: compile_bootstrap
267: else
268: echo "Skipped ELWIX bootstrap pkgsrc tools build ..."
269: fi
270:
1.1.2.5 ! misho 271: if ! SnitVer ${WORLD}/usr/local/elwix.ver; then
1.1.2.1 misho 272: clean_tools
273: compile_fbsdtools
274: compile_tools
275: else
276: echo "Skipped ELWIX tools build ..."
277: fi
278:
279: echo "+++ Complete build ELWIX tools"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>