bfin-xxx-gcc主控Makefile中all-host目标的生成

 

快乐虾

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

[email protected]

   

本文适用于

gcc- 4.3.1

configure –target=bfin-uclinux-gnu

Blackfin系列DSP

Cygwin gcc 3.4.4

 

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

 

1.1    all-host

这个目标将在生成all目标时生成。

.PHONY: all-host

 

all-host: maybe-all-ash                      #空目标

all-host: maybe-all-autoconf                 #空目标

all-host: maybe-all-automake                #空目标

all-host: maybe-all-bash                       #空目标

all-host: maybe-all-bison               #空目标

all-host: maybe-all-byacc                     #空目标

all-host: maybe-all-bzip2               #空目标

all-host: maybe-all-dejagnu                   #空目标

all-host: maybe-all-diff                        #空目标

all-host: maybe-all-dosutils                   #空目标

all-host: maybe-all-etc                         #空目标

all-host: maybe-all-fastjar                     #空目标

all-host: maybe-all-fileutils                   #空目标

all-host: maybe-all-findutils                  #空目标

all-host: maybe-all-find                        #空目标

all-host: maybe-all-fixincludes

all-host: maybe-all-flex                        #空目标

all-host: maybe-all-gcc

all-host: maybe-all-gawk               #空目标

all-host: maybe-all-gettext                    #空目标

all-host: maybe-all-gnuserv                  #空目标

all-host: maybe-all-gprof               #空目标

all-host: maybe-all-gzip                        #空目标

all-host: maybe-all-hello                       #空目标

all-host: maybe-all-indent                     #空目标

all-host: maybe-all-intl

all-host: maybe-all-tcl                          #空目标

all-host: maybe-all-itcl                         #空目标

all-host: maybe-all-libcpp

all-host: maybe-all-libdecnumber

all-host: maybe-all-libgui               #空目标

all-host: maybe-all-libiberty

all-host: maybe-all-libtool                     #空目标

all-host: maybe-all-m4                         #空目标

all-host: maybe-all-make               #空目标

all-host: maybe-all-mmalloc                 #空目标

all-host: maybe-all-patch               #空目标

all-host: maybe-all-perl                        #空目标

all-host: maybe-all-prms                      #空目标

all-host: maybe-all-rcs                         #空目标

all-host: maybe-all-readline                   #空目标

all-host: maybe-all-release                    #空目标

all-host: maybe-all-recode                    #空目标

all-host: maybe-all-sed                         #空目标

all-host: maybe-all-send-pr                   #空目标

all-host: maybe-all-shellutils                 #空目标

all-host: maybe-all-sid                         #空目标

all-host: maybe-all-sim                        #空目标

all-host: maybe-all-tar                          #空目标

all-host: maybe-all-texinfo                    #空目标

all-host: maybe-all-textutils                  #空目标

all-host: maybe-all-time                       #空目标

all-host: maybe-all-uudecode                #空目标

all-host: maybe-all-wdiff               #空目标

all-host: maybe-all-zip                         #空目标

all-host: maybe-all-zlib

all-host: maybe-all-gdb                        #空目标

all-host: maybe-all-expect                    #空目标

all-host: maybe-all-guile                       #空目标

all-host: maybe-all-tk                           #空目标

all-host: maybe-all-libtermcap        #空目标

all-host: maybe-all-utils                        #空目标

all-host: maybe-all-gnattools                 #空目标

1.1.1   maybe-all-fixincludes

all-host目标的生成依赖于这个目标,而它的依赖关系定义为:

.PHONY: all-fixincludes maybe-all-fixincludes

maybe-all-fixincludes:

TARGET-fixincludes=all

maybe-all-fixincludes: all-fixincludes

即这个目标将依赖于all-fixincludes这个目标。

1.1.1.1             all-fixincludes

这个目标的依赖关系如下:

all-fixincludes: configure-fixincludes

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/fixincludes && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-fixincludes))  

再往下还有:

all-fixincludes: maybe-all-libiberty

