Commit Graph

89 Commits

Author SHA1 Message Date
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Jessica Clarke
2d01ce7f85 mk: Install bsd.compat.pre.mk
Reported by:	dchagin
Fixes:		5d6cb793d0 ("bsd.compat.mk Extract _ALL_LIBCOMPATS and add related variables")
2023-07-28 17:52:38 +01:00
Colin Percival
0967f7030c Install the recently added posix.mk file
This enables POSIX compatibility for Makefiles which start with
.POSIX:

Submitted by:	sjg
2022-04-12 13:05:55 -07:00
Warner Losh
c3bd3d1cc7 Install bsd.sysdir.mk.
Submitted by: Jung-uk Kim
2019-11-21 19:54:10 +00:00
Brooks Davis
2a19575a4f Install bsd.compat.mk.
Reported by:	glebius
2019-10-16 17:21:18 +00:00
Enji Cooper
833018816d Correct gmock/gtest expectations w.r.t. C++11/RTTI
Long story short, some of the tests were failing because they expected either
dynamic_cast or RTTI to be functional and it wasn't.

Move all common CXXFLAGS out to googletest.test.inc.mk and reference it from
googletest.test.mk and .../googletest/Makefile.inc
2019-02-20 20:09:59 +00:00
Enji Cooper
bd71398d1e Add googletest.test.mk and integrate into bsd.test.mk
googletest.test.mk is a rudimentary wrapper around the plain test interface
(for now), which only supports C++ programs, specified by the `GTESTS`
variable.

In the future, kyua will support gtests in a more native manner.
2019-02-20 01:09:03 +00:00
Simon J. Gerraty
a6589ab760 Update dirdeps.mk et al to latest
dirdeps.mk and meta.autodep.mk will now look for
Makefile.depend.options
to handle optional dependencies, the work is all done by
dirdeps-options.mk

Also update to latest meta.stage.mk and gendirdeps.mk

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D15701
2018-08-02 21:33:45 +00:00
Brad Davis
eed76687f0 Actually install bsd.dirs.mk
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D16434
2018-07-25 00:33:09 +00:00
Bryan Drewery
125902b6af Add basic bsd.linker.mk auto included from bsd.compiler.mk.
This will provide LINKER_TYPE and LINKER_VERSION.

MFC after:	2 weeks
Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11308
2017-06-22 21:03:20 +00:00
Jonathan Anderson
808b18e4d6 Extract suffix rules into bsd.suffixes[-posix].mk.
Refactor make suffix rules into separate files (one for POSIX and one not),
and rationalise the rules so that bsd.lib.mk can contain only those rules
that are library-specific (.c.po and .c.pico).

This can be accomplished by adding ${STATIC_CFLAGS} to the .c.o rule
unconditionally. STATIC_CFLAGS are only defined for use by sys.mk rules in
lib/libpam/Makefile.inc (see r227797), so it should be safe to include
them unconditionally in sys.mk's .c.o rule (tested by make universe and a
ports exp-run).

Reviewed by:	bdrewery, sjg
Approved by:	rwatson (mentor)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D6805
2016-10-12 00:42:46 +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
Bryan Drewery
568f2ee158 Don't create a Makefile.depend in share/mk.
This would cause it to be included everywhere in the build since it is
the MAKESYSPATH.  This leads to including dirdeps.mk more times than
desired.

Sponsored by:	EMC / Isilon Storage Division
2015-12-04 03:17:10 +00:00
Bryan Drewery
93e779a26c META MODE: These need object directories to handle staging.
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:27 +00:00
Baptiste Daroussin
2c9976e37e Install bsd.confs.mk
Rename ETCDIR into CONFIGDIR to avoid conflicts with the ports tree
2015-10-10 10:48:09 +00:00
Bryan Drewery
a00dbfa82b Fix running make in src directories without a Makefile giving confusing errors.
This fixes the following errors:
  make: don't know how to make bsd.README. Stop
  make: don't know how to make auto.obj.mk. Stop

