8 test -n "$1" && RESULTS=$1 || RESULTS=results.log
10 test -f Makefile && make -k distclean || :
12 ./autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
16 # If the MAKEFLAGS envvar does not yet include a -j option,
17 # add -jN where N depends on the number of processors.
20 *) n=$(getconf _NPROCESSORS_ONLN 2> /dev/null)
21 test "$n" -gt 0 || n=1
23 MAKEFLAGS="$MAKEFLAGS -j$n"
31 # set -o pipefail is a bashism; this use of exec is the POSIX alternative
35 { make syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
43 if [ -n "$AUTOBUILD_COUNTER" ]; then
44 EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
47 EXTRA_RELEASE=".$USER$NOW"
50 if [ -f /usr/bin/rpmbuild ]; then
52 --define "extra_release $EXTRA_RELEASE" \
53 --define "_sourcedir `pwd`" \
54 -ba --clean entangle.spec