7 if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
8 # This part is allowed to fail
9 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
10 chmod +x .git/hooks/pre-commit && \
11 echo "Activated pre-commit hook." || :
14 # README and INSTALL are required by automake, but may be deleted by
15 # clean up rules. to get automake to work, simply touch these here,
16 # they will be regenerated from their corresponding *.in files by
20 # make sure m4 dir exist
23 autoreconf --force --install --verbose || exit $?
25 if [ "x$opt" = "xc" ]; then
28 make clean > /dev/null
29 elif [ "x$opt" = "xd" ]; then
31 ./configure CFLAGS='-g -O0 -ftrapv' $args
32 make clean > /dev/null
33 elif [ "x$opt" = "xg" ]; then
35 ./configure CFLAGS='-g -Og -ftrapv' $args
36 make clean > /dev/null
37 elif [ "x$opt" = "xl" ]; then
39 ./configure CC=clang CFLAGS='-g -O0 -ftrapv' $args
40 make clean > /dev/null
41 elif [ "x$opt" = "xs" ]; then
43 scan-build ./configure CFLAGS='-std=gnu99 -g -O0 -ftrapv' $args