Commit Graph

141 Commits

Author SHA1 Message Date
mrg a20af8d9db remove the MKSUBPIXEL/MKTTINTERP options; they're going away.
regenerate.
2010-07-25 07:19:00 +00:00
uebayasi d166c4bf28 Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org.  (These sets are not included as TNF releases.)
2009-11-30 16:13:22 +00:00
apb 87272391e8 If ${NETBDSRCDIR}/../xsrc exists, then use it as the default value
of X11SRCDIR.  If it doesn't exist, then use /usr/xsrc as before.

OK mrg
2009-10-10 19:05:28 +00:00
apb 828252228e * Use a more robust method of creating the top level object directory.
Use getmakevar to expand MAKEOBJDIRPREFIX or MAKEOBJDIR, or (if
  neither of those variables is set) use a non-recursive "make obj" in
  the top level source directory.

* Do not let TOP_objdir default to ${TOP}.  It's now set only by the
  -M or -O command line options, or after using getmakevar to expand
  MAKEOBJDIRPREFIX or MAKEOBJDIR.

* Make try_set_TOOLDIR handle MAKEOBJDIRPERFIX passed from the
  environment.  It runs too early to use getmakevar, so it will not work
  if the value contains embedded '${...}' variable references.

* Use '$TOOLDIR' (with a literal '$') instead of 'nonexistent' in
  a message when rebuilding make when TOOLDIR is not yet known.
2009-09-27 18:08:24 +00:00
apb f1ead22021 Allow build.sh "-C cdextra" option to be specified multiple times. 2009-09-27 17:28:38 +00:00
jnemeth d57c8fa8c6 Add a modules operation to build.sh, which builds and installs kernel modules
into DESTDIR.

This is based on the patch provided by tsutsui@ on tech-toolchain@.
2009-09-07 04:14:17 +00:00
hubertf ef944a027b regen 2009-07-12 14:17:18 +00:00
hubertf 4a9658ee28 regen 2009-07-12 12:15:10 +00:00
snj 75626c3937 Introduce MKSUBPIXEL, which allows enabling subpixel rendering code
in FreeType.
2009-05-01 19:42:18 +00:00
mrg 8f2ea05a60 be explicit about MAKEOBJDIR and MAKEOBJDIRPREFIX not being for
mk.conf or ${MAKECONF}.
2008-12-02 22:28:21 +00:00
mrg 867022784c revert sparc back to default of XFree86 at the request of macallan. 2008-11-15 11:27:49 +00:00
apb c89f08d79b Add support for new MAKEVERBOSE levels 3 and 4. The complete list is now:
0   Minimal output ("quiet")
 1   Describe what is occurring
 2   Describe what is occurring and echo the actual command
 3   Ignore the effect of the "@" prefix in make commands
 4   Trace shell commands using the shell's -x flag

The default remains MAKEVERBOSE=2.
2008-11-13 20:40:11 +00:00
mrg 9c8df5ee67 - retire MKXORG from public use
- introduce X11FLAVOUR to choose src/x11 vs src/external/mit/xorg
  for the X11 to build if MKX11=yes is set.  it takes the values
  of either Xorg or XFree86.
- default to Xorg on alpha, i386, macppc, shark, sparc and sparc64
- remove MKXORG_WITH_XSRC_XSERVER, unused and never useful
2008-11-09 23:02:28 +00:00
apb bd0daea8ff regen for recent change to examples and objdir advice,
and for the older MKSTRIPIDENT change.
2008-09-24 07:38:04 +00:00
lukem bc8f81ebac regen for MKHTML 2008-09-06 23:23:17 +00:00
lukem d6e6997551 Improve support for MKXORG!=no to enable builds into external/mit/xorg.
This will be mutually exclusive to MKX11!=no.
2008-08-28 07:21:49 +00:00
lukem 9df2be37d7 Document "build.sh cleandir".
Fix formatting nit.
Remove BUGS; all the in-tree platforms are using build.sh now.
2008-08-18 05:27:05 +00:00
apb f0633cf45e * Suggest a "-j" value between 1+NCPU and 2*NCPU for the fastest builds.
* Remove some duplicated content that appeared in both the section about
  make's -j flag and the section about build.sh's -j flag.
2008-08-11 08:22:39 +00:00
apb ca568b574c * Add more detail for build.sh -M and -O options.
* Mention new default when source is /usr/src but build.sh is run
  with neither -M nor -O.
