blob: fd1cf12580a8871a235dfe3ee7225ab145b4f3fe [file] [log] [blame]
Matthew Barth68bcce02016-10-17 15:02:05 -05001#!/bin/sh
2
3AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
4 config.guess config.h.in config.sub configure depcomp install-sh \
5 ltmain.sh missing *libtool test-driver"
6
7case $1 in
8 clean)
9 test -f Makefile && make maintainer-clean
10 test -f linux/bt-bmc.h && rm -rf linux/bt-bmc.h
Patrick Williams3bf84962021-04-13 14:41:37 -050011 test -d linux && find linux -type d -empty -print0 | xargs -0 -r rm -rf
Matthew Barth68bcce02016-10-17 15:02:05 -050012 for file in ${AUTOCONF_FILES}; do
Patrick Williams3bf84962021-04-13 14:41:37 -050013 find . -name "$file" -print0 | xargs -0 -r rm -rf
Matthew Barth68bcce02016-10-17 15:02:05 -050014 done
15 exit 0
16 ;;
17esac
18
19autoreconf -i
Patrick Williams3bf84962021-04-13 14:41:37 -050020# shellcheck disable=SC2016
Matthew Barth68bcce02016-10-17 15:02:05 -050021echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'