因此这个目标将依赖于configure-fixincludesmaybe-all-libibertymaybe-all-libiberty这个依赖关系将在host-i686-pc-cygwin/libiberty子目录下生成一个libiberty.a的库,而configure-fixincludes这个依赖关系将生成host-i686-pc-cygwin/fixincludes子目录并在此子目录下生成Makefile

在上述两部分完成后,将进入host-i686-pc-cygwin/fixincludes子目录并在其中执行make操作,指定的生成目标$(TARGET-fixincludes)的值为all

make之后,将在host-i686-pc-cygwin/fixincludes目录下生成几个文件:

fixincl.exe

fixinc.sh

mkheaders

1.1.1.1.1       configure-fixincludes

可以认为这是一个最终目标:

.PHONY: configure-fixincludes maybe-configure-fixincludes

configure-fixincludes:

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/fixincludes; /

       cd "$(HOST_SUBDIR)/fixincludes" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/fixincludes"; /

       libsrcdir="$$s/fixincludes"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

在这里HOST_SUBDIR定义为:

HOST_SUBDIR = host-i686-pc-cygwin

HOST_EXPORTS则定义为:

# This is the list of variables to export in the environment when

# configuring subdirectories for the host system.  We need to pass

# some to the GCC configure because of its hybrid host/target nature.

HOST_EXPORTS = /

       $(BASE_EXPORTS) /

       CC="$(CC)"; export CC; /

       CFLAGS="$(CFLAGS)"; export CFLAGS; /

       CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; /

       CXX="$(CXX)"; export CXX; /

       CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; /

       AR="$(AR)"; export AR; /

       AS="$(AS)"; export AS; /

       CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; /

       DLLTOOL="$(DLLTOOL)"; export DLLTOOL; /

       LD="$(LD)"; export LD; /

       LDFLAGS="$(LDFLAGS)"; export LDFLAGS; /

       NM="$(NM)"; export NM; /

       RANLIB="$(RANLIB)"; export RANLIB; /

       WINDRES="$(WINDRES)"; export WINDRES; /

       WINDMC="$(WINDMC)"; export WINDMC; /

       OBJCOPY="$(OBJCOPY)"; export OBJCOPY; /

       OBJDUMP="$(OBJDUMP)"; export OBJDUMP; /

       AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; /

       AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; /

       GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; /

       LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; /

       NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; /

       OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; /

       RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; /

       TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; /

       GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; /

       GMPINC="$(HOST_GMPINC)"; export GMPINC; /

       $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);

因而这一段脚本执行后将创建一个叫做host-i686-pc-cygwin的子目录,并在此子目录下又建立一个fixincludes的子目录。

接下来将执行gcc- 4.1.3 /fixincludes/configure脚本,这个脚本将在host-i686-pc-cygwin/fixincludes下创建几个文件:

config.cache

config.h

config.log

config.status

Makefile

mkheaders.almost

stamp-h

1.1.1.1.2       maybe-all-libiberty

这个目标有如下依赖关系:

.PHONY: all-libiberty maybe-all-libiberty

maybe-all-libiberty:

TARGET-libiberty=all

maybe-all-libiberty: all-libiberty

即它将依赖于all-libiberty这个目标。

1.1.1.1.2.1  all-libiberty

这个目标有如下依赖关系:

all-libiberty: configure-libiberty

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/libiberty && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libiberty))

即此目标依赖于configure-libiberty,在configure-libiberty中将创建一个叫做host-i686-pc-cygwin/libiberty的子目录,接下来将执行gcc- 4.1.3 /libiberty/configure脚本,这个脚本将在host-i686-pc-cygwin/libiberty下创建几个用于make的文件。

而在实现此目标的脚本中,将直接进入host-i686-pc-cygwin/libiberty子目录并执行make操作。在这里TARGET-libiberty变量的值为:

TARGET-libiberty=all

因而make之后将在host-i686-pc-cygwin/libiberty子目录下生成一个libiberty.a文件。

对此Makefile的详细分析参见《gcc makefile研究-libiberty.doc

1.1.1.1.2.1.1   configure-libiberty

这是一个最终目标,其执行的脚本如下:

configure-libiberty:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/libiberty; /

       cd "$(HOST_SUBDIR)/libiberty" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/libiberty"; /

       libsrcdir="$$s/libiberty"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1      

