[[ -n "$TARGET" ]] || TARGET="%_target_cpu" unset ASM_BI case "$TARGET" in sparc64) ASM64="asm-sparc64" ASM="asm-sparc" ASM_BI="asm-bi-sparc64" ;; x86_64|amd64|i*86|athlon) ASM="arch-x86" ;; s390x) ASM="asm-s390" ;; ppc|ppc64) ASM="asm-powerpc" ;; *) ASM="arch-$TARGET" esac # Setup bi-arch headers if [ -z "$ASM_BI" ]; then mv $ASM/asm asm else mv $ASM_BI/asm asm fi # Clean-ups find . -maxdepth 1 -type d -name "arch-*" ! -name "asm-generic" | xargs rm -rf