2008-08-05 22:40:33 +00:00
perry b1d7b7c21a Builds now use "BUILDSEED" so that c++ binaries are reproduceable.
By default BUILDSEED is set to NetBSD-{majorversion} -- a -S flag may
be used to change it.

Discussed on tech-toolchain.
2008-08-05 19:43:33 +00:00
dholland 19f2a45a44 Correct/clarify the default setting of USETOOLS in the previous version.
Noted by apb.
2008-03-29 05:22:42 +00:00
dholland 000424deb2 Assorted updates and clarifications, grammar fixes and wording improvements,
and so on. Significant highlights:
   - mention src/tests and reference atf;
   - provide examples of MACHINE and MACHINE_ARCH;
   - mention that MKOBJ=no is not recommended;
   - correct the description of the default setting of USETOOLS;
   - document the interactions of build.sh -[uo] with various things;
   - document the interactions of build.sh tools and kernel=FOO;
   - use a lot fewer parentheses.
Discussed on netbsd-docs.
2008-03-28 05:23:44 +00:00
lukem b08050d67a Consistently document RELEASEDIR/RELEASEMACHINEDIR. 2008-03-18 04:24:38 +00:00
reed 09831171ac Mention that "build" and "distribution" do not build nor install (to DESTDIR)
a kernel.
2008-03-08 14:48:57 +00:00
sborrill 14df52fe64 Add support for CDBUILDEXTRA which acts like CDEXTRA to add extra items
to the CD-ROM image.
Make CDEXTRA and CDBUILDEXTRA be able to contain lists of files and directories
which are added in turn.
Add support for CDEXTRA_SKIP which contains a list of fnmatch(3) items to
skip during the copy. This is _very_ useful for skipping CVS dirs for example.
CDBUILDEXTRA and CDEXTRA_SKIP are to be used in Makefiles creating the images,
CDEXTRA remains to be used from build.sh.
Update documentation and build.sh help text to show that -C can be used to
specify a list of files and directories rather than just a single dir.
2007-11-23 16:19:28 +00:00
jnemeth 0e0996d809 Convert build.sh iso-dir=directory option to -C cddir as per jmmv@ on
source-changes.
2007-09-01 09:32:19 +00:00
jnemeth 3afb399fc8 Add an iso-dir=directory option. When combined with iso-image or
iso-image-source, it will cause directory to be added to the CD-ROM image.
2007-09-01 08:15:27 +00:00
jnemeth 1f84965eb7 describe new iso-image-source target 2007-08-30 10:29:02 +00:00
ad 559e70d141 Remove STATUS paragraph which makes it sound like the build system is
half baked.
2007-08-30 00:35:11 +00:00
apb 110a612826 Document recent changes to "make iso-image". 2007-04-13 19:43:38 +00:00
apb a5aed2697e Document the fact that "make installworld" and "build.sh
installworld=..." do not install the etc or xetc sets.  Suggest using
etcupdate(8) and postinstall(8) after installworld.
2007-03-26 17:35:06 +00:00
apb 3038ebf248 Try to clarify the description of build.sh -m mach.
Document new evbarm-eb and evbarm-el aliases.
2007-01-27 11:47:36 +00:00
apb 24f8b5315f Clarify that DESTDIR/OBJDIR/etc are absolute paths, but build.sh
-D/-O/etc allows relative paths.

Closes PR 32345 by Andre Luiz de Oliveira.
2006-10-08 17:54:30 +00:00
apb be15399d6a Use ${HOST_SH} instead of the host system's /bin/sh wherever possible:
* Describe the HOST_SH variable, and the way build.sh attempts to set it.

* Suggest passing HOST_SH in the environment if /bin/sh is not a working
  shell.
2006-09-29 19:57:04 +00:00
apb 37bd5c7de8 mkisofs is in pkgsrc/sysutils/cdrtools now, not pkgsrc/sysutils/cdrecord.
Reported by Jukka Salmi.
2006-01-29 14:03:59 +00:00
apb 21078fc390 * Add an "iso-image" target in the top level Makefile,
which invokes make iso-image in the etc directory.
* Add an "iso-image" action in build.sh, which
  invokes make iso-image.
* Document the above in doc/BUILDING.mdoc.
* Re-generate BUILDING.

