diff options
author | sjg <sjg@FreeBSD.org> | 2015-06-16 23:06:43 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-06-16 23:06:43 +0000 |
commit | 0e75339fd1e6973f36eeeced99742556e932cb47 (patch) | |
tree | 4969fcceb15cf3ed9883fc1ce62cad472db7c9c3 /share | |
parent | 089462a20d7e081f70bcfd315459f998c329cd2f (diff) | |
download | FreeBSD-src-0e75339fd1e6973f36eeeced99742556e932cb47.zip FreeBSD-src-0e75339fd1e6973f36eeeced99742556e932cb47.tar.gz |
Normally a staging conflict causes an error.
When bootstrapping different options, it is handy to be able to
make those warnings.
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/meta.stage.mk | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/share/mk/meta.stage.mk b/share/mk/meta.stage.mk index 2301b8f..467e339 100644 --- a/share/mk/meta.stage.mk +++ b/share/mk/meta.stage.mk @@ -60,14 +60,23 @@ LN_CP_SCRIPT = LnCp() { \ ln $$1 $$2 2> /dev/null || \ cp -p $$1 $$2; } +# a staging conflict should cause an error +# a warning is handy when bootstapping different options. +STAGE_CONFLICT?= ERROR +.if ${STAGE_CONFLICT:tl} == "error" +STAGE_CONFLICT_ACTION= exit 1; +.else +STAGE_CONFLICT_ACTION= +.endif + # it is an error for more than one src dir to try and stage # the same file STAGE_DIRDEP_SCRIPT = ${LN_CP_SCRIPT}; StageDirdep() { \ t=$$1; \ if [ -s $$t.dirdep ]; then \ cmp -s .dirdep $$t.dirdep && return; \ - echo "ERROR: $$t installed by `cat $$t.dirdep` not ${_dirdep}" >&2; \ - exit 1; \ + echo "${STAGE_CONFLICT}: $$t installed by `cat $$t.dirdep` not ${_dirdep}" >&2; \ + ${STAGE_CONFLICT_ACTION} \ fi; \ LnCp .dirdep $$t.dirdep || exit 1; } |