#!/usr/bin/env bash mkdir -v build cd build || exit 1 ../configure --prefix=/usr \ --sysconfdir=/etc \ --enable-ld=default \ --enable-plugins \ --enable-shared \ --disable-werror \ --enable-64-bit-bfd \ --enable-new-dtags \ --with-system-zlib \ --enable-defualt-hash-style=gnu make tooldir=/usr PID=$$ if ! make -k check | tee /tmp/binutils_make_check_${PID}.log then find . -type f -name '*.log' -exec grep --files-with-matches ^FAIL {} \; | while IFS= read -r failure do case "${failure}" in ./gprofng/gprofng.log) continue ;; *) echo "test failure" return 1 ;; esac done fi make tooldir=/usr install rm -rfv /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a /usr/share/doc/gprofng/