boostrap target

Ian Lepore ian at freebsd.org
Tue Oct 6 01:13:38 UTC 2015


On Mon, 2015-10-05 at 17:40 -0700, NGie Cooper wrote:
> > 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}

I don't see how changes from 1999 (which is when "${BMAKE} bootstrap"
disappeared from Makefile.inc1) have anything to do with the fact that
the most recent import of flex (in 2013) added a bootstrap target that
wasn't there previously, and that nothing nowadays invokes it.  I'm also
not really clear on why the latest import added a bootstrap target that
never runs and doesn't seem to be needed (now that I've added a
dependency so that the new m4 is built before the new lex).

-- Ian



More information about the freebsd-hackers mailing list