Commit Graph

22 Commits

Author SHA1 Message Date
Bryan Drewery
5c5948ac30 META_MODE: Set HOST_CXX and HOST_CPP and chain them down into CXX/CPP for host builds.
Sponsored by:	EMC / Isilon Storage Division
2015-09-30 23:14:23 +00:00
Bryan Drewery
ba7a7c1b82 RELDIR is useful without META_MODE. Always define it.
It is the CURDIR without the SRC base location in it.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 23:30:57 +00:00
Bryan Drewery
b8aba4fc19 META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.
In the first build the TOOLSDIR does not exit yet which causes CC to default
to the sys.mk version.  Once a TOOLSDIR is created during the build though,
this logic was changing CC to ${TOOLSDIR}/usr/bin/cc even though that file
did not exist.  Thus CC went from 'cc' to '/usr/bin/cc' which forced a
rebuild of everything while using the same compiler.  Check that TOOLSDIR is
not empty to avoid this.  If there is actually a TOOLSDIR cc then it will be
used and properly rebuild.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:36:01 +00:00
Bryan Drewery
4b23c482f4 META_MODE: Avoid // in meta log for tracked --sysroot files.
Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:23:59 +00:00
Bryan Drewery
075b136250 META_MODE: Follow-up r287865 and define CCACHE_DIR as realpath'd.
Filemon(4) will record paths as they are seen, not as fully resolved.  make(1)
will take the .MAKE.META.IGNORE_PATHS values and resolve them.  This creates
a discrepancy if CCACHE_DIR is a symlink.  Fix this by ensuring it is
resolved for its actual usage.

Submitted by:	sjg
2015-09-23 21:46:58 +00:00
Bryan Drewery
621ce7a5a6 Avoid /usr/obj// from r287899 2015-09-18 18:57:09 +00:00
Bryan Drewery
66e5857b42 Fix makeman creating obj directories due to turning on WITH_AUTO_OBJ.
r284708 addressed this slightly but seems to have put the make(showconfig)
guard in the wrong place.  Rather than guard setting the default obj directory,
guard inclusion of auto.obj.mk.  This avoids creating SRCTOP/obj and
SRCTOP/release/obj when running makeman.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 16:38:32 +00:00
Bryan Drewery
7a46bc8129 META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.
This avoids easily colliding multiple src trees with the same objects.  Having
multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique
identifier inside of obj/.  This pattern is more likely to be used due
to the non-META_MODE behavior working with it fine.

In environments where ../obj/ is wanted as the obj directory the value of
OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by
SRC_ENV_CONF) or environment.  For environment it must be single quoted or
escaped.  This will be more likely for vendors who are building images or using
NFS for builds.  In those cases MAKEOBJDIRPREFIX may already be utilized and
is supported.

Discussed with:	imp
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:22:00 +00:00
Bryan Drewery
3c35812126 META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.
The preferred way to modify the object directory root is to use OBJROOT.
However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves
as expected.

The problem with this before was that setting OBJROOT to contain SRCTOP
resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to
the start of the path for replacing SRCCTOP in CURDIR resolves this by
avoiding replacing SRCTOP when CURDIR is within the OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:01:05 +00:00
Bryan Drewery
63c304b083 META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 00:17:32 +00:00
Bryan Drewery
5ac0efdba9 Update META_MODE architectures for universe 2015-09-16 23:59:53 +00:00
Bryan Drewery
cf25886e34 META_MODE: Fix OBJROOT ending in two // when it does not yet exist.
This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by:	EMC / Isilon Storage Division
2015-09-16 20:58:43 +00:00
Bryan Drewery
bf7ff1d2bf Fix check from r287867 for valid MAKEOBJDIR from top-level builds.
MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 19:58:04 +00:00
Bryan Drewery
7aeb371515 Error and give better feedback for invalid MAKEOBJDIR settings.
Submitted by:	sjg
2015-09-16 18:02:04 +00:00
Bryan Drewery
0b5150a36e Ignore CCACHE_DIR for meta mode decisions.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 17:44:45 +00:00
Simon J. Gerraty
5ab53989f4 Handle default MAKEOBJDIR for META_MODE.
If MAKEOBJDIRPREFIX is set, use it for default OBJROOT.
If MAKEOBJDIR is empty or not a suitable value (no '/')
set a default that works.

Reviewed by: bdrewery
2015-09-11 00:19:49 +00:00
Simon J. Gerraty
cc2520d2f3 Fix generation of src.conf.5
Since makeman turns all options on, we need to guard somethings from
make(showconfig)
2015-06-22 20:21:57 +00:00
Simon J. Gerraty
916c1cd0ab Deal with MAKEOBJDIRPREFIX
MAKEOBJDIRPREFIX does not really fit our model.
Use it to set OBJROOT to about where user expects
and set MAKEOBJDIR to do what we want.
2015-06-20 21:48:07 +00:00
Simon J. Gerraty
fe137a9992 We no longer need CSU_DIR.i386
and until there is an alternative we need MK_INSTALL_AS_USER=yes
2015-06-13 19:52:35 +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
92f755617b For debugging we sometimes run makefiles forcing level > 0
Ensure setup that should have happened at level 0 is done.
2015-06-11 13:51:52 +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