Date: Mon, 05 Oct 2015 19:13:29 -0600 From: Ian Lepore <ian@freebsd.org> To: NGie Cooper <yaneurabeya@gmail.com> Cc: Rui Paulo <rpaulo@me.com>, hackers@freebsd.org Subject: Re: boostrap target Message-ID: <1444094009.66572.105.camel@freebsd.org> In-Reply-To: <33379C03-977C-47B5-93AB-447715A9C215@gmail.com> References: <1444087075.6210.17.camel@me.com> <33379C03-977C-47B5-93AB-447715A9C215@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2015-10-05 at 17:40 -0700, NGie Cooper wrote:
> > On Oct 5, 2015, at 16:17, Rui Paulo <rpaulo@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@r35703, `make bootstrap` for usr.bin/lex/Makefile@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@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1444094009.66572.105.camel>
