X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=src%2Fmain.bash;h=f5659701c632389c9844480d97ed8d48d1ff4ba3;hb=c9f3b2f5a916e75b60a1c8eb5ff814a0c168b48e;hp=b59aa3c0d021e2b1d06ab5ccc1b855a196aab194;hpb=322cd299c43ba56d1671ebaad08a73d85b3f35be;p=autobuild.git diff --git a/src/main.bash b/src/main.bash index b59aa3c..f565970 100644 --- a/src/main.bash +++ b/src/main.bash @@ -1,5 +1,5 @@ function runMake () { - run gmake -w -j $(detectNumCPUs) $@ + run gmake -w -j $(detectNumCPUs) "$@" } function configure () { @@ -44,9 +44,14 @@ function dist () { runMake -C "_build" dist } +function distcheck () { + configure + runMake -C "_build" distcheck DISTCHECK_CONFIGURE_FLAGS="${configArgs[*]}" +} + function install () { build - runMake -C "_build" install "$0" + runMake -C "_build" install "$@" } function usage () { @@ -54,18 +59,21 @@ function usage () { Usage: $0 [COMMAND] This is an automation script designed to work with autotools. It creates a -directory "./_build" and builds any files inside it. +directory "./_build" and builds any files inside it. Its behaviour is +somewhat configurable: See "./Build.rc" for details. If no COMMAND is given, it defaults to "build". Commands: - build run "$0 configure" then make(1). - check [ARG] run "$0 build" then "make check [ARG]". - configure run autoreconf(1) and "./configure" if necessary. + build run "$0 configure" then make(1) + check [ARG] run "$0 build" then "make check [ARG]" + configure run autoreconf(1) and "./configure" if necessary clean run "rm -rf _build" dist run "make dist" - doc similar to "$0 build" but only build the documentation. - install [ARG] run "$0 build" then "make install [ARG]". + distcheck run "$0 configure" then "make distcheck" + doc similar to "$0 build" but only build the documentation + help print this message + install [ARG] run "$0 build" then "make install [ARG]" Please report any bugs, feature requests, and pull requests (the most preferred!) to the maintainer presented in the preamble of the "$0" itself. @@ -82,6 +90,8 @@ function main () { "check" ) cmd="check" ;; "clean" ) cmd="clean" ;; "dist" ) cmd="dist" ;; + "distcheck") cmd="distcheck";; + "help" ) cmd="usage" ;; "install" ) cmd="install" ;; *) cmd="usage" ;; esac