Hex Artifact Content

Artifact 4313924d82d828393aa6b1384cf7cfb403f7194e:


0000: 23 21 20 2f 62 69 6e 2f 62 61 73 68 0a 0a 43 43  #! /bin/bash..CC
0010: 52 4f 4f 54 3d 22 24 7b 48 4f 4d 45 7d 2f 72 6f  ROOT="${HOME}/ro
0020: 6f 74 2f 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 65  ot/cross-compile
0030: 72 73 22 0a 53 45 54 55 50 5f 43 43 3d 22 24 7b  rs".SETUP_CC="${
0040: 43 43 52 4f 4f 54 7d 2f 73 65 74 75 70 2d 63 63  CCROOT}/setup-cc
0050: 22 0a 0a 66 6f 72 20 70 6c 61 74 66 6f 72 6d 20  "..for platform 
0060: 69 6e 20 69 33 38 36 2d 70 63 2d 73 6f 6c 61 72  in i386-pc-solar
0070: 69 73 32 2e 31 30 40 73 6f 6c 61 72 69 73 32 2e  is2.10@solaris2.
0080: 31 30 2d 69 78 38 36 20 69 33 38 36 2d 70 63 2d  10-ix86 i386-pc-
0090: 73 6f 6c 61 72 69 73 32 2e 31 30 2c 36 34 40 73  solaris2.10,64@s
00a0: 6f 6c 61 72 69 73 32 2e 31 30 2d 78 38 36 5f 36  olaris2.10-x86_6
00b0: 34 20 6d 69 70 73 65 6c 2d 75 6e 6b 6e 6f 77 6e  4 mipsel-unknown
00c0: 2d 6c 69 6e 75 78 2d 75 63 6c 69 62 63 40 6c 69  -linux-uclibc@li
00d0: 6e 75 78 2d 67 6c 69 62 63 32 2e 30 2d 6d 69 70  nux-glibc2.0-mip
00e0: 73 65 6c 20 73 70 61 72 63 2d 73 75 6e 2d 73 6f  sel sparc-sun-so
00f0: 6c 61 72 69 73 32 2e 38 40 73 6f 6c 61 72 69 73  laris2.8@solaris
0100: 32 2e 38 2d 73 70 61 72 63 20 73 70 61 72 63 2d  2.8-sparc sparc-
0110: 73 75 6e 2d 73 6f 6c 61 72 69 73 32 2e 38 2c 36  sun-solaris2.8,6
0120: 34 40 73 6f 6c 61 72 69 73 32 2e 38 2d 73 70 61  4@solaris2.8-spa
0130: 72 63 36 34 20 73 70 61 72 63 2d 73 75 6e 2d 73  rc64 sparc-sun-s
0140: 6f 6c 61 72 69 73 32 2e 31 30 40 73 6f 6c 61 72  olaris2.10@solar
0150: 69 73 32 2e 31 30 2d 73 70 61 72 63 20 73 70 61  is2.10-sparc spa
0160: 72 63 2d 73 75 6e 2d 73 6f 6c 61 72 69 73 32 2e  rc-sun-solaris2.
0170: 31 30 2c 36 34 40 73 6f 6c 61 72 69 73 32 2e 31  10,64@solaris2.1
0180: 30 2d 73 70 61 72 63 36 34 20 78 38 36 5f 36 34  0-sparc64 x86_64
0190: 2d 75 6e 6b 6e 6f 77 6e 2d 66 72 65 65 62 73 64  -unknown-freebsd
01a0: 38 40 66 72 65 65 62 73 64 38 2d 78 38 36 5f 36  8@freebsd8-x86_6
01b0: 34 20 78 38 36 5f 36 34 2d 75 6e 6b 6e 6f 77 6e  4 x86_64-unknown
01c0: 2d 6e 65 74 62 73 64 35 40 6e 65 74 62 73 64 35  -netbsd5@netbsd5
01d0: 2d 78 38 36 5f 36 34 3b 20 64 6f 0a 09 63 63 5f  -x86_64; do..cc_
01e0: 70 6c 61 74 66 6f 72 6d 3d 22 24 28 65 63 68 6f  platform="$(echo
01f0: 20 22 24 7b 70 6c 61 74 66 6f 72 6d 7d 22 20 7c   "${platform}" |
0200: 20 63 75 74 20 2d 66 20 31 20 2d 64 20 27 40 27   cut -f 1 -d '@'
0210: 29 22 0a 09 74 63 6c 5f 70 6c 61 74 66 6f 72 6d  )"..tcl_platform
0220: 3d 22 24 28 65 63 68 6f 20 22 24 7b 70 6c 61 74  ="$(echo "${plat
0230: 66 6f 72 6d 7d 22 20 7c 20 63 75 74 20 2d 66 20  form}" | cut -f 
0240: 32 20 2d 64 20 27 40 27 29 22 0a 09 6f 70 74 73  2 -d '@')"..opts
0250: 3d 27 27 0a 09 73 65 74 75 70 5f 63 63 5f 6f 70  =''..setup_cc_op
0260: 74 73 3d 27 27 0a 09 63 6f 6e 66 69 67 75 72 65  ts=''..configure
0270: 5f 6f 70 74 73 3d 27 27 0a 0a 09 69 66 20 65 63  _opts=''...if ec
0280: 68 6f 20 22 24 7b 63 63 5f 70 6c 61 74 66 6f 72  ho "${cc_platfor
0290: 6d 7d 22 20 7c 20 67 72 65 70 20 27 2c 27 20 3e  m}" | grep ',' >
02a0: 2f 64 65 76 2f 6e 75 6c 6c 3b 20 74 68 65 6e 0a  /dev/null; then.
02b0: 09 09 6f 70 74 73 3d 22 24 28 65 63 68 6f 20 22  ..opts="$(echo "
02c0: 24 7b 63 63 5f 70 6c 61 74 66 6f 72 6d 7d 22 20  ${cc_platform}" 
02d0: 7c 20 63 75 74 20 2d 66 20 32 2d 20 2d 64 20 27  | cut -f 2- -d '
02e0: 2c 27 20 7c 20 73 65 64 20 27 73 40 2c 40 20 40  ,' | sed 's@,@ @
02f0: 67 27 29 22 0a 09 09 63 63 5f 70 6c 61 74 66 6f  g')"...cc_platfo
0300: 72 6d 3d 22 24 28 65 63 68 6f 20 22 24 7b 63 63  rm="$(echo "${cc
0310: 5f 70 6c 61 74 66 6f 72 6d 7d 22 20 7c 20 63 75  _platform}" | cu
0320: 74 20 2d 66 20 31 20 2d 64 20 27 2c 27 29 22 0a  t -f 1 -d ',')".
0330: 09 66 69 0a 0a 09 63 61 73 65 20 22 24 7b 74 63  .fi...case "${tc
0340: 6c 5f 70 6c 61 74 66 6f 72 6d 7d 22 20 69 6e 0a  l_platform}" in.
0350: 09 09 2a 36 34 29 0a 09 09 09 69 73 36 34 62 69  ..*64)....is64bi
0360: 74 3d 27 31 27 0a 09 09 09 3b 3b 0a 09 09 2a 29  t='1'....;;...*)
0370: 0a 09 09 09 69 73 36 34 62 69 74 3d 27 30 27 0a  ....is64bit='0'.
0380: 09 09 09 3b 3b 0a 09 65 73 61 63 0a 0a 09 66 6f  ...;;..esac...fo
0390: 72 20 6f 70 74 20 69 6e 20 24 6f 70 74 73 3b 20  r opt in $opts; 
03a0: 64 6f 0a 09 09 63 61 73 65 20 22 24 7b 6f 70 74  do...case "${opt
03b0: 7d 22 20 69 6e 0a 09 09 09 36 34 29 0a 09 09 09  }" in....64)....
03c0: 09 73 65 74 75 70 5f 63 63 5f 6f 70 74 73 3d 22  .setup_cc_opts="
03d0: 24 7b 73 65 74 75 70 5f 63 63 5f 6f 70 74 73 7d  ${setup_cc_opts}
03e0: 20 36 34 22 0a 09 09 09 09 69 73 36 34 62 69 74   64".....is64bit
03f0: 3d 27 31 27 0a 09 09 09 09 3b 3b 0a 09 09 65 73  ='1'.....;;...es
0400: 61 63 0a 09 64 6f 6e 65 0a 0a 09 69 66 20 5b 20  ac..done...if [ 
0410: 22 24 7b 69 73 36 34 62 69 74 7d 22 20 3d 20 27  "${is64bit}" = '
0420: 31 27 20 5d 3b 20 74 68 65 6e 0a 09 09 63 6f 6e  1' ]; then...con
0430: 66 69 67 75 72 65 5f 6f 70 74 73 3d 22 24 7b 63  figure_opts="${c
0440: 6f 6e 66 69 67 75 72 65 5f 6f 70 74 73 7d 20 2d  onfigure_opts} -
0450: 2d 65 6e 61 62 6c 65 2d 36 34 62 69 74 22 0a 09  -enable-64bit"..
0460: 66 69 0a 0a 09 28 0a 09 09 65 76 61 6c 20 22 24  fi...(...eval "$
0470: 28 22 24 7b 53 45 54 55 50 5f 43 43 7d 22 20 22  ("${SETUP_CC}" "
0480: 24 7b 63 63 5f 70 6c 61 74 66 6f 72 6d 7d 22 20  ${cc_platform}" 
0490: 24 7b 73 65 74 75 70 5f 63 63 5f 6f 70 74 73 7d  ${setup_cc_opts}
04a0: 20 7c 7c 20 65 63 68 6f 20 65 78 69 74 20 31 29   || echo exit 1)
04b0: 22 0a 0a 09 09 46 4f 52 43 45 5f 50 4c 41 54 46  "....FORCE_PLATF
04c0: 4f 52 4d 3d 22 24 7b 74 63 6c 5f 70 6c 61 74 66  ORM="${tcl_platf
04d0: 6f 72 6d 7d 22 0a 09 09 65 78 70 6f 72 74 20 46  orm}"...export F
04e0: 4f 52 43 45 5f 50 4c 41 54 46 4f 52 4d 0a 0a 09  ORCE_PLATFORM...
04f0: 09 2e 2f 62 75 69 6c 64 5f 61 6c 6c 2e 73 68 20  ../build_all.sh 
0500: 63 6c 65 61 6e 0a 0a 09 09 2e 2f 62 75 69 6c 64  clean...../build
0510: 5f 61 6c 6c 2e 73 68 20 2d 2d 68 6f 73 74 3d 22  _all.sh --host="
0520: 24 7b 63 63 5f 70 6c 61 74 66 6f 72 6d 7d 22 20  ${cc_platform}" 
0530: 24 7b 63 6f 6e 66 69 67 75 72 65 5f 6f 70 74 73  ${configure_opts
0540: 7d 0a 09 29 0a 64 6f 6e 65 0a 0a                 }..).done..