summaryrefslogtreecommitdiff
path: root/bsd.after-import.mk
diff options
context:
space:
mode:
Diffstat (limited to 'bsd.after-import.mk')
-rw-r--r--bsd.after-import.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/bsd.after-import.mk b/bsd.after-import.mk
index e87026fbf1462..b2b21872b9acc 100644
--- a/bsd.after-import.mk
+++ b/bsd.after-import.mk
@@ -1,4 +1,4 @@
-# $Id: bsd.after-import.mk,v 1.6 2012/06/27 18:23:32 sjg Exp $
+# $Id: bsd.after-import.mk,v 1.7 2012/07/06 03:03:44 sjg Exp $
# This makefile is for use when integrating bmake into a BSD build
# system. Use this makefile after importing bmake.
@@ -13,7 +13,7 @@ all: _makefile
all: after-import
# we rely on bmake
-.if !defined(.MAKE.LEVEL)
+.if !defined(.PARSEDIR)
.error this makefile requires bmake
.endif
@@ -75,7 +75,11 @@ after-import: bootstrap ${MAKEFILE}
.for f in ${configured_files:M*Makefile}
@echo Capturing $f
@mkdir -p ${${.CURDIR}/$f:L:H}
- @${MAKEFILE_SED} ${HOST_OS}/$f > ${.CURDIR}/$f
+ @(echo '# This is a generated file, do NOT edit!'; \
+ echo '# See ${_this:S,${SRCTOP}/,,}'; \
+ echo '#'; echo '# $$${OS}$$'; echo; \
+ echo 'SRCTOP?= $${.CURDIR:${${.CURDIR}/$f:L:H:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; echo; \
+ ${MAKEFILE_SED} ${HOST_OS}/$f ) > ${.CURDIR}/$f
.endfor
# this needs the most work