misc/44148: installworld in 4.7-STABLE does not installIPFilter related header files

Bruce Evans bde at zeta.org.au
Fri May 2 15:37:44 PDT 2003


On Sat, 26 Apr 2003, Ruslan Ermilov wrote:

> On Sat, Apr 26, 2003 at 03:56:54PM +1000, Darren Reed wrote:
> > In some email I received from Bruce Evans, sie wrote:
> > >
> > > > So, I'd like to either do this on a directory level, or kill
> > > > the SHARED=symlinks concept.
> > >
> > > I depend on SHARED=symlinks a lot.  However, the number of things that
> > > must be installed manually when not using makeworld is large so another
> > > set of includes wouldn't make much difference.
> >
> > So are we agreed then that we can move to netinet being created as a
> > directory and populated with symbolic links ?
> >
> Here's an implementation (without ipfilter).  Please review.

I tested it lightly.  It seems OK except for having lots of style bugs.

% Index: Makefile
% ===================================================================
% RCS file: /home/ncvs/src/include/Makefile,v
% retrieving revision 1.196
% diff -u -r1.196 Makefile
% --- Makefile	17 Apr 2003 14:14:21 -0000	1.196
% +++ Makefile	26 Apr 2003 20:22:19 -0000
% ...
% @@ -80,48 +76,74 @@
%  INCSLINKS+=	posix4/$i ${INCLUDEDIR}/$i
%  .endfor
%
% -copies:
% -.for i in ${LDIRS} ${LSYMSUBDIRS} machine crypto
% -	if [ -L ${DESTDIR}/usr/include/$i ]; then \
% -		rm -f ${DESTDIR}/usr/include/$i; \
% +.include <bsd.prog.mk>
% +
% +installincludes: ${SHARED}
% +${SHARED}: compat
% +
% +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).

%  .endfor
%  	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/../etc/mtree/BSD.include.dist \
%  		-p ${DESTDIR}/usr/include

Inherited style bugs: indent of 8 for a continued line (it really is a
continued line), and line longer than 80 characters (particularly stupid
since the line is split to make it not so long).

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.

% +
% +# INCLUDEDIR is defined only here.

I don't understand this comment.  INCLUDEDIR is defined in bsd.own.mk,
not here.  INCLUDEDIR is used before here.  It never actually worked,
even at install time, since it was hard-coded in many places.  You
fixed a few of these places, but it is still hard-coded in 2 comments,
1 error message and the main mtree step.

% +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.

% ...
% -installincludes: ${SHARED}
% +	cd ${.CURDIR}/../sys/$i; \
% +	    for h in *.h; do \
% +		ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
% +	    done
% +.endfor
% +.for i in ${LSUBDIRS}
% +	cd ${.CURDIR}/../sys/$i; \
% +	    for h in *.h; do \
% +		ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
% +	    done
% +.endfor
% +	cd ${.CURDIR}/../sys/opencrypto; \
% +	    for h in *.h; do \
% +		ln -fs ../../../sys/opencrypto/$$h ${DESTDIR}${INCLUDEDIR}/crypto; \
% +	    done
% +	cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \
% +	    for h in *.h; do \
% +		ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h ${DESTDIR}${INCLUDEDIR}/machine; \
% +	    done
% +.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc)
% +	cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \
% +	    for h in *.h; do \
% +		ln -fs ../../../../sys/${MACHINE_ARCH}/include/$$h ${DESTDIR}${INCLUDEDIR}/machine/pc; \
% +	    done
% +.endif

More too-small indentations and too-long lines.

Bruce


More information about the freebsd-bugs mailing list