Commit Graph

44 Commits

Author SHA1 Message Date
Bryan Drewery
ad706c65e1 Follow-up r320061: Need to respect make.conf/env LIBDIR overrides.
This fixes the lib32 build from creating all stale .depend files.

X-MFC-With:	320061
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-19 18:08:02 +00:00
Bryan Drewery
7970b89399 WITH_META_MODE: End each ERROR_CMD CMD line with ';'.
This makes it easier to debug multi-line command failures.

X-MFC-With:	r319862
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-16 21:48:42 +00:00
Bryan Drewery
51deaaab90 WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.
This was sed'ing on stdin for failing .PHONY targets.

Reported by:	Mark Millard
X-MFC-With:	r319862
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-16 04:28:10 +00:00
Bryan Drewery
95a2495fc2 META_MODE: Show .ERROR_CMD in error.
This uses a hack to get the CMD from the meta file rather than
.ERROR_CMD since bmake currently blanks the value for non-jobs
mode.

Reviewed by:	sjg (indirectly)
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-06-12 19:13:29 +00:00
Bryan Drewery
29f227c144 WITH_META_MODE: Enable printing of some of make's environment on error.
This will print a set of variables from make on error using
MAKE_PRINT_VAR_ON_ERROR.  It is already enabled for the DIRDEPS_BUILD.
It may make sense to enable this in the non-meta mode as well once
people are more used to its more verbose error output.

This makes it much simpler to see which .meta file is used when a
command files so that it may be inspected for the build command.

Suggested by:	sjg
Approved by:	re (implicit)
Sponsored by:	EMC / Isilon Storage Division
2016-06-14 16:20:25 +00:00
Bryan Drewery
2d9796bd24 Follow-up r297835: Let the intented default cookie work.
This happened to work for not prepending .OBJDIR twice but broke the
other case of prepending it when needed.

Pointyhat to:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:04:45 +00:00
Bryan Drewery
94086cea27 Rework META_TARGETS so that it automatically adds META_DEPS to the targets.
This will only be done if the target is defined, so if the target is
defined after bsd.sys.mk is included then it needs to manually add
${META_DEPS} still.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:04:42 +00:00
Bryan Drewery
0457a4e053 META_MODE: Support targets that already have .OBJDIR in them for META_COOKIE.
Sponsored by:	EMC / Isilon Storage Division
2016-04-11 21:12:24 +00:00
Bryan Drewery
8f399aba4d Define OBJTOP earlier if possible for use in targets.
Sponsored by:	EMC / Isilon Storage Division
2016-03-31 14:48:17 +00:00
Bryan Drewery
2b2ab443c0 Follow-up r296700: Fix incorrectly declaring these as .MAIN.
This broke bootstrap-tools at least for DIRDEPS_BUILD.

Sponsored by:	EMC / Isilon Storage Division
2016-03-13 20:51:45 +00:00
Bryan Drewery
95ae492929 META_MODE: We can only use a cookie if filemon is being used.
Sponsored by:	EMC / Isilon Storage Divsion
2016-03-11 23:45:32 +00:00
Bryan Drewery
b7d28aff10 META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:28 +00:00
Bryan Drewery
588f5cb86d DIRDEPS_BUILD: Remove the cookie when target is out-of-date.
The meta file may decide the target is out of date but nothing
ensures that the *next* build will build this target if it
fails this time for some reason; it is still out-of-date
until it succeeds.

Convert the include/ cookie usage to the global versions.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:44:27 +00:00
Bryan Drewery
0b6ba3f22a Define .MAKE.MODE to normal to avoid the need for :U later.
Sponsored by:	EMC / Isilon Storage Division
2016-01-19 22:41:44 +00:00
Bryan Drewery
80dfd0d4a2 META MODE: Show PATH on errors.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:31 +00:00
Simon J. Gerraty
948f327ee4 Rename META_MODE option to DIRDEPS_BUILD
This allows META_FILES option to be renamed META_MODE.
Also add META_COOKIE_TOUCH for use in targets that can benefit
from a cookie when in meta mode.

Differential Revision:	https://reviews.freebsd.org/D4153
Reviewed by:	bdrewery
2015-11-14 03:24:48 +00:00
Simon J. Gerraty
daf514d0bb Move include of make.conf back to its old position.
This means moving include of local.sys.mk and src.sys.mk too.
Introduce new includes to take the early slot, for the purpose
of being able to influence toolchains and the like.

