Building Less?
Russell Haley
russ.haley at gmail.com
Mon Oct 19 04:30:53 UTC 2015
Hi There,
Mr. Gurney, here is the patch file for src.conf.5, build.7 and I fixed a
typo in netmap.4. I believe I have also addressed the comments from Mr.
Losh. I shall attempt to submit this through Bugzilla. Should I reference
anything specific in the bug report?
Thanks,
Russell
On Mon, Sep 28, 2015 at 11:06 PM, Russell Haley <russ.haley at gmail.com>
wrote:
> I guess I should go through and take out the tab/spaces in src.conf while
> I'm at it? Since the language was already wrong, can I suggest we commit
> the diff above and then give me some time to get started on documentation a
> little more thoroughly? Then I can figure out how to build and review it
> too.
>
> Feel free to email me other updates.
>
> Russ
>
> On Mon, Sep 28, 2015 at 10:55 PM, Russell Haley <russ.haley at gmail.com>
> wrote:
>
>> On it.
>>
>> Russ
>>
>> On Mon, Sep 28, 2015 at 10:46 PM, Warner Losh <imp at bsdimp.com> wrote:
>>
>>> This isn’t quite right. /etc/src.conf is used only for /usr/src builds.
>>> It is ignored for /usr/doc and /usr/ports builds, which build(7) also
>>> documents. I’d be more specific.
>>>
>>> Also, this is just a nit, the man page is src.conf 5, not SRC.CONF 5. If
>>> you’re cleaning up the other language, you may want to correct that.
>>>
>>> Warner
>>>
>>> > On Sep 28, 2015, at 11:29 PM, Russell Haley <russ.haley at gmail.com>
>>> wrote:
>>> >
>>> > Okay, here is the diff for the changes above. I didn't re-build as Mr.
>>> Gurney said he would validate and commit . Can I suggest/submit some other
>>> changes to the build (7) page (that I will test myself)? Also the
>>> fdp-primer says in chapter 3.1 that the doc project owns man pages and then
>>> I couldn't find another single reference to them again.
>>> >
>>> > Much thanks!
>>> > Russ
>>> >
>>> > On Mon, Sep 28, 2015 at 9:08 PM, Warner Losh <imp at bsdimp.com> wrote:
>>> > That's a good place to start.
>>> >
>>> > Warner
>>> >
>>> > On Mon, Sep 28, 2015 at 9:56 PM, Russell Haley <russ.haley at gmail.com>
>>> wrote:
>>> > Do I follow this?
>>> >
>>> > https://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/
>>> >
>>> > Thanks,
>>> >
>>> > Russ
>>> >
>>> > On Mon, Sep 28, 2015 at 9:29 AM, John-Mark Gurney <jmg at funkthat.com>
>>> wrote:
>>> > Russell Haley wrote this message on Sun, Sep 27, 2015 at 21:21 -0700:
>>> > > The option should be included in the man pages for build:
>>> > >
>>> > >
>>> https://www.freebsd.org/cgi/man.cgi?query=build&sektion=7&apropos=0&manpath=FreeBSD+10.2-RELEASE
>>> >
>>> > [great additions]
>>> >
>>> > I agree that this needs better documentation... If you send me a
>>> patch,
>>> > I'll make sure it's marked up properly and committed...
>>> >
>>> > Thanks!
>>> >
>>> > > On Sun, Sep 27, 2015 at 9:06 PM, Warner Losh <imp at bsdimp.com> wrote:
>>> > >
>>> > > > src.conf is only used to build /usr/src. src.con(5) documents that.
>>> > > > build(5) has a pointer.
>>> > > >
>>> > > > How would you suggest making this clearer?
>>> >
>>> > --
>>> > John-Mark Gurney Voice: +1 415 225 5579
>>> >
>>> > "All that I will do, has been done, All that I have, has not."
>>> >
>>> >
>>> >
>>> > <src.conf-build.diff>
>>>
>>>
>>
>
-------------- next part --------------
Index: man4/netmap.4
===================================================================
--- man4/netmap.4 (revision 289411)
+++ man4/netmap.4 (working copy)
@@ -385,7 +385,7 @@
TX [..........aaaaaaaaaaa........]
.Ed
.Pp
-select() and poll() wlll block if there is no space in the ring, i.e.
+select() and poll() will block if there is no space in the ring, i.e.
.Dl ring->cur == ring->tail
and return when new slots have become available.
.Pp
Index: man5/src.conf.5
===================================================================
--- man5/src.conf.5 (revision 289411)
+++ man5/src.conf.5 (working copy)
@@ -2,7 +2,7 @@
.\" from FreeBSD: head/tools/build/options/makeman 287942 2015-09-17 22:04:46Z bdrewery
.\" $FreeBSD$
.Dd September 18, 2015
-.Dt SRC.CONF 5
+.Dt src.conf 5
.Os
.Sh NAME
.Nm src.conf
@@ -10,15 +10,15 @@
.Sh DESCRIPTION
The
.Nm
-file contains settings that will apply to every build involving the
+file contains variables that control what components will be generated during the build process
+of the
.Fx
-source tree; see
+source tree (/usr/src); see
.Xr build 7 .
.Pp
The
.Nm
-file uses the standard makefile syntax.
-However,
+file uses the standard makefile syntax. However,
.Nm
should not specify any dependencies to
.Xr make 1 .
@@ -39,8 +39,7 @@
Overriding the location of
.Nm
may be necessary if the system-wide settings are not suitable
-for a particular build.
-For instance, setting
+for a particular build. For instance, setting
.Va SRCCONF
to
.Pa /dev/null
@@ -82,8 +81,7 @@
.Dq Li FALSE
or
.Dq Li NO .
-Just the existence of an option will cause
-it to be honoured by
+Just the existence of an option will cause it to be honoured by
.Xr make 1 .
.Pp
The following list provides a name and short description for variables
Index: man7/build.7
===================================================================
--- man7/build.7 (revision 289411)
+++ man7/build.7 (working copy)
@@ -25,11 +25,11 @@
.\" $FreeBSD$
.\"
.Dd December 31, 2014
-.Dt BUILD 7
+.Dt Build 7
.Os
.Sh NAME
.Nm build
-.Nd information on how to build the system
+.Nd General instructions on how to build the system
.Sh DESCRIPTION
The sources for the
.Fx
@@ -66,32 +66,30 @@
things in that directory.
Issuing the
.Xr make 1
-command in any directory or
-subdirectory of those directories has the same effect as issuing the
-same command in all subdirectories of that directory.
-With no target specified, the things in that directory are just built.
+command in any directory issues the
+.Xr make 1
+command recursively in all subdirectories.
+With no target specified, the items in the directories are built
+and no further action is taken.
.Pp
-A source tree is allowed to be read-only.
-As described in
-.Xr make 1 ,
-objects are usually built in a separate object directory hierarchy
-specified by the environment variable
-.Va MAKEOBJDIRPREFIX ,
-or under
+A source tree is allowed to be read-only as all build artifcats generated by
+.Xr make 1
+are generated in
.Pa /usr/obj
-if variable
+by default. The destination directory can be changed by specifying
+a new location using
.Va MAKEOBJDIRPREFIX
-is not set.
-For a given source directory, its canonical object directory
-would be
-.Pa ${MAKEOBJDIRPREFIX}${.CURDIR}
-if
-.Xr make 1
-variable
+as described in
+.Xr make 1 .
+
+Therefore, for a given source directory, its build artifacts
+would be generated in
+.Pa /usr/obj/${.CURDIR}
+or to
+.Pa ${MAKEOBJDIRPREFIX}/${.CURDIR}
+according to the
.Va MAKEOBJDIRPREFIX
-is set, or
-.Pa /usr/obj${.CURDIR}
-if this variable is not set.
+variable.
Cross-builds set the object directory as described in the
documentation for the
.Cm buildworld
@@ -102,8 +100,14 @@
variables described in the
.Sx ENVIRONMENT
section below, and by the variables documented in
-.Xr make.conf 5 .
+.Xr make.conf 5 .
.Pp
+The default components included in the build are specified in the file
+/etc/src.conf in the source tree. To override the default file, include
+the SRCCONF option in the make steps, pointing to a custom src.conf
+file. For more information see
+.Xr src.conf 5 .
+.Pp
The following list provides the names and actions for the targets
supported by the build system:
.Bl -tag -width ".Cm cleandepend"
@@ -445,6 +449,9 @@
.Bd -literal -offset indent
make PORTS_MODULES=emulators/kqemu-kmod kernel
.Ed
+.It Va SRCCONF
+Specify a file to override the default /etc/src.conf. The src.conf file controls the components to build. See
+.Xr SRC.CONF 5
.It Va STRIPBIN
Command to use at install time when stripping binaries.
Be sure to add any additional tools required to run
More information about the freebsd-arm
mailing list