在这里HOST_SUBDIR定义为:

HOST_SUBDIR = host-i686-pc-cygwin

因而这一段脚本执行后将创建一个叫做host-i686-pc-cygwin/libiberty的子目录,接下来将执行gcc- 4.1.3 /libiberty/configure脚本,这个脚本将在host-i686-pc-cygwin/libiberty下创建几个文件:

config.cache

config.h

config.log

config.status

Makefile

stamp-h

xhost-mkfrag

testsuite/Makefile

 

1.1.2   all-host: maybe-all-gcc

这个目标的依赖关系为:

.PHONY: all-gcc maybe-all-gcc

maybe-all-gcc:

TARGET-gcc=all

maybe-all-gcc: all-gcc

all-gcc: configure-gcc

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/gcc && /

         $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(TARGET-gcc))

all-gcc: all-libiberty

all-gcc: maybe-all-gmp                        #空目标

all-gcc: maybe-all-intl

all-gcc: maybe-all-mpfr                       #空目标

all-gcc: maybe-all-build-texinfo            #空目标

all-gcc: maybe-all-build-bison        #空目标

all-gcc: maybe-all-build-byacc              #空目标

all-gcc: maybe-all-build-flex                 #空目标

all-gcc: maybe-all-build-libiberty

all-gcc: maybe-all-build-fixincludes

all-gcc: maybe-all-zlib

all-gcc: all-libcpp

all-gcc: all-libdecnumber

all-gcc: maybe-all-libiberty

all-gcc: maybe-all-fixincludes

 

即它依赖于configure-gcc,在configure-gcc中,它将创建host-i686-pc-cygwin/gcc子目录,并执行gcc- 4.3.1 /gcc/configure脚本,执行完这段脚本后,将在host-i686-pc-cygwin/gcc子目录下生成Makefile

而在上面这段脚本中,就是进入host-i686-pc-cygwin/gcc子目录并进行make操作。这里比较重要的是传递进去的参数:

TARGET-gcc=all

1.1.2.1             configure-gcc

这个目标有如下依赖关系:

configure-gcc: maybe-configure-intl

configure-gcc: maybe-all-binutils                 #空目标

configure-gcc: maybe-all-gas                      #空目标

configure-gcc: maybe-all-ld                        #空目标

configure-gcc:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/gcc; /

       cd "$(HOST_SUBDIR)/gcc" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/gcc"; /

       libsrcdir="$$s/gcc"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

maybe-configure-intl这个依赖项中,它将创建host-i686-pc-cygwin/intl子目录,并执行gcc- 4.3.1 /intl/configure脚本,执行完这段脚本后,将在host-i686-pc-cygwin/intl子目录下生成Makefile

在这一段要执行的脚本中:

HOST_SUBDIR = host-i686-pc-cygwin

srcdir = .

HOST_CONFIGARGS = --cache-file=./config.cache  '--enable-languages=c,c++,fortran,java,objc' --program-transform-name='s,^,bfin-uclinux-gnu-,'

build_alias=i686-pc-cygwin

target_alias=bfin-uclinux-gnu

所以这一段脚本将创建host-i686-pc-cygwin/gcc子目录,并执行gcc- 4.3.1 /gcc/configure脚本,执行完这段脚本后,将在host-i686-pc-cygwin/gcc子目录下生成以下几个文件:

.gdbinit

as

auto-host.h

collect-ld

config.cache

config.log

config.status

configargs.h

cstamp-h

gccbug

libaba-mk

Makefile

Make-hooks

nm

ada/Makefile

还创建了以下几个子目录:

build

cp

doc

fortran

java

objc

objcp

treelang

 

1.1.2.1.1       maybe-configure-intl

这个目标的依赖关系为:

.PHONY: configure-intl maybe-configure-intl

maybe-configure-intl:

maybe-configure-intl: configure-intl

configure-intl:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/intl; /

       cd "$(HOST_SUBDIR)/intl" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/intl/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/intl"; /

       libsrcdir="$$s/intl"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

在这一段要执行的脚本中:

HOST_SUBDIR = host-i686-pc-cygwin

