From eab6ceab6e37fb7ba088e4ec0a33d05487a23ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sun, 1 Apr 2018 16:52:32 +0000 Subject: 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. --- subr/build_args.subr | 1 + subr/build_checks.subr | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'subr') diff --git a/subr/build_args.subr b/subr/build_args.subr index 0a3390c6..ea6eabf7 100644 --- a/subr/build_args.subr +++ b/subr/build_args.subr @@ -9,6 +9,7 @@ BUILD_ARGS_SPEC=" BUILD:arg:-b: ARG_CLEAN:-c: ARG_CLEAN_BUILDS:arg:-C: + ARG_AS_NEEDED:--as-needed: ARG_DEBUG_MINIPIX:--debug-minipix: ARG_OFFLINE:-N: ARG_PACKAGE:-p: 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 -- cgit v1.2.3