Ratan Gupta | ec26fa6 | 2018-04-16 15:28:36 +0530 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -eu |
| 4 | |
| 5 | AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \ |
| 6 | config.guess config.h.in config.sub configure depcomp install-sh \ |
| 7 | ltmain.sh missing *libtool test-driver" |
| 8 | |
| 9 | BOOTSTRAP_MODE="" |
| 10 | |
| 11 | if [ $# -gt 0 ]; |
| 12 | then |
| 13 | BOOTSTRAP_MODE="${1}" |
| 14 | shift 1 |
| 15 | fi |
| 16 | |
| 17 | case ${BOOTSTRAP_MODE} in |
| 18 | clean) |
| 19 | test -f Makefile && make maintainer-clean |
| 20 | for file in ${AUTOCONF_FILES}; do |
| 21 | find -name "$file" | xargs -r rm -rf |
| 22 | done |
| 23 | exit 0 |
| 24 | ;; |
| 25 | esac |
| 26 | |
| 27 | autoreconf -i |
| 28 | |
| 29 | case ${BOOTSTRAP_MODE} in |
| 30 | dev) |
| 31 | ./configure \ |
| 32 | ${CONFIGURE_FLAGS} \ |
| 33 | --enable-code-coverage \ |
| 34 | --enable-oe-sdk \ |
| 35 | "$@" |
| 36 | ;; |
| 37 | *) |
| 38 | echo 'Run "./configure ${CONFIGURE_FLAGS} && make"' |
| 39 | ;; |
| 40 | esac |
| 41 | |