From owner-freebsd-arch@freebsd.org Sat Oct 17 16:27:24 2015 Return-Path: Delivered-To: freebsd-arch@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 BDF35A17F8C for ; Sat, 17 Oct 2015 16:27:24 +0000 (UTC) (envelope-from johnandsara2@cox.net) 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 A3FE4221 for ; Sat, 17 Oct 2015 16:27:24 +0000 (UTC) (envelope-from johnandsara2@cox.net) Received: by mailman.ysv.freebsd.org (Postfix) id A3FDCA17F8B; Sat, 17 Oct 2015 16:27:24 +0000 (UTC) Delivered-To: arch@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 A39ECA17F8A for ; Sat, 17 Oct 2015 16:27:24 +0000 (UTC) (envelope-from johnandsara2@cox.net) Received: from fed1rmfepi106.cox.net (fed1rmfepi106.cox.net [68.230.241.137]) by mx1.freebsd.org (Postfix) with ESMTP id 80A8E220 for ; Sat, 17 Oct 2015 16:27:24 +0000 (UTC) (envelope-from johnandsara2@cox.net) Received: from eastrmimpo110 ([68.230.241.223]) by eastrmfepo202.cox.net (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP id <20151017153914.LNCB16920.eastrmfepo202.cox.net@eastrmimpo110> for ; Sat, 17 Oct 2015 11:39:14 -0400 Received: from [192.168.3.15] ([72.219.204.96]) by eastrmimpo110 with cox id WFfE1r00325Jhjc01FfE8o; Sat, 17 Oct 2015 11:39:14 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020205.56226BA2.00A0,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=FaLpMuC6 c=1 sm=1 a=OPrADkie5Htls158/1P3IQ==:17 a=kviXuzpPAAAA:8 a=jE9PVPMpqX5-yLpioWUA:9 a=wPNLvfGTeEIA:10 a=OPrADkie5Htls158/1P3IQ==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Message-ID: <5622695D.6040700@cox.net> Date: Sat, 17 Oct 2015 11:29:33 -0400 From: "John D. Hendrickson" User-Agent: Thunderbird 2.0.0.24 (X11/20100228) MIME-Version: 1.0 To: Bryan Drewery CC: arch@FreeBSD.org Subject: Re: make -n -n References: <561F3406.9050906@FreeBSD.org> In-Reply-To: <561F3406.9050906@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 16:27:24 -0000 Bryan Drewery wrote: > Does anyone consider 'make -n -n' a thing for top-level builds? > > We have this ${_+_} thing in Makefiles that used to expand to '+' if you > gave '-n -n'. This was so just 1 '-n' would just show what the > top-level Makefile would do: > > ~/svn/clean2 # make -n includes > cd /root/svn/clean2; PATH=/sbin:/bin:/usr/sbin:/usr/bin make -m > /root/svn/clean2/share/mk -f Makefile.inc1 TARGET=amd64 > TARGET_ARCH=amd64 includes > > Versus the more expected (at least for bmake) -n behavior of traversing > sub-makes: > > ~/svn/clean2 # make -n -n includes > ===> lib (includes) > ===> lib/csu (includes) > ===> lib/csu/amd64 (includes) > ===> lib/libcompiler_rt (includes) > ===> lib/libc (includes) > ===> lib/libc/tests (includes) > ===> lib/libc/tests/tls_dso (includes) > ===> lib/libc/tests/c063 (includes) > etc... > > Note the actual output may be off due to local changes, but the point is > that -n with bmake is documented to run sub-makes with -n as well, so it > calls right down the chain showing all build commands without taking any > real actions. > > Bmake added a '-N' flag that essentially does the hack that we've put > into our top-level Makefile - it doesn't run sub-makes. > > > So having said all of that, the ${_+_} never expands anymore since > r251748 (June 2013). The act of it working in top-level has only been > fixed since r288391 (September 2015). > > Given it was broken for this long period I assume no one uses '-n -n' or > even knew about it. > > I would like to remove it (-n -n and _+_) and just use the (bmake) > documented -n and -N flags and use '+' everywhere appropriate. Note that > we use .MAKE in some targets that achieves largely the same thing, but > many sub-make calls don't have a .MAKE and lack a proper '+' to recurse > in Makefile.inc1. > if you take a Makefile for older pmake and run it with newer - there is no telling what might happen (unless of course it's already been tried) no telling