srcdir = .

HOST_CONFIGARGS = --cache-file=./config.cache  '--enable-languages=c,c++,fortran,java,objc' --program-transform-name='s,^,bfin-uclinux-gnu-,'

build_alias=i686-pc-cygwin

target_alias=bfin-uclinux-gnu

所以这一段脚本将创建host-i686-pc-cygwin/intl子目录,并执行gcc- 4.3.1 /intl/configure脚本,执行完这段脚本后,将在host-i686-pc-cygwin/intl子目录下生成以下几个文件:

config.cache

config.h

config.intl

config.log

config.status

Makefile

 

1.1.2.2             all-libiberty

这个目标在maybe-all-fixincludes目标中已经执行过了,它将进入host-i686-pc-cygwin/libiberty子目录并执行make操作并生成一个libiberty.a文件,由于此前已经执行过了,因此将略过此目标。

 

1.1.2.3             maybe-all-intl

这个目标的依赖定义为:

.PHONY: all-intl maybe-all-intl

maybe-all-intl:

TARGET-intl=all

maybe-all-intl: all-intl

all-intl: configure-intl

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/intl && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-intl))

这个目标将依赖于configure-intl,而这个目标在configure-gcc时已经实现了,它将调用gcc- 4.3.1 /intl/configure脚本在host-i686-pc-cygwin/intl目录下生成Makefile等文件。

在上述这段脚本中,将进入host-i686-pc-cygwin/intl目录进行Make操作,要求生成的目标

TARGET-intl=all

实际上这个目标将什么也不做。

 

1.1.2.4             all-gcc: maybe-all-build-libiberty

这个目标的依赖关系为:

.PHONY: all-build-libiberty maybe-all-build-libiberty

maybe-all-build-libiberty:

TARGET-build-libiberty=all

maybe-all-build-libiberty: all-build-libiberty

all-build-libiberty: configure-build-libiberty

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(BUILD_EXPORTS) /

       (cd $(BUILD_SUBDIR)/libiberty && /

         $(MAKE)   $(TARGET-build-libiberty))

这个目标依赖于configure-build-libiberty,而这个目标将创建一个叫build-i686-pc-cygwin/libiberty的子目录,并执行gcc- 4.3.1 /libiberty/下的configure脚本,此脚本将在build-i686-pc-cygwin/libiberty子目录下生成Makefile和其它几个文件。

在上述脚本中,将进入build-i686-pc-cygwin/libiberty这个子目录并执行make操作,其目标为:

TARGET-build-libiberty=all

因而make之后将在build-i686-pc-cygwin/libiberty子目录下生成一个libiberty.a文件。

 

1.1.2.4.1       configure-build-libiberty

这个目标定义为:

.PHONY: configure-build-libiberty maybe-configure-build-libiberty

maybe-configure-build-libiberty:

maybe-configure-build-libiberty: configure-build-libiberty

configure-build-libiberty:

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; /

       $(BUILD_EXPORTS) /

       echo Configuring in $(BUILD_SUBDIR)/libiberty; /

       cd "$(BUILD_SUBDIR)/libiberty" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(BUILD_SUBDIR)/libiberty/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/libiberty"; /

       libsrcdir="$$s/libiberty"; /

       rm -f no-such-file || : ; /

       CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure /

         $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

在这里有:

BUILD_SUBDIR = build-i686-pc-cygwin

因此这段脚本将创建build-i686-pc-cygwin/libiberty子目录,并执行gcc- 4.3.1 /libiberty/下的configure脚本,此脚本将在build-i686-pc-cygwin/libiberty子目录下生成以下文件:

config.h

config.log

config.status

Makefile

stamp-h

xhost-mkfrag

testsuite/Makefile

1.1.2.5             maybe-all-build-fixincludes

这个依赖关系定义为:

.PHONY: all-build-fixincludes maybe-all-build-fixincludes

maybe-all-build-fixincludes:

TARGET-build-fixincludes=all

maybe-all-build-fixincludes: all-build-fixincludes

all-build-fixincludes: configure-build-fixincludes

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(BUILD_EXPORTS) /

       (cd $(BUILD_SUBDIR)/fixincludes && /

         $(MAKE)   $(TARGET-build-fixincludes))

