--- trunk/include/multilib.sminc 2018/12/18 12:19:23 31847 +++ trunk/include/multilib.sminc 2018/12/18 13:15:14 31848 @@ -7,6 +7,9 @@ # be verbose or nor (true|false} : ${MULTILIB_VERBOSE="true"} +# enter the abi srcdir as default setting +: ${MULTILIB_ENTER_SRCDIR="true"} + # multilib should call all dependant includes, which gets overridden sminclude mtools @@ -190,7 +193,10 @@ # export this for mpatch etc (to repect only-${abi}) export MULTILIB_ONLY_ABI=${abi} - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} $@ || die # unset this is very important @@ -211,7 +217,10 @@ # export this for mpatch etc (to repect only-${abi}) export MULTILIB_ONLY_ABI=${abi} - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} $@ || die # unset this is very important @@ -225,7 +234,10 @@ local abi for abi in ${MULTILIB_ABIS} do - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} $@ || die done } @@ -280,7 +292,10 @@ for abi in ${abis_to_run} do - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} oldmconfigure $@ || die done } @@ -326,7 +341,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}compiling for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} oldmmake $@ || die done } @@ -349,7 +367,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi abi-${abi} oldminstall $@ || die done } @@ -366,7 +387,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}installing for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi make DESTDIR=${BINDIR} $@ install || die done } @@ -388,7 +412,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}appling patch for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi oldmpatch $@ || die done } @@ -411,7 +438,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}running mlibtoolize for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi oldmlibtoolize $@ || die done } @@ -434,7 +464,10 @@ for abi in ${abis_to_run} do echo -e "${COLBLUE}*** ${COLGREEN}running mautoreconf for ABI -${abi}${COLDEFAULT}" - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi oldmautoreconf $@ || die done } @@ -458,7 +491,10 @@ for abi in ${abis_to_run} do - cd ${SRCDIR}-${abi}/${SRCSUBDIR} + if [[ ${MULTILIB_ENTER_SRCDIR} = true ]] + then + cd ${SRCDIR}-${abi}/${SRCSUBDIR} + fi oldminstalldocs $@ || die done }