xref: /openbmc/btbridge/bootstrap.sh (revision 68bcce03)
1*68bcce03SMatthew Barth#!/bin/sh
2*68bcce03SMatthew Barth
3*68bcce03SMatthew BarthAUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
4*68bcce03SMatthew Barth        config.guess config.h.in config.sub configure depcomp install-sh \
5*68bcce03SMatthew Barth        ltmain.sh missing *libtool test-driver"
6*68bcce03SMatthew Barth
7*68bcce03SMatthew Barthcase $1 in
8*68bcce03SMatthew Barth    clean)
9*68bcce03SMatthew Barth        test -f Makefile && make maintainer-clean
10*68bcce03SMatthew Barth        test -f linux/bt-bmc.h && rm -rf linux/bt-bmc.h
11*68bcce03SMatthew Barth        test -d linux && find linux -type d -empty | xargs -r rm -rf
12*68bcce03SMatthew Barth        for file in ${AUTOCONF_FILES}; do
13*68bcce03SMatthew Barth            find -name "$file" | xargs -r rm -rf
14*68bcce03SMatthew Barth        done
15*68bcce03SMatthew Barth        exit 0
16*68bcce03SMatthew Barth        ;;
17*68bcce03SMatthew Barthesac
18*68bcce03SMatthew Barth
19*68bcce03SMatthew Barthautoreconf -i
20*68bcce03SMatthew Barthecho 'Run "./configure ${CONFIGURE_FLAGS} && make"'
21