Commit Graph

99 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
ecc0f5f63b Use less misleading directory name.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-12-03 13:15:54 +00:00
Ed Maste
4a23879502 build(7): clarify buildenv target can be used for non-cross builds
make buildenv can be used for building for the same architecture as
the host (perhaps this is a degenerate case of cross-building).
TARGET and TARGET_ARCH do not need to be set in this case.

Reviewed by:	bdrewery
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10759
2018-11-10 20:26:19 +00:00
Warner Losh
01012c6442 Document LOADER_DEFAULT_INTERP.
This controls what interpreter the default boot loader in
/boot/loader{,.efi} is, and which one we compile into userboot by
default.
2018-08-19 10:15:28 +00:00
Kyle Evans
4b2cc4d121 build(7): Document KERNCONFDIR - directory in which KERNCONF resides
MFC after:	1 week
2018-08-16 13:42:08 +00:00
Alexander Leidinger
c046b2a9e0 Add svnlite to places where svn is mentioned.
The Makefile part in the PR is solved already differently, so this
part is skipped form the PR The man page change change is slightly
changed to adapt to the way the Makefile works and to the spirit
of what is intended here.

Submitted by:	Juan Ramón Molina Menor <info@juanmolina.eu>
PR:		194910
Sponsored by:	Essen Hackathon
2018-08-11 13:18:19 +00:00
Ian Lepore
e93e5bb0fa Allow use of .WAIT in the LOCAL_DIRS and LOCAL_LIB_DIRS lists.
A comment in Makefile.inc1 has long stated that LOCAL_DIRS are built last,
after the base system.  Incremental improvements in parallel building over
the years have led to LOCAL_DIRS being built in parallel with base system
directories.  This change allows the .WAIT directive to appear in LOCAL_DIRS
and LOCAL_LIB_DIRS lists to give the user some control over parallel
building of local additions.

Differential Revision:	https://reviews.freebsd.org/D13622
2017-12-31 18:53:13 +00:00
Bryan Drewery
2abeba9d7a Follow-up r318105: Don't use NO_OBJ at top-level, use NO_OBJWALK.
NO_OBJ has a very specific meaning in sub-directories in that no object
directory will be made.  If a user wanted to skip the 'make obj' phase then
passing -DNO_OBJ would break all sub-directories from building properly.  Using
NO_OBJ internally also causes issue with NO_OBJ handling being added in
share/mk/bsd.init.mk soon.

Sponsored by:	Dell EMC Isilon
2017-11-03 23:22:03 +00:00
Bryan Drewery
c10062b9bf Add a 'make cleanuniverse'.
This will remove all build files for the source directory
when MK_UNIFIED_OBJDIR is enabled.

Sponsored by:	Dell EMC Isilon
2017-11-01 21:22:10 +00:00
Bryan Drewery
dfa099890c Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR.
This changes the build OBJDIR from the older style of /usr/obj/<srcdir> for
native builds, and /usr/obj/<target>.<target_arch>/<srcdir> for cross builds to
a new simpler format of /usr/obj/<srcdir>/<target>.<target_arch>.  This
new format is used regardless of cross or native build.  It allows
easier management of multiple source tree object directories.

The UNIFIED_OBJDIR option will be removed and its feature made permanent
for the 12.0 release.