Differential Revision:	D2860
Reviewed by:	imp
2015-06-19 14:56:24 +00:00
Simon J. Gerraty
31277fe3a0 Skip MAKE_PRINT_VAR_ON_ERROR unless we are doing META_MODE
with all the recursion in normal build it is too much noise.
2015-06-15 21:09: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
10e781d1ba Allow AUTO_OBJ with out META_MODE.
Remove frobbing of SRCCONF etc - not strictly relevant to meta mode.
2015-05-29 06:45:32 +00:00
Simon J. Gerraty
4113aa9077 Move META_MODE bits to local.meta.sys.mk
By moving META_MODE bits from local.sys.mk, they are easier
to skip when MK_META_MODE=no

Update some filters to cope with sync from head.

If buildworld etc or WITHOUT_META_MODE disable all the META_MODE
related options.
2015-05-26 21:44:15 +00:00
Simon J. Gerraty
89ea69b2fa Move include of auto.obj.mk to sys.mk 2015-05-24 02:45:15 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Simon J. Gerraty
4bd681c150 Crude cross-build support thanks to clang 2014-07-25 20:44:04 +00:00
Simon J. Gerraty
7d46a6b75a export sanitized MAKESYSPATH in case .../ appears in default syspath. 2014-06-25 00:19:58 +00:00
Simon J. Gerraty
0244ab1f26 Use _LIBDIR in STAGE_LIBDIR so we DTRT for PRIVATE libs.
We now use SYSROOT
and (for now) non-shared toolchain when building for host.
2014-05-16 14:58:48 +00:00
Simon J. Gerraty
241026341f When bootstrapping tools MACHINE==host and EARLY_BUILD defined,
so not use any of stage tree.

M_whence only first value counts
2014-05-10 00:23:12 +00:00
Simon J. Gerraty
65c026e612 Avoid /etc/make.conf
and make it easier to deal with compiler updates
2014-05-05 18:15:18 +00:00
Simon J. Gerraty
cb34e2d98b Handle the different expectations of MACHINE_ARCH b/w buildworld etc
and dirdeps.
2013-10-16 16:05:12 +00:00
Simon J. Gerraty
402be6b029 Some cleanup and re-org.
Also update CFLAGS_LAST.clang to match new compiler version.
Add BOOT_MACHINE_DIR (so we can stick to unqualified Makefile.depend)
2013-10-12 23:46:41 +00:00
Simon J. Gerraty
a0108088f8 Include more stuff within the meta mode block, so that buildworld
can function normally.

Submitted by:	John Van Horne
2013-06-04 15:25:57 +00:00
Simon J. Gerraty
3f97663be0 Cleanup some backwards compat stuff we do not need.
Introduce TARGET_OBJ_SPEC (derrived from TARGET_SPEC_VARS)
so we can build something like universe.
2013-05-11 01:03:29 +00:00
Simon J. Gerraty
fb0cb80846 Add stage-install.sh so we can do away with the need to have
$STAGE_OBJTOP/include for src/include.
2013-04-19 18:45:03 +00:00
Simon J. Gerraty
fd2ff6a087 If building for "host" and we do not have Makefile.depend.host;
do not update it.
This allows us to avoid populating the tree with Makefile.depend.host
that aren't absolutely necessary.
2013-03-17 03:09:08 +00:00
Simon J. Gerraty
0014c9fea8 We need .OBJDIR done earlier 2013-03-17 01:53:47 +00:00
Simon J. Gerraty
00140433d2 Apply DEP_DIRDEPS_FILTER.${DEP_MACHINE} as needed.
Use DEP_DIRDEPS_FILTER.host to supress dependencies for host tools.
2013-03-12 17:21:03 +00:00
Simon J. Gerraty
9c6f3ad90f Control default .MAKE.DEPENDFILE indepentend of .MAKE.DEPENDFILE_PREFERENCE 2013-03-08 01:51:32 +00:00
Simon J. Gerraty
34ce9cc44f Do no assume ${DESTDIR}/usr/include is always valid 2013-02-20 00:13:26 +00:00
Simon J. Gerraty
6bc671bb67 If MAKESYSPATH contained .../ entry resolve it so that it still works
when we launch make from obj tree.
If we don't have sysroot support we need some c++ and clang specific
include dirs in the stage tree.
2013-02-16 01:19:18 +00:00
Simon J. Gerraty
ab970acff7 Use STAGE_OBJTOP for STAGE_SYMLINKS_DIR etc 2013-01-29 00:11:21 +00:00
Simon J. Gerraty
16974e1031 Add TIME_STAMP 2012-11-09 05:43:15 +00:00
Simon J. Gerraty
1e5c3c2b29 Need CXXFLAGS_LAST and LDFLAGS_LAST 2012-11-08 21:38:26 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00