aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2015-06-16 23:06:43 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2015-06-16 23:06:43 +0000
commitda27fc718f447535e348b6b8cd24308576a2fde9 (patch)
tree4969fcceb15cf3ed9883fc1ce62cad472db7c9c3
parent5d93692dde2aca3be231e0c0a52378f9360a5b08 (diff)
downloadsrc-da27fc718f447535e348b6b8cd24308576a2fde9.tar.gz
src-da27fc718f447535e348b6b8cd24308576a2fde9.zip
Normally a staging conflict causes an error.
When bootstrapping different options, it is handy to be able to make those warnings.
Notes
Notes: svn path=/head/; revision=284478
-rw-r--r--share/mk/meta.stage.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/share/mk/meta.stage.mk b/share/mk/meta.stage.mk
index 2301b8f64ac4..467e33954a34 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; }