diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2018-04-01 16:52:32 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2018-04-01 16:52:32 +0000 |
commit | eab6ceab6e37fb7ba088e4ec0a33d05487a23ca0 (patch) | |
tree | 32ecb7fae67d81ccde6540ef457800fe5dcce9f5 /subr/build_checks.subr | |
parent | dc56e86faea6de14b8d66e31591e51fbea3e1d74 (diff) | |
download | midipix_build-eab6ceab6e37fb7ba088e4ec0a33d05487a23ca0.tar.bz2 midipix_build-eab6ceab6e37fb7ba088e4ec0a33d05487a23ca0.tar.xz |
subr/build_checks.subr: don't build given --as-needed and no new commits to midipix_build since the last build.
etc/build.usage, subr/build_args.subr: adds --as-needed.
vars/build.vars:dist_target: adds dist_gitref.
vars/dist_gitref.vars: print git-rev-parse(1) HEAD to ${PREFIX}/build.gitref.
Diffstat (limited to 'subr/build_checks.subr')
-rw-r--r-- | subr/build_checks.subr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/subr/build_checks.subr b/subr/build_checks.subr index 055ed870..5abeab20 100644 --- a/subr/build_checks.subr +++ b/subr/build_checks.subr @@ -33,6 +33,12 @@ build_checks() { if [ ${_exit:-0} = 1 ]; then exit 1; fi; + if [ "${ARG_AS_NEEDED:-0}" -eq 1 ]\ + && [ -e "${PREFIX}/build.gitref" ]\ + && [ "$(git rev-parse HEAD)" = "$(cat "${PREFIX}/build.gitref")" ]; then + ex_rtl_log_msg info "Git repository has not changed since last build and --as-needed was specified."; + exit 0; + fi; if [ ${ARG_CLEAN:-0} -eq 1 ]; then ex_rtl_log_msg info "-c specified, cleaning prefix..."; for _pname in ${DEFAULT_CLEAR_PREFIX_PATHS}; do |