Relnotes:	yes (don't note UNIFIED_OBJDIR option since it will be removed)
Prior work:	D3711 D874
Reviewed by:	gjb, sjg
Discussed at:	https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html
Discussed with:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12840
2017-11-01 21:22:05 +00:00
Bryan Drewery
5bd47cc56f Change native-xtools to not install by default; add a native-xtools-install.
Without this the user has to mess with 'make -f Makefile.inc1 ...' to figure
out where the files are installed in the OBJDIR and then they need to copy them
to where they really wanted them. Using DESTDIR may be problematic after
r325001 as well.

The files will be installed to DESTDIR/NXTP where NXTP defaults to /nxb-bin.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:29 +00:00
Bryan Drewery
b135fb6ef4 build(7): Document xdev targets.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:26 +00:00
Bryan Drewery
7441e255ed build(7): Document native-xtools.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:22 +00:00
Edward Tomasz Napierala
f472116578 Improve build(7): add missing "buildkernel" and "installkernel"
to the example, change the architectures to something more common,
and improve description of defaults for TARGET.

Reviewed by:	bdrewery, ngie, imp (older revisions)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D10654
2017-05-11 08:39:55 +00:00
Bryan Drewery
c889d48074 SUBDIR_OVERRIDE: Note how to restore historical behavior pre-r289725.
Sponsored by:	Dell EMC Isilon
2017-05-10 00:02:24 +00:00
Bryan Drewery
c596c2876f Add a -DNO_LIBS to skip building the libraries phase as well.
This is useful for cases where -DWORLDFAST is useful.

Sponsored by:	Dell EMC Isilon
2017-05-09 23:58:07 +00:00
Bryan Drewery
16892c7713 Support -DWORLDFAST to skip all build steps up to 'libraries' and 'everything'.
This allows for building the world against the already-created
host/sysroot environment.  It is not overly useful outside of cases of
large-impact changes such as a testing a new compiler.  It will
allow quickly getting back to an error in the target-phases of the
build where a new compiler is being used.

Sponsored by:	Dell EMC Isilon
2017-05-09 20:21:58 +00:00
Bryan Drewery
6d75a7a852 Support skipping 'make obj' tree-walk.
This is part of a larger effort for WITH_AUTO_OBJ and a WORLDFAST
option.

Sponsored by:	Dell EMC Isilon
2017-05-09 20:21:38 +00:00
Enji Cooper
53837b18b6 build(7): sort SEE ALSO section
tests(7) should be grouped in the man section 7 group, not the section 8 group.

MFC after:	1 week
Reported by:	make manlint
Sponsored by:	Dell EMC Isilon
2017-03-23 05:06:40 +00:00
Enji Cooper
2f6a7e426e Update TARGET/TARGET_ARCH examples to use arm64/aarch64 instead of i386/pc98
pc98 support was removed in r312910
2017-01-28 23:58:17 +00:00
Bryan Drewery
4143850b00 Add LOCAL_XTOOL_DIRS to add into cross-tools.
Sponsored by:	EMC / Isilon Storage Division
2016-07-21 06:06:11 +00:00
Warren Block
d90f12e3c0 Clarify build(7) instructions for alternate object directory.
PR:		209062
Submitted by:	Shawn Debnath <sd@beastie.io>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6106
2016-04-28 22:14:09 +00:00
Bryan Drewery
473fda75dd META_MODE+filemon: Default -DNO_CLEAN enabled.
When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 22:00:33 +00:00
Bryan Drewery
497e80911e Remove the old depend (mkdep) code and make FAST_DEPEND the one true way.
Reviewed by:	emaste, hselasky (partial), brooks (brief)
Discussed on:	arch@
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5742
2016-03-30 23:50:23 +00:00
Bryan Drewery
aae63957af Import bsd.clang-analyze.mk based on NetBSD's version.
This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the
Clang static analyzer and present results on stdout.

Obtained from:	NetBSD (CVS Rev. 1.3)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5449
2016-02-26 22:14:00 +00:00
Enji Cooper
71b7fa1252 Simplify running the FreeBSD test suite
Replace `make regress` (legacy test make target) and `make test` (incomplete
test make target added with the FreeBSD test suite) with make check as it's
consistent with other open source projects.

`make check` defaults to running tests from `.OBJDIR`, but can be overridden
with the `CHECKDIR` variable.

Add `make checkworld` target to simplify running the FreeBSD test suite from
`TESTSBASE` (i.e. the top-level tests directory), similar to buildworld.

Document `make check` and `make checkworld` in build(7).

Other minor changes:

- Rename intermediate file (`Kyuafile.auto`) to `Kyuafile` to simplify
  `make check`.
- Remove terse warnings attached to `beforetest`/`aftertest`.
- Add kyua binary check to check target in suite.test.mk; error out if it's
  not found

The MFC is [partly] contingent on other build related changes being MFCed.

Differential Revision: https://reviews.freebsd.org/D4406
MFC after: 2 months
X-MFC to: stable/10
Relnotes: yes
Reviewed by: bdrewery, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division
2016-02-07 18:40:04 +00:00
Bryan Drewery
7f1636b75e Let SUBDIR_OVERRIDE with 'make buildworld' be more useful.
Now it can be used to effectively "build in a subdir".  It will use the
'cross-tools', 'libraries', and 'includes' phases of 'buildworld' to properly
setup a WORLDTMP to use.  Then it will build 'everything' only in the
listed SUBDIR_OVERRIDE directories.  It is still required to list custom
library directories in LOCAL_LIB_DIRS if SUBDIR_OVERRIDE is something
that contains libraries outside of the normal area (such as
SUBDIR_OVERRIDE=contrib/ofed needing LOCAL_LIB_DIRS=contrib/ofed/usr.lib)

Without these changes, SUBDIR_OVERRIDE with buildworld was broken or hit
obscure failures due to missing libraries, includes, or cross compiler.

SUBDIR_OVERRIDE with 'make <target that is not buildworld>' will continue to
work as it did before although its usefulness is questionable.

With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with
-DNO_CLEAN only takes a few minutes to start building the target
directories.  This is still much better than building unneeded things via
'everything' when testing small subset changes.  A BUILDFAST or
SKIPWORLDTMP might make sense for this as well.

- Add in '_worldtmp' as we still need to create WORLDTMP as later targets,
  such as '_libraries' and '_includes' use it.  This probably was avoiding
  calling '_worldtmp' to not remove WORLDTMP for debugging purposes, but
  -DNO_CLEAN can be used for that.

- '_legacy' must be included since '_build-tools' uses -legacy.
  The SUBDIR_OVERRIDE change came in r95509, while -legacy being part
  of build-tools came in r113136.

- 'bootstrap-tools' is still skipped as this feature is not for
   upgrades.

- Fix buildworld combined with SUBDIR_OVERRIDE not installing all includes.

  The original change for SUBDIR_OVERRIDE in r95509 kept '_includes'
  and '_libraries' as building everything possible as the SUBDIR_OVERRIDE
  could need anything from them.  However in r96462 the real 'includes'
  target was changed from manual sub-makes to just recursing 'includes'
  on SUBDIR, thus not all includes have been installed into WORLDTMP since then
  when combined with 'buildworld'.

  This is not done unless calling 'make buildworld' as it would be
  unexpected to have it go into all directories when doing 'make
  SUBDIR_OVERRIDE=mydir includes'.

- Also need to build the cross-compiler so it is used with --sysroot.
  If this is burdensome then telling the build to use the local compiler
  as an external compiler (thus using a proper --sysroot to WORLDTMP) is
  possible by setting CC=/usr/bin/cc, CXX=/usr/bin/c++, etc.

- Don't build the lib32 distribution with SUBDIR_OVERRIDE in buildworld
  since it won't contain anything related to SUBDIR_OVERRIDE.  Testing
  of the lib32 build can be done with 'make build32'.

- Document these changes in build.7

Sponsored by:	EMC / Isilon Storage Division
MFC after:	2 weeks
2015-10-22 00:07:48 +00:00
Enji Cooper
e97b30d879 Bump .Dd again for the change done in r276483
Pointyhat to: me
2015-01-05 00:03:42 +00:00
Enji Cooper
42e7be2030 The variable used with install(1) for stripping should be STRIPBIN, not
STRIP_CMD

MFC after: 3 days
Reported by: lev
2014-12-31 22:49:02 +00:00
Enji Cooper
8f7d6871aa Bump .Dd for change done in r275908 2014-12-27 17:13:09 +00:00
Enji Cooper
3547290f1d Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS
MFC after: 1 week
Phabric: D1335
Reviewed by: brueffer
Sponsored by: EMC / Isilon Storage Division
2014-12-18 18:20:33 +00:00
Gavin Atkinson
d335e7a124 Drop references to updating over csup from build(7).
MFC after:	1 week
2014-06-25 12:28:22 +00:00
Baptiste Daroussin
a63d6c943d use .Mt to mark up email addresses consistently (part6)
PR:		191174
Submitted by:	Franco Fichtner <franco at lastsummer.de>
2014-06-23 08:27:27 +00:00
Bryan Drewery
a0e6a0131a - Add a LOCAL_ITOOLS to allow adding additional tools required for the
installworld and distributeworld targets

PR:		179562
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
MFC after:	1 week
2014-06-17 22:23:36 +00:00
Bryan Drewery
ca6a54ce20 Update build(7) with LOCAL_* vars
PR:		docs/178286
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2014-03-27 11:12:35 +00:00
John Baldwin
6a28ff1bb8 WITH_CTF is now a "normal" build option (WITHOUT_CTF is supported and
MK_CTF is used internally).

Reviewed by:	fjoe
2012-10-10 16:07:23 +00:00
Warren Block
d732418b1f Add reference to portsnap(8).
Submitted by:	Tim Kientzle
MFC after:	1 day
2012-07-02 17:52:43 +00:00
Warren Block
50a994c98b Point out that /usr/src, /usr/doc, and /usr/ports may be empty or not
exist until populated with csup(1) or svn(1).

PR:		169487
Submitted by:	Moritz Wilhelmy
MFC after:	1 day
2012-06-27 17:51:09 +00:00
Glen Barber
ea658fe55a Bump .Dd to reflect the date of the last content change, so MFC content
makes sense.

Pointy-hat to:		gjb (myself)
2011-10-09 20:21:07 +00:00
Glen Barber
cc13988649 Whitespace cleanup in build(7).
MFC after:	1 week
Need-MFC:	225858
2011-09-29 02:57:08 +00:00
Glen Barber
170c2788cb Document, and provide an example for, PORTS_MODULES in build(7).
PR:		161017
Submitted by:	gcooper
MFC after:	1 week
2011-09-29 02:52:33 +00:00
Ruslan Ermilov
69c488cdc6 It's a bit odd, but "make update" in src/ can also update the ports/,
doc/, and now www/ trees, but only using the "cvsup" transport.

When "make update" is run using a tree's makefile, it can also use
"cvs" (except for www/) and "svn" (only src/).

Clean up documentation and code regarding "make update":

- Increase oddness by adding support for WWWSUPFILE and NO_WWWUPDATE to
  Makefile.inc1 (analogous to PORTSSUPFILE/NO_PORTSUPDATE and
  DOCSUPFILE/NO_DOCUPDATE; WWWSUPFILE already supported by www/Makefile).

- Document all trees that support CVS_UPDATE.

- Document all trees that support SUP_UPDATE.

- Document SVN_UPDATE.

- Document NO_WWWUPDATE.

- make.conf(5) mistakenly said that *SUPFILE* had defaults.

- Add an example entry for WWWSUPFILE.
2011-06-16 12:28:37 +00:00
Nathan Whitehorn
e8423d00e1 Update release(7) and build(7) to reflect new release infrastructure for
the new installer.
2011-03-22 01:21:51 +00:00
John Baldwin
4e889921ef - Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set,
then that target is invoked for each architecture rather than the
  default action of building world and kernels for each architecture.
- Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build
  toolchains for all architectures.
- Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for
  'make universe'.

Reviewed by:	bz
MFC after:	1 week
2011-02-10 18:54:52 +00:00
Bjoern A. Zeeb
f1d16bd892 Back out r217734. [1]
Properly document what `make targets` is supposed to list to avoid
further confusion given the place the target sits. Should have happened
with r217125.

Requested by:	imp [1]
Reviewed by:	rwatson
2011-01-25 08:13:31 +00:00
Bjoern A. Zeeb
eee8163bef Properly document what the top-level make tinderbox does.
Reviewed by:	jmallett
MFC After:	3 days
X-MFC:		build.7 only
2011-01-22 22:57:28 +00:00
Glen Barber
7d6af40d1c Minor grammar fix.
Submitted by:	arundel (via email)
Approved by:	jkois (mentor)
Patch by:	arundel
MFC after:	5 days
2010-10-26 13:07:01 +00:00
Alexander Leidinger
21edb039c6 WITH_CTF can now be specified in src.conf (not recommended, there
are some problems with static executables), make.conf (would also
affect ports which do not use GNU make and do not override the
compile targets) or in the kernel config (via "makeoptions
WITH_CTF=yes").

Additional (related) changes:
 - propagate WITH_CTF to module builds
 - do not add -g to the linker flags, it's a noop there anyway
   (at least according to the man page of ld)
 - do not add -g to CFLAGS unconditionally
   we need to have a look if it is really needed (IMO not) or if there
   is a way to add it only when WITH_CTF is used

Note: ctfconvert / ctfmerge lines will not appear in the build output,
to protect the innocent (those which do not build with WITH_CTF would
see the shell-test and may think WITH_CTF is used).

Reviewed by:	imp, jhb, scottl (earlier version)
Discussed on:	arch@
2010-04-02 06:55:31 +00:00
Giorgos Keramidas
fea87c03b8 Document DEBUG_FLAGS in a more visible place, in the build(7) manpage
Noticed by:     Alexander Best <alexbestms.at.wwu.de>
Reviewed by:    jhb
MFC after:      1 week
2010-03-31 12:52:19 +00:00
Warner Losh
e999537881 Forgot to bump .Dd, so do it with this commit. Chose local time over
UTC time for the date...
2009-12-16 03:29:00 +00:00
Warner Losh
6d50d5e4d5 Docmuent NO_KERNEL{CLEAN,CONFIG,DEPEND,OBJ} as necessary. Update
documentation on KERNFAST meaning.
2009-12-16 03:25:43 +00:00