From owner-svn-src-head@FreeBSD.ORG Mon Mar 19 19:37:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D136106564A; Mon, 19 Mar 2012 19:37:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 467BA8FC12; Mon, 19 Mar 2012 19:37:44 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:7476:a64e:dc1e:13f] (unknown [IPv6:2001:7b8:3a7:0:7476:a64e:dc1e:13f]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4577D5C37; Mon, 19 Mar 2012 20:37:43 +0100 (CET) Message-ID: <4F678B03.8050307@FreeBSD.org> Date: Mon, 19 Mar 2012 20:37:39 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Chris Rees References: <201203162319.q2GNJjx5039482@svn.freebsd.org> <20120317162754.I1530@besplex.bde.org> In-Reply-To: X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 19:37:44 -0000 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: >>> Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk >>> files, and style.Makefile(5), where applicable. While here, update the >>> link to the gcc warning documentation. >> >> >> Thanks. I 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. It >> 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 . This 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 '=' (or '+='). Weird >> formattings of assignments are harder to grep for than weird formattings >> 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. So 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) .if defined(BAR) CFLAGS+= -DFOO_BAR .endif .endif But I guess that would require some overhaul in make. It doesn't grok such indentations now. > Perhaps we should try to agree a standard on them, perhaps two spaces? It's a shame to be stripping them out. Two spaces sounds reasonable enough. Though indent size is probably the ultimate bikeshed... ;)