--- trunk/include/multilib.sminc 2012/03/02 15:27:45 11300 +++ trunk/include/multilib.sminc 2012/10/10 09:13:52 13488 @@ -1,6 +1,9 @@ # $Id$ # multilib abis +# tell the buildsystem that we are doing a multilib build +export MULTILIB_BUILD="true" + # be verbose or nor (true|false} : ${MULTILIB_VERBOSE="true"} @@ -89,6 +92,8 @@ else echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" fi + echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" + echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" fi @@ -100,7 +105,7 @@ echo -e "${COLBLUE}*** ${COLGREEN} EMUL_LINUX_32${COLDEFAULT}='${EMUL_LINUX_32}'" fi uname(){ linux32 uname $@; } && export -f uname - ORIG_CHOST="${CHOST}" && export CHOST="i686-pc-linux-gnu" + local orig_chost="${CHOST}" && export CHOST="i686-pc-linux-gnu" fi if [[ ${MULTILIB_VERBOSE} = true ]] then @@ -119,7 +124,7 @@ if [[ ${EMUL_LINUX_32} = true ]] then unset uname - export CHOST="${ORIG_CHOST}" && unset ORIG_CHOST + export CHOST="${orig_chost}" && unset orig_chost fi } @@ -152,6 +157,7 @@ echo -e "${COLBLUE}*** ${COLGREEN} LDFLAGS${COLDEFAULT}='${COLYELLOW}not exported${COLDEFAULT}'" fi echo -e "${COLBLUE}*** ${COLGREEN} CHOST${COLDEFAULT}='${CHOST}'" + echo -e "${COLBLUE}*** ${COLGREEN} SRCDIR${COLDEFAULT}='${SRCDIR}/${SRCSUBDIR}'" echo -e "${COLBLUE}*** ${COLGREEN} PKG_CONFIG_PATH${COLDEFAULT}='${PKG_CONFIG_PATH}'" fi @@ -176,7 +182,7 @@ # export this for mpatch etc (to repect only-${abi}) export MULTILIB_ONLY_ABI=${abi} - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} $@ || die # unset this is very important @@ -197,7 +203,7 @@ # export this for mpatch etc (to repect only-${abi}) export MULTILIB_ONLY_ABI=${abi} - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} $@ || die # unset this is very important @@ -211,7 +217,7 @@ local abi for abi in ${MULTILIB_ABIS} do - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} $@ || die done } @@ -221,6 +227,31 @@ echo \${ABI} } +mabi-cc() +{ + echo "\"gcc -\${ABI}\"" +} + +mabi-cxx() +{ + echo "\"g++ -\${ABI}\"" +} + +mabi-cflags() +{ + echo "\"\${CFLAGS}\"" +} + +mabi-cxxflags() +{ + echo "\"\${CXXFLAGS}\"" +} + +mabi-ldflags() +{ + echo "\"\${LDFLAGS}\"" +} + ## # multilib compile functions ## @@ -241,7 +272,7 @@ for abi in ${abis_to_run} do - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} oldmconfigure $@ || die done } @@ -264,7 +295,7 @@ for abi in ${abis_to_run} do SRCDIR="${saved_SRCDIR}-${abi}" - cd ${SRCDIR} + cd ${SRCDIR}/${SRCSUBDIR} abi-${abi} oldcmake_configure $@ || die done # restore SRCDIR @@ -288,7 +319,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}unpacking for ABI -${abi}${COLDEFAULT}" - oldmunpack ${SRCFILE} || die + oldmunpack $@ || die mv ${SRCDIR} ${SRCDIR}-${abi} || die done } @@ -310,7 +341,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} oldmmake $@ || die done } @@ -332,7 +363,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} abi-${abi} oldminstall $@ || die done } @@ -348,7 +379,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} make DESTDIR=${BINDIR} $@ install || die done } @@ -370,7 +401,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}appling patch for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} oldmpatch $@ || die done } @@ -392,7 +423,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}running mlibtoolize for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} oldmlibtoolize $@ || die done } @@ -414,7 +445,7 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}running mautoreconf for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} oldmautoreconf $@ || die done } @@ -437,7 +468,7 @@ for abi in ${abis_to_run} do - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} oldminstalldocs $@ || die done } @@ -468,7 +499,7 @@ local i for abi in ${MULTILIB_ABIS} do - cd ${SRCDIR}-${abi} + cd ${SRCDIR}-${abi}/${SRCSUBDIR} for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ FAQ LICENSE NEWS README TODO do