2 run gmake -w -j $(detectNumCPUs) $@
5 function configure () {
6 if [[ ! -f configure.ac && ! -f configure.in ]]; then
7 echo "ERROR: Neither configure.ac nor configure.in exists in the current directory." >&2
11 if [[ ! -f configure ]]; then
12 run autoreconf -v -i -f
15 if [[ ! -f "_build/Makefile" ]]; then
18 run ../configure "${configArgs[@]}"
25 runMake -C "_build" $buildTarget
30 runMake -C "_build/$docDirectory" $docTarget
35 runMake -C "_build" check "$@"
44 runMake -C "_build" dist
49 runMake -C "_build" install "$0"
56 This is an automation script designed to work with autotools. It creates a
57 directory "./_build" and builds any files inside it.
59 If no COMMAND is given, it defaults to "build".
62 build run "$0 configure" then make(1).
63 check [ARG] run "$0 build" then "make check [ARG]".
64 configure run autoreconf(1) and "./configure" if necessary.
65 clean run "rm -rf _build"
67 doc similar to "$0 build" but only build the documentation.
68 install [ARG] run "$0 build" then "make install [ARG]".
70 Please report any bugs, feature requests, and pull requests (the most
71 preferred!) to the maintainer presented in the preamble of the "$0" itself.
79 ""|"build" ) cmd="build" ;;
80 "configure") cmd="configure";;
82 "check" ) cmd="check" ;;
83 "clean" ) cmd="clean" ;;
84 "dist" ) cmd="dist" ;;
85 "install" ) cmd="install" ;;