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
47 function distcheck () {
49 runMake -C "_build" distcheck
54 runMake -C "_build" install "$0"
61 This is an automation script designed to work with autotools. It creates a
62 directory "./_build" and builds any files inside it.
64 If no COMMAND is given, it defaults to "build".
67 build run "$0 configure" then make(1).
68 check [ARG] run "$0 build" then "make check [ARG]".
69 configure run autoreconf(1) and "./configure" if necessary.
70 clean run "rm -rf _build"
72 distcheck run "$0 configure" then "make distcheck"
73 doc similar to "$0 build" but only build the documentation.
74 install [ARG] run "$0 build" then "make install [ARG]".
76 Please report any bugs, feature requests, and pull requests (the most
77 preferred!) to the maintainer presented in the preamble of the "$0" itself.
85 ""|"build" ) cmd="build" ;;
86 "configure") cmd="configure";;
88 "check" ) cmd="check" ;;
89 "clean" ) cmd="clean" ;;
90 "dist" ) cmd="dist" ;;
91 "distcheck") cmd="distcheck";;
92 "install" ) cmd="install" ;;