Approved by christos
2006-01-28 21:34:07 +00:00
wiz adfe7630b6 Bump date for syspkgs. 2006-01-12 21:22:30 +00:00
apb c4fd2e8b9a Document "make syspkgs" and "build.sh syspkgs".
Reviewed by agc
2006-01-04 15:35:20 +00:00
reed ff1c165d76 Document the environment variables for if you need to override or
manually select your compilers.
(And regen BUILDING from doc/BUILDING.mdoc.)
2005-02-15 18:41:18 +00:00
jmc 4113b00abf Fix some typo's/bad wording as highlighted in PR#27219 2004-10-12 04:07:09 +00:00
wiz e13bb221d0 regen (Document -h. From Karsten Kruse in PR 25974.
While here, remove a duplicate sentence).
2004-06-25 15:04:20 +00:00
wiz 886a1acd28 Document MKTTINTERP. 2004-03-19 12:34:39 +00:00
lukem e26864a9c6 * Document build.sh -X and -x
* Document MKX11 and X11SRCDIR
* Remove note warning against cross-building from systems other than NetBSD;
  it works on many other platforms.
2004-02-06 23:22:44 +00:00
jmc ee42cb9014 Note tools/compat/README as the place to get notes from non-native cross builds 2003-12-29 07:10:24 +00:00
zuntum 55c70d751b Change -v to -V in the following section:
"Print make(1)'s idea of the value of var.  Does not build any targets."

To reflect reality.

Found by Tomasz Marciniak <Tomasz.Marciniak@felix.fizyka.amu.edu.pl>, thanks!
2003-12-19 12:06:45 +00:00
lukem 5daa33014e Improve how build.sh -N and MAKEVERBOSE interoperate;
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.

This means that you can do:
	./build.sh -N 1 makewrapper

	$TOOLDIR/bin/nbmake-$MACHINE
	#  runs at MAKEVERBOSE==1, with command lines suppressed

	$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
	#  runs at MAKEVERBOSE==2 for this invocation, with command lines shown
2003-10-26 02:17:46 +00:00
lukem 070871b5fc Implement build -N noisy, which sets MAKEVERBOSE to noisy and adds
`-s' to MAKEFLAGS for noisy < 2.
2003-10-25 03:46:09 +00:00
lukem 1024ddb55e regenerate for "%" prompt update 2003-09-29 07:58:01 +00:00
martti 4afa6d82c1 Backout the previous commit 2003-08-19 12:53:30 +00:00
martti 9261ba7994 Remove # from the example. 2003-08-19 10:00:29 +00:00
lukem 3af5adac38 fix description of MAKEOBJDIR. from Martin Husemann 2003-08-08 01:52:24 +00:00
lukem 13b0ffec63 Add build.sh -Z var, to unset a variable and ensure it's unset in makewrapper.
For -M MAKEOBJDIRPREFIX, unset MAKEOBJDIR.
For -O MAKEOBJDIR, unset MAKEOBJDIRPREFIX.
2003-07-29 10:07:15 +00:00
lukem 1313a78187 fix default location of TOOLDIR 2003-07-18 16:30:48 +00:00
lukem 6d22656bee Update for the MKUNPRIVED/MKUPDATE changes. 2003-07-18 08:38:10 +00:00
lukem 7a719d0e4e rebuild with new groff 2003-07-18 02:19:55 +00:00
lukem 0bd7fd87ac attempt to clarify how MAKEOBJDIR{,PREFIX} may be provided ...
(this document needs a rototill, which i may get to whilst writing a
paper about build.sh)
2003-07-03 05:52:47 +00:00
lukem 4e33a0f5d5 all:
*	add "releasekernel=conf", to install a gzipped copy of the kernels
	built by "kernel=conf" to RELEASEDIR/MACHINE/binary/kernel

build.sh:
    *	be more consistent in various status messages
    *	move the {release,}kernel=conf conf parsing code into getkernelconf()
	and use in both buildkernel() and releasekernel()
    *	only warn once when building multiple kernels without updating the tools
2003-05-25 12:34:27 +00:00
lukem 0c4720f396 For normal builds, MKOBJDIRS default to `no' (not `yes').
It's only build.sh that sets this to `yes' by default.
Noted by OGAWA Takaya in [toolchain/19823]
2003-05-18 11:18:02 +00:00
lukem 33018a010a improve description of how "build.sh -m mach" sets the default
MACHINE_ARCH, and list the special cases that this does not occur for.
2003-05-17 08:10:39 +00:00
lukem 40b7c46aca crank date for previous 2003-05-10 07:15:52 +00:00
lukem b7d3d22051 Add "sourcesets" argument/target, which builds source sets into
RELEASEDIR/source/sets
2003-05-10 07:12:37 +00:00
lukem ca2937cfe3 build.sh now provides defaults for DESTDIR and RELEASEDIR if not expert mode.
Remove -D and -R from EXAMPLES since they're not necessary any more.
2003-05-08 14:42:05 +00:00
lukem d27e8bf371 Fix example 3; the build.sh target is "install" not "installworld".
Improve description.
Noted by Valeriy Ushakov (uwe@) in private email.
2003-02-08 10:00:33 +00:00
lukem a2553ebbc2 attempt to further improve and clarify the examples... 2003-02-02 12:37:41 +00:00
lukem 34e5de7919 Prefix various paths with 'DESTDIR', to highlight that the DESTDIR
is taken into account.
2003-01-30 02:52:40 +00:00
lukem 6ac63dc2e0 allow toolprefix to be easily changed 2003-01-29 22:50:08 +00:00
lukem fc4bd1a946 Various improvements per discussion with Alan Barrett. 2003-01-26 13:15:17 +00:00
lukem 4e91f80fa2 - Add "sets" top-level Makefile target and build.sh operation.
[Latter suggested by Julio Merino in private email]
- Add "help" build.sh operation.
2003-01-26 06:19:12 +00:00
lukem 46d44d89e9 Change build.sh so that at least one operation is required.
Add "makewrapper" operation to build.sh.
	[The above changes were suggested by Alan Barrett on current-users@]

