svn commit: r284478 - head/share/mk

Simon J. Gerraty sjg at FreeBSD.org
Tue Jun 16 23:06:44 UTC 2015


Author: sjg
Date: Tue Jun 16 23:06:43 2015
New Revision: 284478
URL: https://svnweb.freebsd.org/changeset/base/284478

Log:
  Normally a staging conflict causes an error.
  When bootstrapping different options, it is handy to be able to
  make those warnings.

Modified:
  head/share/mk/meta.stage.mk

Modified: head/share/mk/meta.stage.mk
==============================================================================
--- head/share/mk/meta.stage.mk	Tue Jun 16 23:03:15 2015	(r284477)
+++ head/share/mk/meta.stage.mk	Tue Jun 16 23:06:43 2015	(r284478)
@@ -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; }
 


More information about the svn-src-head mailing list