From owner-svn-src-all@FreeBSD.ORG Mon Mar 19 21:07:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A710106566B; Mon, 19 Mar 2012 21:07:24 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0158FC0A; Mon, 19 Mar 2012 21:07:22 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so6469653bkc.13 for ; Mon, 19 Mar 2012 14:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=CnwXKm9ILhDVO20KWKbcpJr6izV/YuPJH18VYQUZM1M=; b=T+5nHtdgXZl+TYDdK4ZoYGOx/FFBxr2bwSj2RfQBsvV8qrzAD0pohYhK/pIgvw1Lbh 9YOrVXf96C3NVkdyJUqNY93b3OlhApll5PdO5gKyehkXGS4mxAr9CXefYaJ9rLCItNhV GY7cbGL7tvBx+kzQVEO5Is4Ubsn+J/p5eqAgjiLBd4gkC0IG+xYgfrj9S9Pawp46TqAK mMP+/ReveqPPoadxhg9OfAPaEwSTZw7altmaOGjTqxlUVh2aQCKyN/Eemoy4x8t9vwdq aeg6i+KsNsVm0NWZR/DplUs/PMbcbyRfhC7Tk8id0b1hFsbhUAi7dmji2A6OIFDIU0Sn fIRQ== Received: by 10.204.156.217 with SMTP id y25mr5208821bkw.36.1332191235713; Mon, 19 Mar 2012 14:07:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.202.142 with HTTP; Mon, 19 Mar 2012 14:06:45 -0700 (PDT) In-Reply-To: <4F678B03.8050307@FreeBSD.org> References: <201203162319.q2GNJjx5039482@svn.freebsd.org> <20120317162754.I1530@besplex.bde.org> <4F678B03.8050307@FreeBSD.org> From: Chris Rees Date: Mon, 19 Mar 2012 21:06:45 +0000 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r233052 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 21:07:24 -0000 On 19 March 2012 19:37, Dimitry Andric wrote: > On 2012-03-19 08:21, Chris Rees wrote: >> On 17 Mar 2012 05:40, "Bruce Evans" > wrote: >>> >>> On Fri, 16 Mar 2012, Dimitry Andric wrote: >>> >>>> Log: >>>> =A0Change the style of share/mk/bsd.sys.mk to that= of the other bsd.*.mk >>>> =A0files, and style.Makefile(5), where applicable. =A0While here, upda= te the >>>> =A0link to the gcc warning documentation. >>> >>> >>> Thanks. =A0I rather liked the "^.* foo" style for making ifdefs less >>> unreadable, but it didn't look like it was written here, and it is >>> a sign of other problems that so many nested ifdefs are used. =A0It >>> only used a single space of each level of indentation, so the >>> indentation was still hard too see. >>> >>> The "other bsd.*.mk" files don't include bsd.cpu.mk = . =A0This still uses >>> the "^. *foo" style (and is now the only *.mk file one that does this). >>> For assignments, it mostly uses a different unusual style -- just the >>> normal C style of a single space before and after '=3D' (or '+=3D'). = =A0Weird >>> formattings of assignments are harder to grep for than weird formatting= s >>> of ".foo", so I didn't try looking for them all. >> >> Indented .ifs etc are used (inconsistently) in bsd.port.mk et al, and can make a huge difference to readability; make is such = a messy language that multiple levels are often needed. > > Well, the issue with Makefiles is that you cannot indent the actual > statements. =A0So even if you sort-of-indent the directives, by adding > spaces between the initial dot and the directive name, you still have a > very messy left margin. :) > > It would be much nicer to be able to write: > > .if defined(FOO) > =A0.if defined(BAR) > =A0 =A0CFLAGS+=3D =A0 =A0-DFOO_BAR > =A0.endif > .endif > > But I guess that would require some overhaul in make. =A0It doesn't grok > such indentations now. That's right, lines starting with whitespace *must* be shell commands-- it'll be some overhaul that changes that... > >> Perhaps we should try to agree a standard on them, perhaps two spaces? = =A0It's a shame to be stripping them out. > > Two spaces sounds reasonable enough. =A0Though indent size is probably th= e > ultimate bikeshed... ;) True-- also whitespace-only changes are probably a bad idea for merges. I'm not suggesting changing anything existing, but I'd sure like to keep the whitespace while it's already there ;) Chris