Commit Graph

1752 Commits

Author SHA1 Message Date
Ian Lepore
a1c70d6943 Create a mechanism for providing fine-grained build order dependencies
during SUBDIR_PARALLEL builds.  This augments the coarse .WAIT mechanism,
which is still useful if you've got a situation such as "almost everything
depends on A and B".

Because the parallel subdir mechanism uses non-obvious mangling of
target names, which should probably remain a private detail of the
implementation, it's not easy to do things like "libfoo: libbar", so
instead the new mechanism lets you set a variable that lists dependencies:

  SUBDIR_DEPEND_libfoo= libgroodah libpouet

Note that while I'm using libraries as an example here, it really has
nothing to do with the generated library files.  This is really saying
"build in directory libfoo after building in the libgroodah and libpouet
directories."

This updates lib/Makefile with dependency information based on the old
almost-accurate comment block and by combing through lib/* makefiles
looking for LDADD dependencies to other libraries within lib/*.

Reviewed by:	Jia-Shiun Li <jiashiun@gmail.com>
2014-06-15 13:45:37 +00:00
Hans Petter Selasky
36716419f3 Attach the CUSE library and kernel module to the default FreeBSD
builds. Bump the FreeBSD version number.
2014-06-13 08:53:49 +00:00
Glen Barber
402da360e1 Revert r267424 and r267425:
More exploration will be needed in order to silence the
  tinderbox mails caused by setting WITH_TESTS=1 by default.

Ref:	http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-amd64-amd64.full
With hat:	re
2014-06-13 00:05:06 +00:00
Julio Merino
a2b2ff60be Enable MK_TESTS by default.
This was never intended to be off by default but was done this way
because the initial patches broke the build.  Things seem stable now
(have been so for a while too) and "make tinderbox" is clean so let's
try again.

Announced in freebsd-current; all reported shortcomings have been
addressed.
2014-06-12 18:54:52 +00:00
Julio Merino
e8a34402f2 Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install it.

To make this possible, we need two fixes:
- bsd.subdir.mk needs to properly honor NO_SUBDIR in all cases so that we
  do not recurse into 'tests' subdirectories when we needn't.  Otherwise,
  we end up with some Kyuafiles in base.txz.
- etc/Makefile needs to skip installing tests in its 'distribute' target
  so that a Kyuafile doesn't leak into base.txz.

Approved by:	gjb
2014-06-10 17:04:30 +00:00
Julio Merino
ada17d7bde Ensure files are created during the build when using bsd.subdir.mk.
When FILES is defined in a Makefile that _also_ includes bsd.subdir.mk, the
build of the files (if any) was not properly triggered during the build
stage.  This was because bsd.files.mk did not define the buildfiles target
if it was already defined... and bsd.subdir.mk defined this target on its
own, thus causing a conflict.

Fix this by unconditionally defining buildfiles from bsd.files.mk; this is
safe because nothing else in the tree needs to redefine this and because the
target itself contains no commands: all it does is define dependencies.
Also ensure that bsd.files.mk is always pulled in by bsd.test.mk regardless
of what bsd.prog.mk does.

These fixes allow "make installworld" to run cleanly on a system with
read-only src and obj trees.

This is "make tinderbox" clean.

Reviewed by:	imp
Obtained from:	jilles
2014-06-09 14:36:49 +00:00
Bryan Drewery
864c53ead8 In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.

Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]

Mark known build failures as NO_PIE for now.

The only known runtime failure was rtld.

[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by:		Shawn Webb <lattera@gmail.com>
Discussed between:	des@ and Shawn Webb [2]
2014-06-08 17:29:31 +00:00
Julio Merino
8c7ec47a40 Move atf-sh from /usr/bin/ to /usr/libexec/
In r266650, we made libatf-c and libatf-c++ private libraries so that no
components outside of the source tree could unintendedly depend on them.

This change does the same for the "atf-sh library" by moving the atf-sh
interpreter from its public location in /usr/bin/ to the private location
in /usr/libexec/.  Our build system will ensure that our own test programs
use the right binary, but users won't be able to depend on atf-sh by
"mistake".

Committing this now to ride the UPDATING notice added with r267172 today.
2014-06-06 18:58:06 +00:00
Julio Merino
a845d42777 Add the *_TESTS_SH_SED_* functionality to atf.test.mk.
This exists already in plain.test.mk and tap.test.mk and should have been
added to atf.test.mk too when the feature was first introduced.

(It is probably time to address the related TODOs but I will do that
separately.)
2014-06-06 17:53:05 +00:00
Ed Maste
8febff7073 Install VT support files
They can be disabled by setting WITHOUT_VT_SUPPORT=yes in src.conf.

Sponsored by:	The FreeBSD Foundation
2014-06-05 18:53:56 +00:00
Warner Losh
e23dd3b2d2 Better documentation for why KERBEROS and OPENSSH are here, and where
to look for all the other options that used to be here (well, in
bsd.own.mk)

Suggested by: des@
2014-05-27 16:30:54 +00:00
Julio Merino
17a286a994 Change libatf-c and libatf-c++ to be private libraries.
We should not be leaking these interfaces to the outside world given
that it's much easier for third-party components to use the devel/atf
package from ports.

As a side-effect, we can also drop the ATF pkgconfig and aclocal files
from the base system.  Nothing in the base system needs these, and it
was quite ugly to have to get them installed only so that a few ports
could build.  The offending ports have been fixed to depend on
devel/atf explicitly.

Reviewed by:	bapt
2014-05-25 12:01:13 +00:00
Warner Losh
79f387daa8 Allow CC to not actually exist. During the ports INDEX run, all the
Makefiles are evaluated without building things. In a normal build,
the prerequisites would be built, and CC would be an actual thing. In
an INDEX build, though, they don't exists. Redirect stderr to get rid
of annoying messages, and assume that the compiler version is 0 if the
actual compiler can't tell us. Do this in preference to guessing based
on numbers because gcc410 might be 4.10, or 4.1.0 and without
carefully crafted special knowledge we differentiate between them
easily (also ming-gcc has no clues at all). Elsewhere, don't trust
the compiler version if it is 0.
2014-05-23 14:34:22 +00:00
Simon J. Gerraty
d94068ba0d Use an intermediate target to associate with _SUBDIR which is marked .MAKE
this allows make -n to do tree walks as expected without
doing anything else (as intended).
Use prefix _sub. to help avoid conflict with any real target.

Reviewed by:	imp
2014-05-20 18:25:46 +00:00
Simon J. Gerraty
a14f4e2fc1 Revert previous change - doesn't cover all cases. 2014-05-19 21:55:47 +00:00
Simon J. Gerraty
2cf7eab64a _SUBDIR is marked .MAKE - since it runs a sub-make.
Targets thus marked are supposed to run even with -n.
As such they should not do anything except run the sub-make.

Use an intermediate target _* to associate with _SUBDIR and which
depends on installincludes etc so that we get the correct behavior with -n.

Reviewed by:	marcel
2014-05-19 19:08:46 +00:00
Warner Losh
34bbee4317 Move inclusion of /etc/make.conf and others to old location (this also
moves local.sys.mk). The new location broke adding things to CXXFLAGS
in /etc/src.conf with +=. Move it back until that's sorted out...
2014-05-17 20:31:40 +00:00
Warner Losh
1f4e0ed969 The time is not yet ripe to break the lack of dependencies between
src/sys and the rest of the tree for builds.
o eliminate including bsd.mkopts.mk for the moment in kern.opts.mk
o No need to include src.opts.mk at all anymore. The reasons for it
  are now coverted in sys.mk and src.sys.mk.
2014-05-17 20:31:34 +00:00
Warner Losh
6b14aaa4d4 Read in SRCCONF early and consistently, if src.sys.mk exists, which is
should for all normal builds. Read /etc/make.conf earlier than before,
but consistently before SRCCONF and local.sys.mk.
2014-05-17 01:47:06 +00:00
Brooks Davis
525e2a83f6 Revert r261296. This removes the WITHOUT_NCURSESW option.
It was the wrong direction.  We will instead remove use of the
non-wide-character supporting libncurses.
2014-05-15 16:44:25 +00:00
Warner Losh
cb8b0584f4 Really, I don't want to install src.opts.mk at all. 2014-05-10 21:27:47 +00:00
Warner Losh
7ecf742eeb Move DOCCOMPRESS to MK variable. 2014-05-10 16:38:54 +00:00
Warner Losh
c115b8184e Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.
2014-05-10 16:38:37 +00:00
Warner Losh
be4646cf7f Remove some useless, commented out code. Remove name space polution in
the POSIX case by moving more things under !Posix part of an if.
2014-05-10 16:38:32 +00:00
Warner Losh
dfd11a4413 g/c unmaintained, uninstalled bsd.pkg.mk. It tied into the ports
system, as it existed 9 years ago, and has been obsolete for a long
time.
2014-05-10 16:38:27 +00:00
Warner Losh
7273339dc4 Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=no
and MK_LLDB=no, so set those explicitly (now that we can do
that). Simplify tests for these variables as well, since we know they
will always be defined regardless of the phase of the build.
2014-05-10 16:38:03 +00:00
Warner Losh
ab72ce6b1b Migrate NO_WARN to MK_WARN. Support legacy NO_WARN usage. Remove a
check for EARLY_BUILD because it isn't necessary (MK_WARN=no will
always be defined for that).
2014-05-10 16:37:53 +00:00
Warner Losh
999298523e Support, to the extent we generate proper command lines, compiling
with clang 3.3. Useful for test building -current on a -stable system
in individual directories. Potentially useful if we ever want to
support, say, gcc 4.8 or 4.9's new warnings when building with an
external toolchain (but such support not yet committed). Document
the bsd.compiler.mk interface.
2014-05-10 16:37:44 +00:00
Warner Losh
f510ecf0ee Optionally allow building the historical FreeBSD make program and
install it as fmake. This defaults to no. This should be viewed as the
first step towards evental migration of this historic code to ports
and removal from the tree.
2014-05-10 16:37:39 +00:00
Warner Losh
22cac7546c Introduce kern.opts.mk to hold all the options for kernel module
builds. Include this in the right places. Make src.opts.mk optional so
that modules can be built outside of the tree in the ports system.

PR: 189520
2014-05-09 21:11:27 +00:00
Warner Losh
f9798cc7eb We have to include bsd.opts.mk (included in bsd.own.mk) after
/etc/src.conf so that options set there will affect the options
defined in bsd.opts.mk. Fix a few comments while I'm here.
2014-05-09 04:49:48 +00:00
Warner Losh
3ceb1e5386 Spell always the more traditional way. 2014-05-09 04:49:43 +00:00
Warner Losh
09df65e474 Put bsd.own.mk back in the list, and take src.opts.mk out.
Fix a silly typo.
2014-05-08 02:24:30 +00:00
Warner Losh
8a863ef3d5 Fix a typo make should have complained about.
Submitted by: Mark Johnston
2014-05-08 02:18:36 +00:00
Warner Losh
bd871f14b7 bsd.compiler.mk was implicitly included by bsd.own.mk in historical
versions. With its movement to src.opts.mk, bsd.prog.mk was testing
COMPILER_TYPE without including the bsd.compiler.mk anymore. In the
source tree, this caused no problems, for reasons that aren't clear,
but does cause problems outside of the source tree. Allow
bsd.compiler.mk to be included multiple times safely, and always
include bsd.compiler.mk at the top of bsd.prog.mk. Resist the urge to
put it in bsd.init.mk, since that would reintroduce the implicit
include.
2014-05-07 18:15:02 +00:00
Warner Losh
5d420b97e6 All the NO_foo options processed in src.opts.mk are really bsd.opts.mk
options, so move their processing there. This fixes issues with
Makefiles that define NO_MAN=t and only inlcude bsd.*.mk files. A few
ports fell into this category, and they should be fixed by this change.
Also, for now, disable the warning about NO_foo being deprecated. More
work is needed than anticipated before we can do that, so kill the
noise for now.
2014-05-07 18:14:56 +00:00
Warner Losh
d03127447d Remove support for WITHOUT_BMAKE. bmake is now the only make that can
build world, so it is the only make we build or install. fmake is
still in the tree, but disconnected, and upgrades from older systems
that still have bmake has not been removed, but its state has not been
tested (it should work given how minimal the work to upgrade to bmake
is).
2014-05-06 04:22:37 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Warner Losh
5e84b765f4 Move the /usr/src specific options to src.opts.mk. Move inclusion of
/etc/src.conf to this file as well. Now, it will only affect builds of
/usr/src and not others that use the bsd.*.mk files. Specifically
don't install src.opts.mk so we can catch when it 'leaks' into
bsd.*.mk again and have there be errors when this happens. Future
commits will move to including src.opts.mk instead of bsd.own.mk when
all that's needed is one of the MK_FOO options from src.opts.mk.
Future options should be placed here, unless they directly affect a
bsd.*.mk file, in which case they should be placed in bsd.opts.mk.
2014-05-06 04:21:48 +00:00
Warner Losh
41603b8357 Simplify use of the semi-bogus EARLY_BUILD variable. Also, simplify
use of semi-bogus NO_WARNS variable. Both of these, in this case,
should collapse to WITHOUT_WARNS in a future commit.
2014-05-05 22:03:08 +00:00
Warner Losh
a18673d42d Introduce CWARNFLAGS.${COMPILER_TYPE} and use that to simplify the
thicket of .if ${COMPILER_TYPE} == "clang" that controls
warnings. Also, use CFLAGS.clang in a couple places in preference to
having a similar construct that's related to the CWARNFLAGS changes.
2014-05-05 22:03:01 +00:00
Warner Losh
9b01449f96 [1] Make WITHOUT_FOO alway trump WITH_FOO, regardless of the system
default. This restores more of the historical expectations that
    were broken when we started disallowing both WITH_FOO and
    WITHOUT_FOO to be defined.
[2] Document this new behavior, and improve the documentation in
    general here.

Submitted by: sjg@ [1].
2014-05-05 22:02:48 +00:00
Warner Losh
6f9f01a2d8 NLS is used by the build system. 2014-04-29 14:52:39 +00:00
Warner Losh
2ded1ea292 Generalize FOO.clang to FOO.${COMPILER_TYPE}. There's no reason these
need to be clang specific. Also generalize things a bit.
2014-04-25 19:25:57 +00:00
Warner Losh
7061d0855c Split up the options into those used only by bsd.mk.* or sys.mk and
the rest. Add note of caution for the surprises that popped up. MK_SSP
is the only one used by sys.mk, and it likely needs even extra
attention.
2014-04-25 19:25:53 +00:00
Warner Losh
347c9de056 Eliminate NO_INCS. It is used one place, and MK_TOOLCHAIN=no will
handle the job just as well. Opt for simplicity rather than one more
option.
2014-04-25 19:25:45 +00:00
Warner Losh
c772d4925c Now that all the NO_foo expressed in this loop have been removed from
the tree, start warning that NO_foo is deprecated. It was supposed to
be gone from the tree as a user-setting a long time ago...
2014-04-25 19:25:37 +00:00
Warner Losh
14472d17d7 NO_DEBUG_FILES -> MK_DEBUG_FILES=no in last remaining place. 2014-04-25 19:25:18 +00:00
Warner Losh
d6d1ee211a Add option WITHOUT_VI to not build/install vi. vi was the largest
binary without a knob to turn it off.
2014-04-24 23:17:40 +00:00
Warner Losh
f6092768b1 Use MK_OPENLDAP in preference to WITH_OPENLDAP and make it a default
NO option to match the opt-in nature of the historical nature of this
option.
2014-04-24 23:17:31 +00:00