ct-ng.comp
author Ray Donnelly <mingw.android@gmail.com>
Sat Sep 14 02:45:23 2013 +0100 (2013-09-14)
changeset 3231 69f5dc1ff327
parent 3167 15f57d843296
permissions -rw-r--r--
configure: Add --with-gperf option

On OS X, Apple supply an old gperf (3.0.3) with xcode and
xcode commandline tools which causes build failures:

./zconf.hash.c:183:17: error: expected expression
{offsetof(struct kconf_id_strings_t, kconf_id_strings_str2),

.. upgrading to gperf 3.0.4 was sufficient to fix this,
so this option allows the user to specify the gperf
program that they wish to use.

To install gperf 3.0.4 from homebrew, I did:

brew tap homebrew/dupes
brew install homebrew/dupes/gperf

.. then passed --with-gperf=$BREWFIX/Cellar/gperf/3.0.4/bin/gperf
to configure

Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Message-Id: <CAOYw7dtCmcJ9WiqmQ81MmZeRPcV-tDOqe9=kRDW4uQGuZNd2Ng@mail.gmail.com>
Patchwork-Id: 274892
     1 # To be sourced
     2 
     3 _ct_ng () {
     4     local cur prev samples show_samples actions steps start_steps stop_steps ct_ng_opts vars
     5     COMPREPLY=()
     6     cur=$(_get_cword)
     7     prev=${COMP_WORDS[COMP_CWORD-1]}
     8 
     9     samples=$( "${COMP_WORDS[0]}" list-samples-short 2>/dev/null )
    10     show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/g;')
    11     build_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1build-/g;')
    12     check_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1check-/g;')
    13 
    14     steps=$(${COMP_WORDS[0]} list-steps 2>/dev/null |awk '$1 == "-" { print $2; }')
    15     start_steps=$(echo "${steps}" |sed -r -e 's/($| )/\1+/;')
    16     stop_steps=$(echo "${steps}" |sed -r -e 's/(^| )/+\1/;')
    17 
    18     actions='help menuconfig oldconfig saveconfig extractconfig
    19              defconfig savedefconfig
    20              build build. build-all build-all.
    21              wiki-samples list-samples list-samples-short check-samples
    22              list-steps
    23              show-tuple show-all show-config
    24              clean distclean updatetools
    25              tarball version'
    26 
    27     vars="RESTART= STOP= PREFIX= V= DEFCONFIG="
    28 
    29     ct_ng_opts="${samples} ${show_samples} ${build_samples} ${check_samples}
    30                 ${steps} ${start_steps} ${stop_steps}
    31                 ${actions} ${vars}"
    32 
    33     COMPREPLY=($(compgen -W "${ct_ng_opts}" -- "${cur}"))
    34     return 0
    35 }
    36 complete -F _ct_ng ct-ng