bfin-xxx-gcc-4.3.1中config.status的生成及运行(5):参数判断

来源:互联网 发布:毒品网络百度云 编辑:程序博客网 时间:2024/05/21 17:51

 

快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

  

 

本文适用于

gcc-4.3.1

Blackfin系列DSP

Visual Studio 2005

  

欢迎转载,但请保留作者信息

 

 

 

 

cat >>$CONFIG_STATUS <</_ACEOF

# If no file are specified by the user, then we need to provide default

# value.  By we need to know if files were specified by the user.

ac_need_defaults=:

while test $# != 0

do

  case $1 in

  --*=*)

    ac_option=`expr "x$1" : 'x/([^=]*/)='`

    ac_optarg=`expr "x$1" : 'x[^=]*=/(.*/)'`

    ac_shift=:

    ;;

  -*)

    ac_option=$1

    ac_optarg=$2

    ac_shift=shift

    ;;

  *) # This is not an option, so the user has probably given explicit

     # arguments.

     ac_option=$1

     ac_need_defaults=false;;

  esac

 

  case $ac_option in

  # Handling of the options.

_ACEOF

cat >>$CONFIG_STATUS <</_ACEOF

  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)

    ac_cs_recheck=: ;;

  --version | --vers* | -V )

    echo "$ac_cs_version"; exit 0 ;;

  --he | --h)

    # Conflict between --help and --header

    { { echo "$as_me:$LINENO: error: ambiguous option: $1

Try /`$0 --help' for more information." >&5

echo "$as_me: error: ambiguous option: $1

Try /`$0 --help' for more information." >&2;}

   { (exit 1); exit 1; }; };;

  --help | --hel | -h )

    echo "$ac_cs_usage"; exit 0 ;;

  --debug | --d* | -d )

    debug=: ;;

  --file | --fil | --fi | --f )

    $ac_shift

    CONFIG_FILES="$CONFIG_FILES $ac_optarg"

    ac_need_defaults=false;;

  --header | --heade | --head | --hea )

    $ac_shift

    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"

    ac_need_defaults=false;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q /

  | -silent | --silent | --silen | --sile | --sil | --si | --s)

    ac_cs_silent=: ;;

 

  # This is an error.

  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1

Try /`$0 --help' for more information." >&5

echo "$as_me: error: unrecognized option: $1

Try /`$0 --help' for more information." >&2;}

   { (exit 1); exit 1; }; } ;;

 

  *) ac_config_targets="$ac_config_targets $1" ;;

 

  esac

  shift

done

 

ac_configure_extra_args=

 

if $ac_cs_silent; then

  exec 6>/dev/null

  ac_configure_extra_args="$ac_configure_extra_args --silent"

fi

 

_ACEOF

输出到config.status的这一段代码将对通过命令行传递进来的参数进行判断,并将这些参数值赋给不同的变量。

 

 

参考资料

无心插柳-在vs2005中编译GCC4(2008-1-13)

gcc交叉编译的实现(2008-1-25)

vs2005下编译gcc:工程文件(2008-1-30)

asm_out_filegcc汇编代码的生成(2008-1-30)

gcc4.1中的machine_mode(2008-2-1)

gcc 4.3 configure脚本学习(1):前言(2008-4-23)

gcc 4.3 configure脚本学习(2):Be Bourne compatible(2008-4-24)

gcc 4.3 configure脚本学习(3):NLS nuisances(2008-4-24)

bfin-gcc-4.3.1config.h的生成(2008-8-5)

bfin-xxx-gcc-4.3.1config.status的生成及运行(1):输出注释(2008-8-5)

bfin-xxx-gcc-4.3.1config.status的生成及运行(2):Shell检测(2008-8-5)

bfin-xxx-gcc-4.3.1config.status的生成及运行(3):文件配置(2008-8-6)

bfin-xxx-gcc-4.3.1config.status的生成及运行(4):帮助信息输出(2008-8-6)

 

 

 

 

 

原创粉丝点击