Commit Graph

309 Commits

Author SHA1 Message Date
apb cbe3db24b8 Run "postinstall fix obsolete_stand" just before checkflist,
if we are building with DESTDIR != /
2014-06-16 09:06:26 +00:00
apb 8409b23d8e Pass -m MACHINE -a MACHINE_ARCH to postinstall 2014-06-16 09:04:43 +00:00
apb 60cea4e204 Pass SED=${TOOL_SED:Q} to postinstall. 2014-06-16 07:11:52 +00:00
mrg 26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
mrg afa90f2bf5 prepare for moving GCC 4.5 into gcc.old:
- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
  because it arranges for ../Makefile.inc to be included earlier, and
  don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
  valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
    is kind of sketchy, it would be great if this was fixed.
2014-02-26 09:54:32 +00:00
christos 2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg 85363808c6 hp700 rescue/ldd fails on -j16 build if usr.bin/ldd/elf32/libldd_elf32.a
hasn't been made yet. Add an explicit .WAIT before rescue to avoid this.
2013-07-16 09:52:21 +00:00
apb 3e31590ff0 Add src/etc/Makefile.params, containing the definition of the
RELEASEVARS variable, and commands related to printing the values of
the variables whose names are in RELEASEVARS.

Add an awk script to remove noise printed by "make -j" or high levels
of MAKEVERBOSE, so we get only the variables names and values.  The
values are escaped so that variables containing embedded newlines,
quotation marks, and backslashes, are passed through safely.

Adapt src/etc/Makefile and src/Makefile to use the new ${PRINT_PARAMS}
command defined in src/etc/Makefile.params.

Now ${DESTDIR}/etc/release and the params file in the top-level
.OBJDIR should never contain unwanted noise, even after a build with
MAKEVERBOSE=4.
2012-12-03 13:53:28 +00:00
joerg 54f191bfce Move the build_install logic from lib/Makefile into share/mk and re-use
it for tools. The existing logic broke for the LLVM build with the
recent .ORDER changes in make.
2012-11-15 23:51:53 +00:00
apb 1c0de10687 Create a "params" file in the top-level .OBJDIR during "make build".
This file will contain the values of all variables that can affect
the build process.  Take care not to update the file's timestamp if
the contents do not change.

${_SRC_TOP_OBJ}/params is referenced by ${_NETBSD_VERSION_DEPENDS} in
bsd.own.mk.

Rename the old "params" target to "show-params".  This simply
prints the values of the variables that can affect the build.
2012-11-04 11:02:11 +00:00
joerg 933525b99b Implement build_install in src/lib/Makefile, which traverses the
subdirectories and invokes dependall/install. Do this in groups
delimited by .WAIT to ensure that depending libraries can use the
installed versions and don't need to know the locations in the source
tree.

Use this new target in src/Makefile to replace most of the adhoc library
logic with two special cases, src/lib and src/compat. Adjust
sys/Makefile to include the module directory when building them. Add
some necessary .WAITs in src/lib/Makefile to reflect the dependencies
from src/Makefile and also add the rump libraries here.
2012-08-17 16:22:27 +00:00
apb 611a930af0 Add HOST_SH to _POSTINSTALL_ENV; needed for
usr.sbin/postinstall/postinstall revision 1.145.
2012-08-15 12:50:12 +00:00
apb 07086c66b3 Pass STAT=${TOOL_STAT:Q} through to postinstall. 2012-08-14 13:12:15 +00:00
apb 610473e207 TOOL_GREP is defined in share/mk/bsd.own.mk, but is not actually built
from tools/Makefile.  So don't try to use it here.
2012-08-14 13:04:09 +00:00
apb 8e0231f0a0 Pass all relevant tool variables to postinstall, not just a subset. 2012-08-14 12:37:41 +00:00
apb fe68d40e36 Fix unbalanced quotes in .if ${MKRUMP} != "no" 2012-08-14 12:19:16 +00:00
christos bf89823a75 exclude rump targets if MKRUMP = no 2012-08-08 14:00:31 +00:00
veego ed1ef0512a Add usr.bin to the exclude list for make includes.
This is no longer needed after flex was moved to the external framework.
2012-04-21 08:28:00 +00:00
abs 3a4ca493bc s/is the not root/is not the root/ in a comment - from Snader_LB 2012-01-24 17:37:34 +00:00
tsutsui 3cf69f27e2 Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
 msdosfs or partitioning MD label structures) support this target.

"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.

For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html

No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.

Closes PR toolchain/45153 and PR misc/45155.
2012-01-22 03:53:29 +00:00
apb 5f70d1f98e Move the code for creating src/BUILDING from "make build-docs" in
src/Makefile to "make regen" in src/doc/Makefile, and update a comment
in doc/BUILDING.mdoc to match.
2011-09-09 14:23:37 +00:00
jmcneill 438817447a Fix typo that prevented installmodules from working with -U 2011-08-08 23:18:36 +00:00
jmcneill b415fa375b add an installmodules=<dir> command to build.sh 2011-08-08 22:15:42 +00:00
mrg f7fea21d51 re-enable the gcc 4.5 crtstuff/libgcc builders now that they work.
also build the gmp, mpfr and mpc libraries in this case.
2011-06-29 02:05:24 +00:00
mrg a8eadc0087 fix the parts that build libgcc/crtstuff, etc., for GCC 4.5. 2011-06-22 05:13:20 +00:00
mrg 8f161cd6d3 remove all the code that supported HAVE_GCC=3. mostly from chuq. 2011-06-20 06:52:36 +00:00
mrg a2c4975d63 build evbppc modules in 3 different flavours:
- oea (default)
	- ibm4xx
	- booke

