xref: /openbmc/btbridge/bootstrap.sh (revision 3bf84962)
168bcce03SMatthew Barth#!/bin/sh
268bcce03SMatthew Barth
368bcce03SMatthew BarthAUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
468bcce03SMatthew Barth        config.guess config.h.in config.sub configure depcomp install-sh \
568bcce03SMatthew Barth        ltmain.sh missing *libtool test-driver"
668bcce03SMatthew Barth
768bcce03SMatthew Barthcase $1 in
868bcce03SMatthew Barth    clean)
968bcce03SMatthew Barth        test -f Makefile && make maintainer-clean
1068bcce03SMatthew Barth        test -f linux/bt-bmc.h && rm -rf linux/bt-bmc.h
11*3bf84962SPatrick Williams        test -d linux && find linux -type d -empty -print0 | xargs -0 -r rm -rf
1268bcce03SMatthew Barth        for file in ${AUTOCONF_FILES}; do
13*3bf84962SPatrick Williams            find . -name "$file" -print0 | xargs -0 -r rm -rf
1468bcce03SMatthew Barth        done
1568bcce03SMatthew Barth        exit 0
1668bcce03SMatthew Barth        ;;
1768bcce03SMatthew Barthesac
1868bcce03SMatthew Barth
1968bcce03SMatthew Barthautoreconf -i
20*3bf84962SPatrick Williams# shellcheck disable=SC2016
2168bcce03SMatthew Barthecho 'Run "./configure ${CONFIGURE_FLAGS} && make"'
22