Hi all:
I am reading gcc's makefile and got such a puzzle.
I checked the makefile and found following rules used to install compiler:
# Install the compiler executables built during cross compilation.
install-common: native $(EXTRA_PARTS) lang.install-common installdirs
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
rm -f $(DESTDIR)$(libexecsubdir)/$$file; \
$(INSTALL_PROGRAM) $$file $(DESTDIR)$(libexecsubdir)/$$file; \
else true; \
fi; \
done
Here the destination directory is $(DESTDIR)$(libexecsubdir)/, but
where is DESTDIR defined?
I did not find any definition of this variable in both toplevel and
gcc's makefile.
One thing is sure that DESTDIR is not empty because I dumped outputs
and found it has
the same value with "sysroot" configured.
Maybe I got the wrong direction because I did not find anything useful
in makefiles.
Can anyone help? just a tip will be ok for me to find out the truth.
Thanks in advance.
Following is the configuration command line , hope useful.
----------------------------------------------------------------------
/cygdrive/g/work/buildroot_patch/buildroot/toolchain_build_mipsel/gcc-4.2.4/configure
\
--prefix=/usr \
--build=i386-pc-linux-gnu \
--host=i386-pc-linux-gnu \
--target=mipsel-linux-uclibc \
--enable-languages=c \
--with-sysroot=/cygdrive/g/work/buildroot_patch/buildroot/build_mipsel/staging_dir
\
--with-build-time-tools=/cygdrive/g/work/buildroot_patch/buildroot/build_mipsel/staging_dir/usr/mipsel-linux-uclibc/bin
\
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
--enable-shared \
--with-gmp=/cygdrive/g/work/buildroot_patch/buildroot/toolchain_build_mipsel/gmp
\
--with-mpfr=/cygdrive/g/work/buildroot_patch/buildroot/toolchain_build_mipsel/mpfr
\
--disable-nls \
--enable-threads \
--disable-multilib \
\
\
--with-abi="32" --with-tune="mips32r2" \
\
--disable-largefile \
----------------------------------------------------