From owner-freebsd-bugs@FreeBSD.ORG Sun May 4 00:04:03 2003 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1BCC37B401; Sun, 4 May 2003 00:04:02 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FBAA43FBD; Sun, 4 May 2003 00:04:01 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id RAA16217; Sun, 4 May 2003 17:03:57 +1000 Date: Sun, 4 May 2003 17:03:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Ruslan Ermilov In-Reply-To: <20030503175034.GB97244@sunbay.com> Message-ID: <20030504164851.F2372@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: simon@comsys.ntu-kpi.kiev.ua cc: freebsd-bugs@freebsd.org cc: Darren Reed Subject: Re: misc/44148: installworld in 4.7-STABLE does not installIPFilter related header files X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2003 07:04:03 -0000 On Sat, 3 May 2003, Ruslan Ermilov wrote: > On Sat, May 03, 2003 at 08:37:35AM +1000, Bruce Evans wrote: > > On Sat, 26 Apr 2003, Ruslan Ermilov wrote: > > > Here's an implementation (without ipfilter). Please review. > > > > I tested it lightly. It seems OK except for having lots of style bugs. > > > No surprise. ;) > > > % +compat: > > % +.for i in ${LDIRS} ${LSUBDIRS} machine crypto > > % + if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ > > % + rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ > > % fi > > > > New style bug: indent of only 4 in a shell script (it's only a continued > > line at the level of the Makefile). > > > Moot, as this is not a shell script, but rather a string > argument passed to a shell via -c. Strictly speaking, > it should be formatted like follows: > > compat: > .for i in ${LDIRS} ${LSUBDIRS} machine crypto > if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ > rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ > fi > > But that would look uglier, so I take your advice. ;) Nah. It needs to be read as a shell script, so it should follow the normal indentation rules for a shell script. 8-char indents seem to be normal for shell scripts too. There are some large examples in bsd.links.mk and bsd.man.mk. > > % .endfor > > % mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ > > % -p ${DESTDIR}/usr/include > ... > > Maybe the compat stuff can be cleaned up a bit. mtree could be run more > > globally as in all other Makefiles excrpt for the problem of removing the > > symlinks to directories. > > > Not sure I understand what you mean. This is only to deal with > the old directory-level symlinks; when we are sure we won't run > this on such an old system, we can safely remove it. (The above is part of the compat stuff). Yes, it may be necessary for now. I just want to plan to remove it, or maybe go the other way and push down installing of includes from ../Makefile.inc1 to here. > > % +copies: > > % +.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc > > % +.if exists(${DESTDIR}${INCLUDEDIR}/$i) > > % + cd ${DESTDIR}${INCLUDEDIR}/$i; \ > > % + for h in *.h; do \ > > % + if [ -L $$h ]; then \ > > % + rm -f $$h; \ > > % + fi; \ > > % + done > > > > More too-small indentations. > > > This case is more complicated. I'm not sure how to format it > properly (I always wondered how to do it, BTW). I now have > used the "make it look like a normal shell script" rule of > thumb, this now at least looks sane. We should also consider indenting nested make statements. Then the command should probably be indented more than the usual 1 tab. > Bruce, if you reply and get my ~/.vacation.msg back this > would mean that I won't have a chance to commit it until > I'm back, which 90% means it won't be committed up until > code freeze in 5.x is over. I'd like to avoid it, so if > you get my vacation message back, please take a moment > and commit it for me, making any necessary style fixes. OK. I haven;t got it yet :-). Bruce