Date: Sun, 4 May 2003 17:03:56 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Ruslan Ermilov <ru@freebsd.org> Cc: Darren Reed <darrenr@reed.wattle.id.au> Subject: Re: misc/44148: installworld in 4.7-STABLE does not installIPFilter related header files Message-ID: <20030504164851.F2372@gamplex.bde.org> In-Reply-To: <20030503175034.GB97244@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030504164851.F2372>