this, together with earlier machine_module[] work, should allow evbppc
platforms to use modules.
2011-06-15 09:45:58 +00:00
jym 4bd25a927a Pass down INSTALLSETS variable to installsets target. Use :Q to escape
shell meta-characters, as the variable contains a list of sets, separated
by spaces.

$ ./build.sh -V INSTALLSETS="base etc" install=idir

should now work as expected.

Reviewed by apb@ on tech-toolchain.
2011-01-29 16:56:26 +00:00
plunky f33b316b63 Remove the do-external-lib and do-gnu-lib targets, along with
external/lib/Makefile and crypto/external/lib/Makefile, replacing
them all with SUBDIRs directly from lib/Makefile.

compat/compatsubdirs.mk becomes simpler now, as everything is built
from lib/Makefile, meaning all the libraries will now be built under
compat so update the set lists to account for that.
2010-12-03 21:38:46 +00:00
skrll 15fa0783d7 Centralise USE_COMPILERCRTSTUFF.
PCC might need help.
2010-11-28 18:40:54 +00:00
plunky 114bcdc0d0 no need to create a do-lib-libdes target, the directory no longer exists 2010-11-22 08:35:44 +00:00
mrg 4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
pooka 0f5a2c3b87 descend into sys/rump/kern 2010-06-10 22:41:41 +00:00
mrg c6b4bc4a81 adjust the do-compat-* rules now that src/compat/lib and friends no longer exist 2009-12-13 09:29:27 +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
pooka da73ba1e67 build & install librumpdev_netsmb and librumpfs_smbfs components 2009-09-04 17:21:33 +00:00
dyoung 71fe64733e Let us use MKKMOD=yes to leave the kernel modules out of the
distribution.
2009-08-30 01:49:41 +00:00
pooka 3953343384 Build modules before rump libs so that something else can be
unwarrantedly blamed for a change.

This commit follows the style guide and is entirely non-build-tested.
2009-07-03 22:20:27 +00:00
christos b1d98f9166 add crypto/external to the build. 2009-06-07 22:46:12 +00:00
apb c4ad9aa7fc Make clean_METALOG in distrib/sets early in the build, to ensure that
the METALOG does not grow without bounds on multiple MKUPDATE builds.
(Previously, sanitise_METALOG in distrib/sets/Makefile used to do
something like this near the end of a build.)
2009-04-23 09:43:49 +00:00
tsutsui f32f514ecd Remove an explicit BUILDTARGETS do-compat-external-lib before do-build
because now src/compat/Makefile descends there and no particular
dependency on 32 bit compat external libs during do-build.
2009-04-15 10:18:34 +00:00
sketch 0ed32f1081 Disable grep host tool and unbreak NetBSD build until I can come up with a
clean fix.
2009-02-25 22:28:36 +00:00
sketch bb0a3b607e Use awk and grep host tools where required. 'build.sh release' now works
on Solaris (but only with HOST_CC=/usr/sfw/bin/gcc for now).
2009-02-25 20:38:30 +00:00
jmmv b5e5aa9ff1 Add the top-level do-compat-external-lib target that mimics
do-external-lib so that we can build the compat libraries for
ATF.  Also add compat/external/lib/Makefile following the same
example of external/lib/Makefile, which descends into the
external libraries and builds them.
2009-01-19 07:19:09 +00:00
pooka 3427000fad Build kernel modules the same time as the rest of the system libraries. 2008-12-30 22:18:11 +00:00
cube 7f4672798d Invoke postinstall with the environment variable MAKE set up to the relevant
value, so that postinstall picks up correct values.
2008-12-05 19:02:54 +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
mrg bafe7cb90b - enable 32-bit library builds on amd64 and sparc64
- add 3 new top-level targets:
    do-compat-lib-csu
    do-compat-libgcc
    do-compat-lib-libc
  and run them before "do-build" if ${MKCOMPAT} != "no"
2008-10-27 22:32:51 +00:00
apb c57a72c85c Add a do-top-obj target, which builds the top-level obj directory.
This uses the new NOSUBDIR support in bsd.subdir.mk.

Insert do-top-obj near the beginning of BUILDTARGETS.  The first few
items are now:
    cleandir:        cleans the tree.
    do-top-obj:      creates the top level object directory.
    do-tools-obj:    creates object directories for the host toolchain.
    do-tools:        builds host toolchain.
    obj:             creates object directories.

Also improve a comment and split a long line where SUBDIR is set from
_SUBDIR.
2008-10-25 15:03:44 +00:00
apb 66aea1d2dd Defer the "make obj" step until after tools are built and installed.
There may be commands embedded in "!=" assignments that depend on tools
being available, and previously these would have printed error messages
during "make obj".  They may still print error messages during "make
cleandir", which (if it is performed at all) is performed before tools
are built.
2008-10-22 17:37:16 +00:00