Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2014 08:54:54 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Garrett Cooper <ngie@FreeBSD.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r275601 - projects/building-blocks
Message-ID:  <1418054094.1064.147.camel@revolution.hippie.lan>
In-Reply-To: <201412080743.sB87h3j9044019@svn.freebsd.org>
References:  <201412080743.sB87h3j9044019@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2014-12-08 at 07:43 +0000, Garrett Cooper wrote:
> Author: ngie
> Date: Mon Dec  8 07:43:02 2014
> New Revision: 275601
> URL: https://svnweb.freebsd.org/changeset/base/275601
> 
> Log:
>   - Document why usr.bin/vi needs to be built as part of bootstrap-tools
>   - Do not build usr.bin/vi as part of bootstrap-tools if NO_SHARE is defined
>     as share/termcap will be skipped if NO_SHARE is defined; that being said,
>     something needs to be done for dealing with make distribute as it will be
>     built via make distribute if not done during make buildworld.
>   - Add -DNO_SHARE to NOFUN to deal with make xdev because of the fact that it
>     implements a partial make buildworld/make installworld, but because it
>     doesn't define everything, not all install paths exist in expected stages,
>     which results in build failures with usr.bin/vi in bootstrap-tools because
>     "WORLDTMP" is not fully populated when _xb-bootstrap-tools is run.
>   
>     tl;dr: this is enough to just make sure that make xdev isn't broken on this
>     branch when MK_VI == no and make delete-old has been run on the build host
> 
> Modified:
>   projects/building-blocks/Makefile.inc1
> 
> Modified: projects/building-blocks/Makefile.inc1
> ==============================================================================
> --- projects/building-blocks/Makefile.inc1	Mon Dec  8 07:33:11 2014	(r275600)
> +++ projects/building-blocks/Makefile.inc1	Mon Dec  8 07:43:02 2014	(r275601)
> @@ -1388,6 +1388,8 @@ build-tools: .MAKE
>  		${MAKE} DIRPRFX=${_tool}/ depend && \
>  		${MAKE} DIRPRFX=${_tool}/ all
>  .endfor
> +	# usr.bin/vi is required to process files in share/termcap
> +.if !defined(NO_SHARE)
>  .for _tool in \
>      usr.bin/vi
>  	${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
> @@ -1397,6 +1399,7 @@ build-tools: .MAKE
>  		${MAKE} DIRPRFX=${_tool}/ all MK_MAN=no SUBDIR= && \
>  		${MAKE} DIRPRFX=${_tool}/ install MK_MAN=no SUBDIR= DESTDIR=${WORLDTMP}/
>  .endfor
> +.endif
>  
>  #
>  # kernel-tools: Build kernel-building tools
> @@ -2014,7 +2017,7 @@ NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -
>  	MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \
>  	MK_VI=no \
>  	TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
> -	CPUTYPE=${XDEV_CPUTYPE}
> +	CPUTYPE=${XDEV_CPUTYPE} -DNO_SHARE
>  
>  XDDIR=${TARGET_ARCH}-freebsd
>  XDTP?=/usr/${XDDIR}
> 

Is there any chance someone who understands vi could evaluate what it's
being used for and perhaps eliminate it?  I know just enough about vi to
get out of it if I accidentally get in.

When I looked into this a few days ago it appears to be using it to sort
the data before compiling (an optimization that problably hasn't been
important to do since the 90s).  Could another existing build tool such
as awk do the job?

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1418054094.1064.147.camel>