Fail if building as non-root unless: UNPRIVED is set, -U is given, or -E
(expert mode) is given.
	[Suggested by James Wetterau in private email]

Improve the examples in BUILDING.
2003-01-26 05:34:32 +00:00
lukem 31b7057f61 Rework how build.sh functions, so that command line options set various
parameters, and a list of "operations" defines what to do.
The full usage is show below.  Notes:
	`-b' has been deprecated (it always occurs now)
	`-d' is replaced by "distribution"
	`-R rel' onlys sets RELEASEDIR; use "release" to build a release
	`-k kern' has been replaced by "kernel=kern"
	`-i idir' has been replaced by "install=idir"
	-r now occurs before nbmake is rebuilt

Add a copyright (long due!).  Rework the code to (a KNF inspired) ShellNF.
Use functions appropriately.  Allow `nb' prefix to be easily changed to
something else.  Solve world peace (just kidding)

This is part of the (never achievable) goal of attempting to make
NetBSD easier to build...


  --8<--  new usage follows  --8<--

Usage: build.sh [-EnorUu] [-a arch] [-B buildid] [-D dest] [-j njob] [-M obj]
		[-m mach] [-O obj] [-R release] [-T tools] [-V var=[value]]
		[-w wrapper]   [operation [...] ]

 System build operations (all imply "obj" and "tools"):
    build		Run "make build"
    distribution	Run "make distribution" (includes etc/ files)
    release		Run "make release" (includes kernels & distrib media)

 Other operations:
    obj			Run "make obj" (default unless -o)
    tools 		Build and install tools
    kernel=conf		Build kernel with config file `conf'
    install=idir	Run "make installworld" to `idir'
			(useful after 'distribution' or 'release')

 Options:
    -a arch	Set MACHINE_ARCH to arch (otherwise deduced from MACHINE)
    -B buildId	Set BUILDID to buildId
    -D dest	Set DESTDIR to dest
    -E		Set "expert" mode; disables some DESTDIR checks
    -j njob	Run up to njob jobs in parallel; see make(1)
    -M obj	Set obj root directory to obj (sets MAKEOBJDIRPREFIX)
    -m mach	Set MACHINE to mach (not required if NetBSD native)
    -n		Show commands that would be executed, but do not execute them
    -O obj	Set obj root directory to obj (sets a MAKEOBJDIR pattern)
    -o		Set MKOBJDIRS=no (do not create objdirs at start of build)
    -R release	Set RELEASEDIR to release
    -r		Remove contents of TOOLDIR and DESTDIR before building
    -T tools	Set TOOLDIR to tools.  If unset, and TOOLDIR is not set in
		the environment, nbmake will be (re)built unconditionally.
    -U		Set UNPRIVED
    -u		Set UPDATE
    -V v=[val]	Set variable `v' to `val'
    -w wrapper	Create nbmake script as wrapper
		(default: ${TOOLDIR}/bin/nbmake-${MACHINE})
