proc backup {arch} { global fileList workpath worksrcpath cd ${worksrcpath} set archPath ${workpath}/${arch} xinstall -d ${archPath} foreach f ${fileList} { set pathList [split ${f} /] set counter 0 set currentDir ${archPath} foreach g ${pathList} incr counter if {${counter} < [llength ${pathList}]} { set currentDir ${currentDir}/${g} xinstall -d ${currentDir} } else { xinstall ${g} ${currentDir} } } } } set cmd [command build] if ${build.env} { set cmd "env ${command build.env} ${cmd}" } if ${command build.args} { set cmd "${cmd} ${command build.args}" } # post-configure allows for fine-tuning the first run default.post-configure {} default.pre-build { global cmd system "${cmd}" backup ppc } # build allows for fine-tuning the second run default.build {} default.post-build { global cmd system "${cmd}" backup i386 }