Deleted Added
full compact
bsd.after-import.mk (238152) bsd.after-import.mk (240330)
1# $Id: bsd.after-import.mk,v 1.6 2012/06/27 18:23:32 sjg Exp $
1# $Id: bsd.after-import.mk,v 1.7 2012/07/06 03:03:44 sjg Exp $
2
3# This makefile is for use when integrating bmake into a BSD build
4# system. Use this makefile after importing bmake.
5# It will bootstrap the new version,
6# capture the generated files we need, and add an after-import
7# target to allow the process to be easily repeated.
8
9# The goal is to allow the benefits of autoconf without
10# the overhead of running configure.
11
12all: _makefile
13all: after-import
14
15# we rely on bmake
2
3# This makefile is for use when integrating bmake into a BSD build
4# system. Use this makefile after importing bmake.
5# It will bootstrap the new version,
6# capture the generated files we need, and add an after-import
7# target to allow the process to be easily repeated.
8
9# The goal is to allow the benefits of autoconf without
10# the overhead of running configure.
11
12all: _makefile
13all: after-import
14
15# we rely on bmake
16.if !defined(.MAKE.LEVEL)
16.if !defined(.PARSEDIR)
17.error this makefile requires bmake
18.endif
19
20_this := ${MAKEFILE:tA}
21BMAKE_SRC := ${.PARSEDIR}
22
23# it helps to know where the top of the tree is.
24.if !defined(SRCTOP)

--- 45 unchanged lines hidden (view full) ---

70 @echo Capturing $f
71 @mkdir -p ${${.CURDIR}/$f:L:H}
72 @cmp -s ${.CURDIR}/$f ${HOST_OS}/$f || \
73 cp ${HOST_OS}/$f ${.CURDIR}/$f
74.endfor
75.for f in ${configured_files:M*Makefile}
76 @echo Capturing $f
77 @mkdir -p ${${.CURDIR}/$f:L:H}
17.error this makefile requires bmake
18.endif
19
20_this := ${MAKEFILE:tA}
21BMAKE_SRC := ${.PARSEDIR}
22
23# it helps to know where the top of the tree is.
24.if !defined(SRCTOP)

--- 45 unchanged lines hidden (view full) ---

70 @echo Capturing $f
71 @mkdir -p ${${.CURDIR}/$f:L:H}
72 @cmp -s ${.CURDIR}/$f ${HOST_OS}/$f || \
73 cp ${HOST_OS}/$f ${.CURDIR}/$f
74.endfor
75.for f in ${configured_files:M*Makefile}
76 @echo Capturing $f
77 @mkdir -p ${${.CURDIR}/$f:L:H}
78 @${MAKEFILE_SED} ${HOST_OS}/$f > ${.CURDIR}/$f
78 @(echo '# This is a generated file, do NOT edit!'; \
79 echo '# See ${_this:S,${SRCTOP}/,,}'; \
80 echo '#'; echo '# $$${OS}$$'; echo; \
81 echo 'SRCTOP?= $${.CURDIR:${${.CURDIR}/$f:L:H:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; echo; \
82 ${MAKEFILE_SED} ${HOST_OS}/$f ) > ${.CURDIR}/$f
79.endfor
80
81# this needs the most work
82_makefile: bootstrap ${MAKEFILE}
83 @echo Generating ${.CURDIR}/Makefile
84 @(echo '# This is a generated file, do NOT edit!'; \
85 echo '# See ${_this:S,${SRCTOP}/,,}'; \
86 echo '#'; echo '# $$${OS}$$'; echo; \

--- 19 unchanged lines hidden ---
83.endfor
84
85# this needs the most work
86_makefile: bootstrap ${MAKEFILE}
87 @echo Generating ${.CURDIR}/Makefile
88 @(echo '# This is a generated file, do NOT edit!'; \
89 echo '# See ${_this:S,${SRCTOP}/,,}'; \
90 echo '#'; echo '# $$${OS}$$'; echo; \

--- 19 unchanged lines hidden ---