From owner-freebsd-hackers@freebsd.org Tue Oct 6 01:13:38 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337EE9B9CE5 for ; Tue, 6 Oct 2015 01:13:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 188BD1CAD for ; Tue, 6 Oct 2015 01:13:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 15DEE9B9CE3; Tue, 6 Oct 2015 01:13:38 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFBB19B9CE2 for ; Tue, 6 Oct 2015 01:13:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C52F51CAC for ; Tue, 6 Oct 2015 01:13:37 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Tue, 6 Oct 2015 01:14:21 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t961DTtJ028244; Mon, 5 Oct 2015 19:13:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1444094009.66572.105.camel@freebsd.org> Subject: Re: boostrap target From: Ian Lepore To: NGie Cooper Cc: Rui Paulo , hackers@freebsd.org Date: Mon, 05 Oct 2015 19:13:29 -0600 In-Reply-To: <33379C03-977C-47B5-93AB-447715A9C215@gmail.com> References: <1444087075.6210.17.camel@me.com> <33379C03-977C-47B5-93AB-447715A9C215@gmail.com> Content-Type: text/plain; charset="iso-8859-13" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2015 01:13:38 -0000 On Mon, 2015-10-05 at 17:40 -0700, NGie Cooper wrote: > > On Oct 5, 2015, at 16:17, Rui Paulo 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