aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-06-16 00:35:19 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-06-16 00:35:19 +0000
commit4e3db1e0af4711dcc1f0b971a5e2ee1e0f7bafb1 (patch)
treeb4567fff7d7e8463d46f998891366b0826b22838 /Makefile.inc1
parent0afe96c7bf37f9a7d2680f25780c7bd0ddc851f2 (diff)
downloadsrc-4e3db1e0af4711dcc1f0b971a5e2ee1e0f7bafb1.tar.gz
src-4e3db1e0af4711dcc1f0b971a5e2ee1e0f7bafb1.zip
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
Notes
Notes: svn path=/head/; revision=335244
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc14
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 18bd7ecd3ac2..074bdedeb67f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -89,6 +89,9 @@ 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
@@ -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