1 | #!/bin/bash
|
---|
2 |
|
---|
3 | # cross-lfs temporary tcl build (for running testsuites)
|
---|
4 | # ------------------------------------------------------
|
---|
5 | # $LastChangedBy$
|
---|
6 | # $LastChangedDate$
|
---|
7 | # $LastChangedRevision$
|
---|
8 | # $HeadURL$
|
---|
9 | #
|
---|
10 |
|
---|
11 | cd ${SRC}
|
---|
12 | LOG=tcl-temp.log
|
---|
13 |
|
---|
14 | # Test if the 64 script has been called.
|
---|
15 | # This should only really get called during bi-arch builds
|
---|
16 | SELF=`basename ${0}`
|
---|
17 | set_buildenv
|
---|
18 | set_libdirname
|
---|
19 | setup_multiarch
|
---|
20 |
|
---|
21 | if [ "${USE_SYSROOT}" = "Y" ]; then
|
---|
22 | BUILD_PREFIX=/usr
|
---|
23 | else
|
---|
24 | BUILD_PREFIX=${TGT_TOOLS}
|
---|
25 | fi
|
---|
26 |
|
---|
27 | unpack_tarball tcl${TCL_VER}-src &&
|
---|
28 | cd ${PKGDIR}/unix
|
---|
29 |
|
---|
30 | if [ ! "${libdirname}" = "lib" ]; then
|
---|
31 | extra_conf="--libdir=${BUILD_PREFIX}/${libdirname}"
|
---|
32 |
|
---|
33 | # Change TCL_LIBRARY in Makefile so it is under $(libdir)
|
---|
34 | test -f Makefile.in-ORIG || cp -p Makefile.in Makefile.in-ORIG
|
---|
35 | sed '/TCL_LIBRARY/s@\$(prefix)/lib@$(libdir)@g' \
|
---|
36 | Makefile.in-ORIG > Makefile.in
|
---|
37 | fi
|
---|
38 |
|
---|
39 | # Fix brokenness in configure with bash-3.1
|
---|
40 | case ${TCL_VER} in
|
---|
41 | 8.4.1[12] )
|
---|
42 | if [ ! -f configure-ORIG ]; then cp configure configure-ORIG ; fi
|
---|
43 | sed "s/relid'/relid/" < configure-ORIG > configure
|
---|
44 | ;;
|
---|
45 | esac
|
---|
46 | max_log_init Tcl ${TCL_VER} "temp (shared)" ${CONFLOGS} ${LOG}
|
---|
47 | CC="${CC-gcc} ${ARCH_CFLAGS}" \
|
---|
48 | ./configure --prefix=${BUILD_PREFIX} ${extra_conf} \
|
---|
49 | >> ${LOGFILE} 2>&1 &&
|
---|
50 | echo " o Configure OK" &&
|
---|
51 |
|
---|
52 | min_log_init ${BUILDLOGS} &&
|
---|
53 | make ${PMFLAGS} LDFLAGS="-s" \
|
---|
54 | >> ${LOGFILE} 2>&1 &&
|
---|
55 | echo " o Build OK" &&
|
---|
56 |
|
---|
57 | min_log_init ${TESTLOGS} &&
|
---|
58 | make test \
|
---|
59 | >> ${LOGFILE} 2>&1 &&
|
---|
60 | echo " o Test OK" &&
|
---|
61 | # clock test may fail... not a real concern for our purposes...
|
---|
62 |
|
---|
63 | min_log_init ${INSTLOGS} &&
|
---|
64 | make install \
|
---|
65 | >> ${LOGFILE} 2>&1 &&
|
---|
66 | echo " o Install OK" || barf
|
---|
67 |
|
---|
68 | # Following for ~tcl 8.4.12
|
---|
69 | case ${TCL_VER} in
|
---|
70 | 8.4.1[2-9]* )
|
---|
71 | make install-private-headers \
|
---|
72 | >> ${LOGFILE} 2>&1 &&
|
---|
73 | echo " o install-private-headers OK" || barf
|
---|
74 | ;;
|
---|
75 | esac
|
---|
76 |
|
---|
77 | # Create symlink for tclsh
|
---|
78 | TCLSH=$(basename $(find ${BUILD_PREFIX}/bin -type f -name tclsh\*))
|
---|
79 | test "tclsh" != "${TCLSH}" &&
|
---|
80 | ln -sf ./${TCLSH} ${BUILD_PREFIX}/bin/tclsh
|
---|
81 |
|
---|