再往下还有:

all-build-fixincludes: maybe-all-build-libiberty

因此这个目标将依赖于configure-build-fixincludesmaybe-all-build-libibertymaybe-all-build-libiberty这个依赖关系将在build-i686-pc-cygwin/libiberty子目录下生成一个libiberty.a的库,而configure-build-fixincludes这个依赖关系将生成build-i686-pc-cygwin/fixincludes子目录并在此子目录下生成Makefile

在上述两部分完成后,将进入build-i686-pc-cygwin/fixincludes子目录并在其中执行make操作,指定的生成目标$(TARGET-build-fixincludes)的值为all

make之后,将在build-i686-pc-cygwin/fixincludes目录下生成几个文件:

fixincl.exe

fixinc.sh

mkheaders

 

1.1.2.5.1       configure-build-fixincludes

这个依赖关系定义为:

.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes

maybe-configure-build-fixincludes:

maybe-configure-build-fixincludes: configure-build-fixincludes

configure-build-fixincludes:

       @: $(MAKE); $(unstage)

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; /

       $(BUILD_EXPORTS) /

       echo Configuring in $(BUILD_SUBDIR)/fixincludes; /

       cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(BUILD_SUBDIR)/fixincludes/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/fixincludes"; /

       libsrcdir="$$s/fixincludes"; /

       rm -f no-such-file || : ; /

       CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure /

         $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

在这里有:

BUILD_SUBDIR = build-i686-pc-cygwin

因而这一段脚本执行后将创建一个叫做build-i686-pc-cygwin的子目录,并在此子目录下又建立一个fixincludes的子目录。

接下来将执行gcc- 4.1.3 /fixincludes/configure脚本,这个脚本将在build-i686-pc-cygwin/fixincludes下创建几个文件:

config.h

config.log

config.status

Makefile

mkheaders.almost

stamp-h

 

 

 

 

1.1.2.6             maybe-all-zlib

这个目标的依赖关系定义为:

.PHONY: all-zlib maybe-all-zlib

maybe-all-zlib:

TARGET-zlib=all

maybe-all-zlib: all-zlib

all-zlib: configure-zlib

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/zlib && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-zlib))

这个目标依赖于cofigure-zlib,而configure-zlib目标将创建host-i686-pc-cygwin/zlib目录并在其中生成Makefile

上述这段脚本将进入host-i686-pc-cygwin/zlib目录并执行make操作,最终在此子目录下生成一个libz.a的文件。

 

1.1.2.6.1       configure-zlib

这个目标的依赖关系为:

.PHONY: configure-zlib maybe-configure-zlib

maybe-configure-zlib:

maybe-configure-zlib: configure-zlib

configure-zlib:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/zlib; /

       cd "$(HOST_SUBDIR)/zlib" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/zlib"; /

       libsrcdir="$$s/zlib"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

这一段脚本创建host-i686-pc-cygwin/zlib子目录,然后将执行gcc- 4.3.1 /zlib/configure脚本,此脚本将在host-i686-pc-cygwin/zlib子目录下生成以下文件:

config.cache

config.log

config.status

libtool

Makefile

1.1.2.7             all-libcpp

这个目标的依赖关系定义为:

.PHONY: all-libcpp maybe-all-libcpp

maybe-all-libcpp:

TARGET-libcpp=all

maybe-all-libcpp: all-libcpp

all-libcpp: configure-libcpp

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/libcpp && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libcpp))

这个目标依赖于cofigure-libcppconfigure-libcpp目标将创建host-i686-pc-cygwin/libcpp目录并在其中生成Makefile

上述这段脚本将进入host-i686-pc-cygwin/libcpp目录并执行make操作,最终在此子目录下生成libcpp.amekedepend.exe两个文件。

 

1.1.2.7.1       configure-libcpp

这个目标的依赖关系为:

.PHONY: configure-libcpp maybe-configure-libcpp

maybe-configure-libcpp:

maybe-configure-libcpp: configure-libcpp

configure-libcpp:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/libcpp; /

       cd "$(HOST_SUBDIR)/libcpp" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/libcpp"; /

       libsrcdir="$$s/libcpp"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