This is easily seen in sys/dev/*.

The new behavior is now the expected output:
  make: no target to make.

This would happen as MAKESYSPATH (.../share/mk) is auto added to the -I list.
Any directory where make is ran in the src tree that has no local Makefile
would then try executing the target in share/mk/Makefile, which by default
was to build the first entry in FILES.  Of course, because bsd.README and
auto.obj.mk are not in the current directory the error is shown.

This check only works for bmake, but I will still MFC it with an extra
'!defined(.PARSEDIR) ||' guard for stable/10.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-24 17:36:18 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
b17ff922d4 Merge from head 2015-05-26 21:52:57 +00:00
Simon J. Gerraty
1253b02bf9 Add files to install 2015-05-24 02:16:00 +00:00
Warner Losh
c4765af73f Add infrastructure to build dtb files from dts files. 2015-01-08 18:28:06 +00:00
Rui Paulo
72a442fa29 Remove bsd.dtrace.mk.
MFC after:	3 weeks
2014-07-12 07:46:18 +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
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
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
Jung-uk Kim
709d846ced Install newly added bsd.mkopt.mk. 2014-04-19 04:59:56 +00:00
Warner Losh
6a542ebed9 Copy bsd.own.mk to bsd.opts.mk and separate out the option setting
code from the rest. Include bsd.opts.mk in bsd.own.mk to preserve
current behavior. Future revisions will replace the inclusion of
bsd.own.mk elsewhere with bsd.opts.mk or a more appropriate new
file that's still being finalized.
2014-04-18 17:04:09 +00:00
Julio Merino
a784098c10 Move FreeBSD Test Suite-specific code to a suite.test.mk file.
The new suite.test.mk file contains all the logic needed to install test
programs under /usr/tests/ and to support Kyua as the run-time engine.
This file is included by default by bsd.test.mk so Makefiles do not need
to care about its existence.

Specific Makefiles can define NOT_FOR_TEST_SUITE to indicate that whatever
test programs they are building are not supposed to be installed under
/usr/tests/ nor run by Kyua.  (The effect of passing this setting is that
suite.test.mk is simply not included.)

NOT_FOR_TEST_SUITE should never be used by Makefiles in the base system.
This functionality is provided so that third-parties can hook in their
own test code, with different semantics, if they wish.  This was asked
for by sjg@.
2014-03-14 12:52:55 +00:00
Julio Merino
d8278f57f8 Add tap.test.mk.
This file provides support to build test programs that comply with the
Test Anything Protocol.  Its main goal is to support the painless
integration of existing tests from tools/regression/ into the Kyua-based
test suite.

Approved by:	rpaulo (mentor)
2013-12-11 03:39:50 +00:00
Julio Merino
f67f6c4e3b Install plain.test.mk.
This was missed when this file was first imported.  Its atf.test.mk
counterpart is already being installed and these are necessary if we
want "make" within the source tree (not via "buildworld") to work.

Approved by:	rpaulo (mentor)
2013-11-25 13:28:40 +00:00
Julio Merino
e01d128a42 Subsume the functionality of MK_ATF into MK_TESTS.
There is no reason to keep the two knobs separate: if tests are
enabled, the ATF libraries are required; and if tests are disabled,
the ATF libraries are not necessary.  Keeping the two just serves
to complicate the build.

Reviewed by:	freebsd-testing
Approved by:	rpaulo (mentor)
2013-11-08 14:24:47 +00:00
Dag-Erling Smørgrav
edd42017c9 Remove all support for legacy NOFOO and NO_FOO build options. 2013-01-10 22:44:19 +00:00
Marcel Moolenaar
a83e187992 Install bsd.progs.mk, needed by bsd.test.mk and thus by atf.test.mk. 2012-11-17 00:07:28 +00:00
Simon J. Gerraty
c5faff658d Add ATF and reformat to ease reviews
Approved by:	marcel (mentor)
2012-11-07 22:02:53 +00:00
Brooks Davis
9215d178a4 Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by:	DARPA, AFRL
Reviewed by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
		(with some modifications post review)
MFC after:	2 weeks
2012-09-13 16:00:46 +00:00
Adrian Chadd
84103d748f .. and then notice that the list of mk files is ordered, and update to suit. 2010-11-16 22:22:16 +00:00
Adrian Chadd
e04bbe2020 Add in forgotten install rule. 2010-11-16 22:21:14 +00:00
Rui Paulo
6a4e245b76 Add bsd.dtrace.mk. This allows userland programs and libraries to
define USDT probes on a provider.d file and then use this new make
infrastructure to build the corresponding header file and object file.

This will only take effect when the user defines WITH_DTRACE when building.

Sponsored by:	The FreeBSD Foundation
2010-09-10 16:27:09 +00:00
Bjoern A. Zeeb
88aca62490 Also install the new bsd.arch.inc.mk filed. Missed in r204020.
Reviewed by:	imp
2010-07-06 18:07:56 +00:00
Pav Lucistnik
ed88f73921 Break long line
Submitted by:	ru
2007-06-01 15:32:23 +00:00
Pav Lucistnik
e61e798b8c Add bsd.port.options.mk, a stub to include parts of bsd.port.mk that handle
OPTIONS resolving. This will allow us to load bsd.port.mk in port Makefiles in
three steps (options, pre, post), allowing us to manipulate USE_* flags
conditionally on OPTIONS values.

With hat:	portmgr
Reviewed by:	ru
MFC after:	1 week
2007-06-01 15:17:51 +00:00
Alexander Kabaev
844b016555 Add entry for bsd.symver.mk.
Pointed out by: ru
2007-04-03 20:15:59 +00:00
Daniel Eischen
235d4a91a8 Add version_gen.awk to the installed files. 2006-03-16 15:20:27 +00:00
Hartmut Brandt
3c2659d809 Add a .mk file for building modules for the SNMP daemon. This may be
use in-tree as well as for 3rd party modules. This file is more or less
what was in usr.sbin/bsnmpd/modules/Makefile.inc with some modifications
and omissions. Usage examples can be found under usr.sbin/bsnmpd/modules/*.

Idea by:	phk
2005-11-10 10:03:22 +00:00
Ruslan Ermilov
6fe37d1365 Add endianness support to cap_mkdb(1), useful for cross builds. 2005-02-22 23:29:54 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Dag-Erling Smørgrav
5e3128401a GC port.mkversion. 2004-02-05 00:07:09 +00:00
Ruslan Ermilov
73f643b411 Fixed sys/boot/pc98/boot2/Makefile to use kern.mk and
get rid of bsd.kern.mk completely.

OK'ed by:	bde
2003-03-02 21:18:40 +00:00
Ruslan Ermilov
8cda97bd32 Sort FILES. 2002-07-17 16:35:00 +00:00