Check-in [945dafb370]
Overview
Comment:Experimental version that makes it possible to only rebuild the previously failed parts.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:945dafb37084ff55c9b6a8716c3b2ea8026b875c
User & Date: schelte on 2013-08-21 21:14:25
Other Links: manifest | tags
Context
2013-09-11
13:36
Reflect the latest changes in the README file. check-in: a0175128eb user: schelte tags: trunk
2013-08-21
21:14
Experimental version that makes it possible to only rebuild the previously failed parts. check-in: 945dafb370 user: schelte tags: trunk
2013-08-18
10:20
Provide a build script for the dbus extension, making it available as an optional package that can be included when building a tclkit. check-in: 591a13879c user: schelte tags: trunk
Changes

Modified kitcreator from [35b0320bb7] to [f33d7d8aef].

     1      1   #! /usr/bin/env bash
     2      2   
            3  +# Determine appropriate mode
            4  +mode="build"
            5  +case "$1" in
            6  +	clean|distclean|build|retry)
            7  +		mode="$1"
            8  +		shift
            9  +		;;
           10  +esac
           11  +
           12  +# Determine which Tcl version to build
     3     13   TCLVERS="8.5.14"
     4     14   if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then
     5     15   	TCLVERS="$1"
     6     16   
     7     17   	shift
     8     18   fi
     9     19   export TCLVERS
    10     20   
    11         -# Determine appropriate mode
    12         -mode="build"
    13         -if [ "$1" = "clean" ]; then
    14         -	shift
    15         -
    16         -	mode="clean"
    17         -fi
    18         -if [ "$1" = "distclean" ]; then
    19         -	shift
    20         -
    21         -	mode="distclean"
    22         -fi
    23         -
    24     21   # Verify that "pre.sh" has been run if this is a development snapshot of
    25     22   # KitCreator
    26     23   if [ -f 'build/pre.sh' ]; then
    27     24   	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
    28     25   		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
    29     26   	fi
    30     27   fi
    31     28   
    32     29   # Define the list of all packages, for cleaning purposes
    33     30   KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus"
           31  +# Always rebuild kitsh
           32  +rm -f "kitsh/.success"
    34     33   for pkg in ${KITCREATOR_ALLPKGS}; do
    35         -	rm -f "${pkg}/build.log"
    36         -	rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
           34  +	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
           35  +		rm -f "${pkg}/build.log" "${pkg}/.success"
           36  +		rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
    37     37   
    38         -	rm -rf "${pkg}/src"/tmp-*
           38  +		rm -rf "${pkg}/src"/tmp-*
           39  +	fi
    39     40   
    40     41   	if [ "${mode}" = "distclean" ]; then
    41     42   		rm -rf "${pkg}/src"
    42     43   	fi
    43     44   done
    44     45   
    45     46   # We're all done if we're in clean or distclean mode
................................................................................
   126    127   done
   127    128   export TCLSH_NATIVE
   128    129   
   129    130   # Do build
   130    131   failedpkgs=""
   131    132   buildfailed="0"
   132    133   for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
   133         -	echo -n "Building ${pkg} ..."
   134         -
   135    134   	failed="0"
   136         -	(
   137         -		cd "${pkg}" >/dev/null 2>/dev/null || exit 1
          135  +	if [ -f "${pkg}/.success" ]; then
          136  +		echo -n "Skipping ${pkg} ..."
          137  +	else
          138  +		echo -n "Building ${pkg} ..."
          139  +
          140  +		(
          141  +			cd "${pkg}" >/dev/null 2>/dev/null || exit 1
   138    142   
   139         -		./build.sh 3>&1 4>&2 > build.log 2>&1 || exit 1
   140         -	) || failed="1"
          143  +			./build.sh 3>&1 4>&2 > build.log 2>&1 || exit 1
          144  +		) || failed="1"
          145  +	fi
   141    146   
   142    147   	if [ "${failed}" = "1" ]; then
   143    148   		echo " failed."
   144    149   		failedpkgs="${failedpkgs} ${pkg}"
   145    150   	else
   146    151   		echo " done."
   147    152   	fi
................................................................................
   152    157   			TCLCONFIGDIRTAIL="$(basename "${TCLCONFIGDIR}")"
   153    158   			export TCLCONFIGDIR TCLCONFIGDIRTAIL
   154    159   			;;
   155    160   	esac
   156    161   
   157    162   	if [ "${failed}" = "1" ]; then
   158    163   		buildfailed="1"
          164  +	else
          165  +		touch "${pkg}/.success"
   159    166   	fi
   160    167   done
   161    168   
   162    169   if [ -n "${failedpkgs}" ]; then
   163    170   	echo "Failed to build:${failedpkgs}"
   164    171   fi
   165    172