Move the build commands to a shell script, run with the -e flag so any
failure causes the script to exit. In the script, verify that "make
distclean" removes everything produced by "make" and "make check".
--- /dev/null
+cd src
+autoreconf
+./configure --enable-maintainer-mode --with-ldap
+make $MAKEVARS
+make check
+make distclean
+# Check for files unexpectedly not removed by make distclean.
+rm -rf autom4te.cache configure include/autoconf.h.in
+if [ -n "$(git ls-files -o)" ]; then
+ exit 1
+fi
- sudo make install
- cd ../..
-script: cd src && autoreconf && ./configure --enable-maintainer-mode --with-ldap && make $MAKEVARS && make check
+script: sh -ex .travis-ci.sh