2003-01-23 16:24:08 +00:00
lukem a04634dbdf Add "-V var=[value]", for setting arbitrary variables which will also
be added to the nbmake-${MACHINE} wrapper.
Useful for setting RELEASEDIR, without -R's habit of building a release.
2003-01-04 12:55:32 +00:00
lukem 1c855902af Document:
*	build.sh -i idir
    *	top level targets:   distribution, buildworld, installworld
    *	top level variables: INSTALLWORLDDIR
2002-12-25 00:58:00 +00:00
lukem 239dc05c4f Add -E - "expert mode". If this is not specified, builds to DESTDIR=/ are
not permitted.
By using this flag, you are taking responsibility for any issues that
may occur because of this...
2002-12-08 22:14:00 +00:00
lukem 4f856ef51a - be consistent about option ordering in build.sh usage display
- use Fl and Ar instead of Sy and Em to format options
2002-12-08 08:42:51 +00:00
wiz 704158a9d5 Update location of BUILDING.mdoc. 2002-11-25 19:18:44 +00:00
lukem 13018c9683 regen for build.sh -k 2002-10-20 15:48:40 +00:00
lukem 8a2591bb65 regen for: USE_NEW_TOOLCHAIN was replaced with TOOLCHAIN_MISSING 2002-09-21 05:26:42 +00:00
fredb 09e185c208 Expand on the difference between ``build.sh -d'' and ``make install'',
as requested by Brian Stark in PR toolchain/18228 (which this closes).
2002-09-17 16:35:39 +00:00
wiz e691fec026 Remove duplicate 'files'. From Ryo HAYASAKA in toolchain/17674. 2002-07-22 09:49:05 +00:00
lukem 7d134e662e add "-M makeobjdirprefix" to build.sh 2002-05-13 01:44:34 +00:00
lukem d918d8f74f Move the METALOG from ${_SRC_TOP_OBJ_} to ${DESTDIR}.
There were too many synchronisation problems with using the former;
including situations such as a "make clean" performed between two
installs to the same DESTDIR would result in a truncated METALOG and
the resultant sets would be missing stuff such as include files that
don't get reinstalled if they haven't changed, even with !UPDATE.
2002-05-03 08:58:45 +00:00
sommerfeld 19bf08e897 Re-gen. 2002-05-02 22:14:12 +00:00
thorpej e4732a956b Add a -B option to set the BUILDID for the build. This also causes
the make(1) wrapper script to be named "nbmake-MACHINE-BUILDID".
2002-03-14 18:33:04 +00:00
lukem 29fbf34d9a document various supported environment variables, including MAKEOBJDIRPREFIX 2002-03-05 01:15:51 +00:00
lukem bce57f4638 document:
- make's UNPRIVED support
- build.sh's -U support
- the build system currently needs to build onto a file system with
  long file name and hard link support
2002-03-04 02:10:02 +00:00
thorpej 876398b40f Document the -d option to build.sh 2001-11-25 18:40:34 +00:00
tv f2054f0743 Note only <bsd.own.mk> as the authority for determining whether the new
BUILDING instructions should be used.
2001-11-15 16:20:37 +00:00
tv 6c2c072164 Turn off host-specific objdirs by default. Set MKHOSTOBJ=yes to enable. 2001-11-14 22:29:23 +00:00
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* Rewrite src/tools Make logic to work like the rest of the tree wrt
  "dependall" and "install".  The old "make build" hack is gone.

* Remove the MKTOOLS logic.  This was linked to the "make build" hack,
  and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
  BSD make wrapper.  Use new ${.ALLTARGETS} variable to scan for
  targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
  src/usr.* and src/gnu/usr.* that would do target filename rewriting
  (improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
  MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.
2001-11-12 23:16:17 +00:00
wiz f456b88410 Remove mention of BUILDLING.html, and follow rename of BUILDING.txt to
BUILDING.
Noted by Love <lha@stacken.kth.se> on tech-toolchain.
2001-11-08 21:29:06 +00:00
tv 3980e269f9 By popular demand, one preformatted version of BUILDING, plaintext, no CRs. 2001-11-01 16:34:21 +00:00