Diff

Differences From Artifact [fd4b02e79e]:

To Artifact [69556eb898]:


     4      4   if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | grep '^cvs_' >/dev/null; then
     5      5   	TCLVERS="$1"
     6      6   
     7      7   	shift
     8      8   fi
     9      9   export TCLVERS
    10     10   
    11         -# Add packages implied by the additional arguments
    12         -if [ -z "${KITCREATOR_PKGS}" ]; then
    13         -	KITCREATOR_PKGS="tk itcl mk4tcl"
    14         -fi
    15         -
           11  +# Determine appropriate mode
    16     12   mode="build"
    17     13   if [ "$1" = "clean" ]; then
    18     14   	shift
    19     15   
    20     16   	mode="clean"
    21     17   fi
    22     18   if [ "$1" = "distclean" ]; then
    23     19   	shift
    24     20   
    25     21   	mode="distclean"
    26     22   fi
    27     23   
           24  +# Define the list of all packages, for cleaning purposes
           25  +KITCREATOR_ALLPKGS="tcl tclvfs zlib tk itcl mk4tcl threads"
           26  +for pkg in ${KITCREATOR_ALLPKGS}; do
           27  +	rm -f "${pkg}/build.log"
           28  +	rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
           29  +
           30  +	if [ "${mode}" = "distclean" ]; then
           31  +		rm -rf "${pkg}/src"
           32  +	fi
           33  +done
           34  +
           35  +# We're all done if we're in clean or distclean mode
    28     36   if [ "${mode}" = "clean" -o "${mode}" = "distclean" ]; then
    29         -	# List all additional packages here so that they get cleaned up
    30         -	KITCREATOR_PKGS="${KITCREATOR_PKGS} thread"
           37  +	exit 0
           38  +fi
           39  +
           40  +# Add packages implied by the additional arguments
           41  +if [ -z "${KITCREATOR_PKGS}" ]; then
           42  +	KITCREATOR_PKGS="tk itcl mk4tcl"
    31     43   fi
    32     44   
    33     45   CONFIGUREEXTRA="$@"
    34     46   export CONFIGUREEXTRA
    35     47   
    36     48   if echo " ${CONFIGUREEXTRA} " | grep ' --enable-threads' >/dev/null 2>/dev/null; then
    37     49   	KITCREATOR_PKGS="${KITCREATOR_PKGS} thread"
................................................................................
    40     52   failedpkgs=""
    41     53   buildfailed="0"
    42     54   for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
    43     55   	if [ "${mode}" = "distclean" ]; then
    44     56   		rm -rf "${pkg}/src"
    45     57   	fi
    46     58   
    47         -	if [ "${mode}" = "clean" -o "${mode}" = "distclean" ]; then
    48         -		rm -f "${pkg}/build.log"
    49         -		rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
    50         -
    51         -		continue
    52         -	fi
    53         -
    54     59   	echo -n "Building ${pkg} ..."
    55     60   
    56     61   	failed="0"
    57     62   	(
    58     63   		cd "${pkg}" >/dev/null 2>/dev/null || exit 1
    59     64   
    60     65   		./build.sh > build.log 2>&1 || exit 1