bfin-xxx-gcc-4.3.1中config.status的生成及运行(7):创建临时目录

快乐虾

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

[email protected]

   

 

本文适用于

gcc- 4.3.1

Blackfin系列DSP

Visual Studio 2005

   

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

 

 

 

cat >>$CONFIG_STATUS <</_ACEOF

for ac_config_target in $ac_config_targets

do

  case "$ac_config_target" in

  # Handling of arguments.

  "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;

  "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;

  "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;

  "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;

  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;

  "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;

  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5

echo "$as_me: error: invalid argument: $ac_config_target" >&2;}

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

  esac

done

 

# If the user did not use the arguments to specify the items to instantiate,

# then the envvar interface is used.  Set only those that are not.

# We use the long form for the default assignment because of an extremely

# bizarre bug on SunOS 4.1.3 .

if $ac_need_defaults; then

  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files

  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers

  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands

fi

 

# Have a temporary directory for convenience.  Make it in the build tree

# simply because there is no reason to put it here, and in addition,

# creating and moving files from /tmp can sometimes cause problems.

# Create a temporary directory, and hook for its removal unless debugging.

$debug ||

{

  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0

  trap '{ (exit 1); exit 1; }' 1 2 13 15

}

 

# Create a (secure) tmp directory for tmp files.

 

{

  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&

  test -n "$tmp" && test -d "$tmp"

}  ||

{

  tmp=./confstat$$-$RANDOM

  (umask 077 && mkdir $tmp)

} ||

{

   echo "$me: cannot create a temporary directory in ." >&2

   { (exit 1); exit 1; }

}

 

_ACEOF

在输出的这一段代码中,由于$ac_config_targets为空,因此第一个for循环将不会执行。再下来,由于$ac_needs_defaults非空,因此对$CONFIG_FILES,  $CONFIG_HEADERS,  $CONFIG_COMMANDS三个变量进行赋值,经过这一步后,有如下几个值:

$CONFIG_FILES=" as:exec-tool.in collect-ld:exec-tool.in nm:exec-tool.in Makefile gccbug libada-mk  "

    $CONFIG_HEADERS =" auto-host.h:config.in"

    $CONFIG_COMMANDS =" default"

在这段代码的最后,创建了一个临时目录。

 

 

 

 

 

参考资料

无心插柳-在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 )

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

bfin-xxx-gcc-4.3.1config.status的生成及运行(6):子目录获取( 2008-8-6 )

 

 

 

你可能感兴趣的:(bfin-xxx-gcc-4.3.1中config.status的生成及运行(7):创建临时目录)