这一段脚本创建host-i686-pc-cygwin/libcpp子目录,然后将执行gcc- 4.3.1 /libcpp/configure脚本,此脚本将在host-i686-pc-cygwin/libcpp子目录下生成以下文件:

config.cache

config.h

config.log

config.status

Makefile

stamp-h1

1.1.2.8             all-libdecnumber

这个目标的依赖关系定义为:

.PHONY: all-libdecnumber maybe-all-libdecnumber

maybe-all-libdecnumber:

TARGET-libdecnumber=all

maybe-all-libdecnumber: all-libdecnumber

all-libdecnumber: configure-libdecnumber

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       $(HOST_EXPORTS) /

       (cd $(HOST_SUBDIR)/libdecnumber && /

         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libdecnumber))

这个目标依赖于cofigure-libdecnumberconfigure- libdecnumber目标将创建host-i686-pc-cygwin/ libdecnumber目录并在其中生成Makefile

上述这段脚本将进入host-i686-pc-cygwin/ libdecnumber目录并执行make操作,最终在此子目录下生成libdecnumber.amekedepend.exe两个文件。

 

1.1.2.8.1       configure- libdecnumber

这个目标的依赖关系为:

.PHONY: configure-libdecnumber maybe-configure-libdecnumber

maybe-configure-libdecnumber:

maybe-configure-libdecnumber: configure-libdecnumber

configure-libdecnumber:

       @r=`${PWD_COMMAND}`; export r; /

       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; /

       test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; /

       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; /

       $(HOST_EXPORTS) /

       echo Configuring in $(HOST_SUBDIR)/libdecnumber; /

       cd "$(HOST_SUBDIR)/libdecnumber" || exit 1; /

       case $(srcdir) in /

         /* | [A-Za-z]:[///]*) topdir=$(srcdir) ;; /

         *) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | /

              sed -e 's,/./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; /

       esac; /

       srcdiroption="--srcdir=$${topdir}/libdecnumber"; /

       libsrcdir="$$s/libdecnumber"; /

       $(SHELL) $${libsrcdir}/configure /

         $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} /

         --target=${target_alias} $${srcdiroption}  /

         || exit 1

这一段脚本创建host-i686-pc-cygwin/ libdecnumber子目录,然后将执行gcc- 4.3.1 / libdecnumber /configure脚本,此脚本将在host-i686-pc-cygwin/ libdecnumber子目录下生成以下文件:

config.cache

config.h

config.log

config.status

gstdint.h

Makefile

stamp-h1

 

1.1.2.9             maybe-all-libiberty

这个目标在此前已经完成。

1.1.2.10       maybe-all-fixincludes

这个目标在此前已经完成。

 

 

1.1.3   all-host: maybe-all-intl

此目标之前已经生成,略过。

1.1.4   all-host: maybe-all-libcpp

此目标之前已经生成,略过。

1.1.5   all-host: maybe-all-libdecnumber

此目标之前已经生成,略过。

1.1.6   all-host: maybe-all-libiberty

此目标之前已经生成,略过。

1.1.7   all-host: maybe-all-zlib

此目标之前已经生成,略过。

 

 

 

参考资料

host-i686-pc-cygwin/libiberty/Makefile解析( 2008-8-19 )

host-i686-pc-cygwin/fixincludes/Makefile分析( 2008-8-19 )

host-i686-pc-cygwin/zlib/Makefile分析( 2008-8-19 )

host-i686-pc-cygwin/libcpp/Makefile分析( 2008-8-19 )

host-i686-pc-cygwin/libdecnumber/Makefile分析( 2008-8-19 )

bfin-xxx-gcccc1plus.exe的生成 2008-08-23

bfin-xxx-gccfortran目标的生成( 2008-8-24 )

bfin-xxx-gccjava目标的生成( 2008-8-24 )

bfin-xxx-gccobjc目标的生成( 2008-8-26 )

bfin-xxx-gcccollect2目标的生成( 2008-8-26 )

 

 

 

你可能感兴趣的:(shell,command,脚本,Build,fortran,makefile)