Andrew Jeffery | 2277804 | 2017-01-13 22:37:26 +1030 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | AUTOCONF_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 | |
| 7 | case $1 in |
| 8 | clean) |
| 9 | test -f Makefile && make maintainer-clean |
| 10 | test -d linux && find linux -type d -empty | xargs -r rm -rf |
| 11 | for file in ${AUTOCONF_FILES}; do |
| 12 | find -name "$file" | xargs -r rm -rf |
| 13 | done |
| 14 | exit 0 |
| 15 | ;; |
| 16 | esac |
| 17 | |
| 18 | autoreconf -i |
Andrew Jeffery | 56b2aa3 | 2017-04-13 13:25:05 +0930 | [diff] [blame] | 19 | |
| 20 | case $1 in |
| 21 | dev) |
| 22 | ./configure \ |
| 23 | CPPFLAGS="-UNDEBUG" \ |
| 24 | CFLAGS="-fsanitize=address -fsanitize=leak -fsanitize=undefined -Wall -Werror" \ |
| 25 | --enable-code-coverage |
| 26 | ;; |
| 27 | *) |
| 28 | echo 'Run "./configure ${CONFIGURE_FLAGS} && make"' |
| 29 | ;; |
| 30 | esac |