Differences From
Artifact [4831102fe2]:
47 47
48 48 CONFIGUREEXTRA="$@"
49 49 export CONFIGUREEXTRA
50 50
51 51 if echo " ${CONFIGUREEXTRA} " | grep ' --enable-threads' >/dev/null 2>/dev/null; then
52 52 KITCREATOR_PKGS="${KITCREATOR_PKGS} thread"
53 53 fi
54 +
55 +# Set default target
56 +KITTARGET="kitsh"
57 +export KITTARGET
54 58
55 59 # Fix up package list
56 -## If building KitDLL, it must come last
60 +## If building KitDLL, define it as our target
57 61 if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
58 - KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g') kitdll"
62 + KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g')"
63 + KITTARGET="kitdll"
59 64 fi
60 65
61 66 ## If building KitDLL and Tk, must do Tk statically
62 67 ### (Well, we don't HAVE to, but it would defeat much of the purpose)
63 -if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
68 +if [ "${KITTARGET}" = "kitdll" ]; then
64 69 if echo " ${KITCREATOR_PKGS} " | grep ' tk ' >/dev/null 2>/dev/null; then
65 70 if [ "${STATICTK}" != "1" -a "${STATICTK}" != "-1" ]; then
66 71 echo 'Warning: Linking Tk statically because you are building KitDLL' 2>&1
67 72 echo ' Set STATICTK to -1 if you really want to link Tk dynamically.' >&2
68 73
69 74 STATICTK="1"
70 75 export STATICTK
71 76 fi
72 77 fi
73 78 fi
74 79
75 80 failedpkgs=""
76 81 buildfailed="0"
77 -for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
82 +for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} "${KITTARGET}"; do
78 83 echo -n "Building ${pkg} ..."
79 84
80 85 failed="0"
81 86 (
82 87 cd "${pkg}" >/dev/null 2>/dev/null || exit 1
83 88
84 89 ./build.sh > build.log 2>&1 || exit 1
................................................................................
110 115 if [ "${buildfailed}" != "0" ]; then
111 116 echo 'WARNING: Build is likely incomplete or failed.' >&2
112 117 fi
113 118
114 119 for kitdllfile in 'kitdll/build'/kitdll-*/libtclkit.*; do
115 120 cp "${kitdllfile}" "$(echo "${kitdllfile}" | sed "s@^.*/@@;s@\..*\$@-${TCLVERS}&@")" >/dev/null 2>/dev/null
116 121 done
117 -cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}"
122 +cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}" >/dev/null 2>/dev/null
118 123
119 124 exit "${buildfailed}"