boostrap target

NGie Cooper yaneurabeya at gmail.com
Tue Oct 6 00:40:39 UTC 2015


> On Oct 5, 2015, at 16:17, Rui Paulo <rpaulo at me.com> wrote:
> 
> Ian and I were trying to figure out how the boostrap target gets called
> in usr.bin/lex/Makefile. It seems to be part of afterdepend, but I
> couldn't figure out how it gets added.  Any ideas?

Looking at ^/head/Makefile at r35703, `make bootstrap` for usr.bin/lex/Makefile at r35703 was broken when bootstrap-tools, etc, was written.

Here’s the revision where it was brought in:

------------------------------------------------------------------------
r16519 | nate | 1996-06-19 13:48:06 -0700 (Wed, 19 Jun 1996) | 6 lines

Finish the import and merge in FreeBSD specific changes.

Add a 'bootstrap' target which *must* be run before building the new
version, since the new scanner relies on the current version of flex to
build itself otherwise.

Here’s what ^/head/Makefile at r35703 used to look like:

 33133       adam .if !defined(NOTOOLS)
 17308      peter       @echo
 17308      peter       @echo "--------------------------------------------------------------"
 27910      asami       @echo " Rebuilding bootstrap tools"
 17308      peter       @echo "--------------------------------------------------------------"
 27910      asami       cd ${.CURDIR} && ${BMAKE} bootstrap
 ...
 17308      peter bootstrap:
 27910      asami .if defined(DESTDIR)
 27910      asami       rm -f ${DESTDIR}/usr/src/sys
 27910      asami       ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src
 27910      asami       cd ${.CURDIR}/include && find -dx . | cpio -dump ${DESTDIR}/usr/include
 34575        bde       cd ${.CURDIR}/include && ${MAKE} symlinks
 27910      asami .endif
 35479        bde       cd ${.CURDIR}/usr.bin/make && ${MAKE} ${MK_FLAGS} ${_DEPEND} && \
 30113        jkh               ${MAKE} ${MK_FLAGS} all && \
 30113        jkh               ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
 35479        bde       cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} ${MK_FLAGS} ${_DEPEND} && \
 30113        jkh               ${MAKE} ${MK_FLAGS} all && \
 30113        jkh               ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
 34509        bde       cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && \
 35479        bde               ${MAKE} ${MK_FLAGS} ${_DEPEND} && \
 30170        jkh               ${MAKE} ${MK_FLAGS} -DNOLIB all && \
 30113        jkh               ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR}


More information about the freebsd-hackers mailing list