svn commit: r335244 - head

Bryan Drewery bdrewery at FreeBSD.org
Sat Jun 16 00:35:20 UTC 2018


Author: bdrewery
Date: Sat Jun 16 00:35:19 2018
New Revision: 335244
URL: https://svnweb.freebsd.org/changeset/base/335244

Log:
  Assert that a build is done before an install.
  
  This should also catch cases where the wrong MAKEOBJDIRPREFIX is used for
  install.
  
  MFC after:	2 weeks
  Sponsored by:	Dell EMC

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Fri Jun 15 23:42:22 2018	(r335243)
+++ head/Makefile.inc1	Sat Jun 16 00:35:19 2018	(r335244)
@@ -89,7 +89,10 @@ MK_GCC_BOOTSTRAP=	no
 .if make(installworld) || make(install) || make(distributeworld) || \
     make(stageworld)
 .-include "${OBJTOP}/compiler-metadata.mk"
+.if !defined(_LOADED_COMPILER_METADATA)
+.error A build is required first.  You may have the wrong MAKEOBJDIRPREFIX set.
 .endif
+.endif
 
 # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. Pull it from the
 # tree to be friendlier to foreign OS builds. It's safe to do so unconditionally
@@ -195,6 +198,7 @@ compiler-metadata.mk: .PHONY .META
 	@: > ${.TARGET}
 	@echo ".info Using cached compiler metadata from build at $$(hostname) on $$(date)" \
 	    > ${.TARGET}
+	@echo "_LOADED_COMPILER_METADATA=t" >> ${.TARGET}
 .for v in ${_COMPILER_METADATA_VARS}
 	@echo "${v}=${${v}}" >> ${.TARGET}
 .endfor


More information about the svn-src-all mailing list