Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -6,15 +6,11 @@ shift fi export TCLVERS -# Add packages implied by the additional arguments -if [ -z "${KITCREATOR_PKGS}" ]; then - KITCREATOR_PKGS="tk itcl mk4tcl" -fi - +# Determine appropriate mode mode="build" if [ "$1" = "clean" ]; then shift mode="clean" @@ -23,13 +19,29 @@ shift mode="distclean" fi +# Define the list of all packages, for cleaning purposes +KITCREATOR_ALLPKGS="tcl tclvfs zlib tk itcl mk4tcl threads" +for pkg in ${KITCREATOR_ALLPKGS}; do + rm -f "${pkg}/build.log" + rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build" + + if [ "${mode}" = "distclean" ]; then + rm -rf "${pkg}/src" + fi +done + +# We're all done if we're in clean or distclean mode if [ "${mode}" = "clean" -o "${mode}" = "distclean" ]; then - # List all additional packages here so that they get cleaned up - KITCREATOR_PKGS="${KITCREATOR_PKGS} thread" + exit 0 +fi + +# Add packages implied by the additional arguments +if [ -z "${KITCREATOR_PKGS}" ]; then + KITCREATOR_PKGS="tk itcl mk4tcl" fi CONFIGUREEXTRA="$@" export CONFIGUREEXTRA @@ -42,17 +54,10 @@ for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do if [ "${mode}" = "distclean" ]; then rm -rf "${pkg}/src" fi - if [ "${mode}" = "clean" -o "${mode}" = "distclean" ]; then - rm -f "${pkg}/build.log" - rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build" - - continue - fi - echo -n "Building ${pkg} ..." failed="0" ( cd "${pkg}" >/dev/null 2>/dev/null || exit 1 Index: kitsh/buildsrc/kitsh-0.0/mk4tcl.tcl ================================================================== --- kitsh/buildsrc/kitsh-0.0/mk4tcl.tcl +++ kitsh/buildsrc/kitsh-0.0/mk4tcl.tcl @@ -4,14 +4,12 @@ # # June 2002, Jean-Claude Wippler # this is needed so often that I just drop copies of it all over the place if {![info exists auto_index(lassign)] && [info commands lassign] == ""} { - set auto_index(lassign) { - proc lassign {l args} { - foreach v $l a $args { uplevel 1 [list set $a $v] } - } + proc lassign {l args} { + foreach v $l a $args { uplevel 1 [list set $a $v] } } } catch { load {} zlib