Remove CT_BROKEN.
Only one component is actually BROKEN (libelf), make it depend on EXPERIMENTAL, but state BROKEN in the prompt.
ltrace (which depends on libelf) is now marked as EXPERIMENTAL, with the reference to the BROKEN libelf in the help entry.
/trunk/docs/overview.txt | 6 0 6 0 ------
/trunk/config/debug/ltrace.in | 7 4 3 0 ++++---
/trunk/config/global/ct-behave.in | 8 0 8 0 --------
/trunk/config/tools/libelf.in | 5 3 2 0 +++--
4 files changed, 7 insertions(+), 19 deletions(-)
3 VERSION=$(cat .version)
6 # All absolutely required tools, one per line to ease diff.
7 # See function 'has_or_abort, below, for syntax
8 # - Hopefully, if gcc is present, then all associated tools will be
9 # - awk must be GNU awk
10 # - makeinfo for building docs, even if discarded later on
11 # - others obvious... :-/
13 # Format of a pattern to check for, one per line:
14 # pattern := tool_test OR pattern|tool_test
15 # tool_test := tool/regexp
16 # tool := name of the tool OR absolute pathname to the tool
17 # regexp := valid grep(1) extended regular expression OR empty
19 # In case a pattern list is given (eg foo|bar|buz), then tests are performed
20 # from left to right, stopping at the first matching test (like the shell
21 # would parse 'foo || bar || buz' ).
24 # /bin/bash/^GNU bash, version 3\.
25 # will ensure that /bin/bash exists, and that $(/bin/bash --version)
26 # matches the regexp '^GNU bash, version 3\.'
27 # autoconf/(GNU Autoconf)|autoconf2.50/
29 # - 'autoconf' is to be found in the PATH, and that $(autoconf
30 # --version) matches the regexp '(GNU Autoconf)' (which btw is
31 # the signature of autoconf >= 2.50),
33 # - 'autoconf2.50' is to be found in the PATH
36 /bin/bash/^GNU bash, version 3\.
52 PREFIX_DEFAULT=/usr/local
65 # Simply print the error message, and exit. Obvious, he?
71 # A small function to test for existence of various tools
72 # Usage: has_or_abort test_pattern (see top of file, TOOLS_TO_CHECK, for
73 # complete pattern format)
75 { IFS="|"; for item in ${1}; do
78 printf "Checking for '${tool}'... "
79 where=$(which "${tool}" 2>/dev/null || true)
80 if [ -z "${where}" ]; then
85 if [ -n "${regexp}" ]; then
86 str=$(${tool} --version 2>&1 |grep -E "${regexp}" |head -n 1)
87 if [ -z "${str}" ]; then
88 echo "wrong version string"
98 [ ${FORCE} -eq 0 ] && do_error "Bailing out..."
102 # Given an option string and the following argument,
103 # echoes the value of the option.
104 # If --var=val => echoes val and returns 0, meaning second arg was not consumed
105 # If --var val => echoes val and returns non null, meaning second arg was used
110 echo "${1}" |cut -d '=' -f 2-
121 # The set_xxx functions will set the corresponding configuration variable
122 # They return 0 if second arg was not consumed, and non-zero if it was consumed.
124 PREFIX=$(get_optval "$1" "$2")
129 BINDIR=$(get_optval "$1" "$2")
134 LIBDIR=$(get_optval "$1" "$2")
139 DOCDIR=$(get_optval "$1" "$2")
144 MANDIR=$(get_optval "$1" "$2")
148 # The set_contrib function is different in that it will work like the others,
149 # except in two cases:
150 # If all => replaces all with the list of all available contribs
151 # If list => just echoes the list of all available contribs, and instructs
152 # caller to quit immediately by setting do_quit to non null.
153 # (can't use the return code, see above).
155 opt_val=$(get_optval "$1" "$2")
159 CONTRIB_list=$(LC_ALL=C ls -1 contrib/*.patch.lzma \
160 |xargs -I {} basename {} .patch.lzma \
161 |sed -r -e ':a; /$/N; s/\n/,/; ta;'
166 echo "Available contributions:"
167 LC_ALL=C ls -1 contrib/*.patch.lzma \
168 |xargs -I {} basename {} .patch.lzma \
171 *) CONTRIB_list="${CONTRIB_list},${opt_val}";;
178 \`configure' configures crosstool-NG ${VERSION} to adapt to many kind of systems.
180 USAGE: ./configure [OPTION]...
182 Defaults for the options are specified in brackets.
185 -h, --help display this help and exit
186 --force force ./configure to complete, even if one or more
187 tools were not found. Use at your own risk, only if
188 you know what you are doing!
190 Installation directories:
191 --prefix=PREFIX install files in PREFIX [${PREFIX_DEFAULT}]
192 --local don't install, and use current directory
194 By default, \`make install' will install all the files in
195 \`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc. You can specify
196 an installation prefix other than \`${PREFIX_DEFAULT}' using \`--prefix',
197 for instance \`--prefix=\${HOME}'.
199 For better control, use the options below.
201 Fine tuning of the installation directories:
202 --bindir=DIR user executables [PREFIX/bin]
203 --libdir=DIR object code libraries [PREFIX/lib]
204 --docdir=DIR info documentation [PREFIX/share/doc]
205 --mandir=DIR man documentation [PREFIX/share/man]
208 --with-contrib=XXX Include externally contributed features found in the
209 contrib/ sub-directory. Set to a comma-separated list
210 of features. Use 'all' to use all contributions, and
211 'list' to see which are available.
215 #---------------------------------------------------------------------
218 while [ $# -ne 0 ]; do
220 --prefix*) set_prefix "$1" "$2" && shift || shift 2;;
221 --bindir*) set_bindir "$1" "$2" && shift || shift 2;;
222 --libdir*) set_libdir "$1" "$2" && shift || shift 2;;
223 --docdir*) set_docdir "$1" "$2" && shift || shift 2;;
224 --mandir*) set_mandir "$1" "$2" && shift || shift 2;;
225 --local) LOCAL_set=1; shift;;
226 --force) FORCE=1; shift;;
228 set_contrib "$1" "$2" && shift || shift 2
229 [ "${do_quit}" = "1" ] && exit 0
231 --help|-h) do_help; exit 0;;
237 [ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
239 # Special case when installing locally
240 if [ "${LOCAL_set}" = "1" ]; then
244 set_docdir "" $(pwd)/docs
245 set_mandir "" $(pwd)/docs
248 #---------------------------------------------------------------------
249 # Some sanity checks, now
251 # If this version is a svn snapshot, try to get the revision number
252 # If we can't get the revision number, use date
253 printf "Computing version string... "
256 REVISION=$(LC_ALL=C svnversion)
257 case "${REVISION}" in
259 VERSION="${VERSION}unknown@$(date +%Y%m%d.%H%M%S)";;
261 URL=$(LC_ALL=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
262 ROOT=$(LC_ALL=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
263 VERSION="${VERSION}${URL#${ROOT}}@${REVISION}"
266 # Arrange to have no / in the directory name, no need to create an
267 # arbitrarily deep directory structure
268 VERSION=$(echo "${VERSION}" |sed -r -e 's|/+|_|g;')
273 # Now we have the version string, we can build up the paths
274 [ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
275 [ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
276 [ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
277 [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
279 # Check the existence of absolutely required tools
282 for tool in ${TOOLS_TO_CHECK}; do
283 has_or_abort "${tool}"
287 # It's safer to change all ',' to spaces rather than setting IFS
288 CONTRIB_list=$(echo "${CONTRIB_list}" |sed -r -e 's/,+/ /g;')
289 if [ -n "${CONTRIB_list}" ]; then
291 printf "Applying contributed code: "
292 for c in ${CONTRIB_list}; do
294 if [ ! -f "contrib/${c}.patch.lzma" ]; then
295 do_error "Contribution '${c}' does not exist"
297 lzcat "contrib/${c}.patch.lzma" |patch -p1 >/dev/null 2>&1
302 printf "Building up Makefile... "
303 sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \
304 -e "s,@@LIBDIR@@,${LIBDIR},g;" \
305 -e "s,@@DOCDIR@@,${DOCDIR},g;" \
306 -e "s,@@MANDIR@@,${MANDIR},g;" \
307 -e "s,@@VERSION@@,${VERSION},g;" \
308 -e "s,@@DATE@@,${DATE},g;" \
309 -e "s,@@LOCAL@@,${LOCAL_set},g;" \
310 Makefile.in >Makefile
315 crosstool-NG configured as follows:
321 CONTRIB='${CONTRIB_list}'