src.sys.mk: Support src.conf in SRCTOP

If SRCCONF is not defined and src.conf exists at the top level of the
source tree, use that instead of /etc/src.conf.

MFC after:	3 days
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D52470

(cherry picked from commit dd8c666d8b)

UPDATING: mention the src.conf change

Fixes:		dd8c666d8b ("src.sys.mk: Support src.conf in SRCTOP")
(cherry picked from commit ab2fea3f9a)
This commit is contained in:
Dag-Erling Smørgrav committed 2025-09-16 13:55:22 +00:00
1 parent e5c5d8f78e
commit eafc54027d
6 files changed
+25 -5

No files matched your search

+1
View File
@@ -22,3 +22,4 @@ cscope.in.out
cscope.out
cscope.po.out
tags
/src.conf
+5
View File
@@ -17,6 +17,11 @@ and/or ports.
has changed. An NFS server that exports any of these file systems will
need its clients to unmount and remount the exports.
20250916:
If SRCCONF is unset and a file named src.conf is present at
the top of the source tree, it will now be used instead of
/etc/src.conf.
20240419:
Clang, llvm, lld, lldb, compiler-rt, libc++, libunwind and openmp have
been upgraded to 18.1.6. It is important that you run `make delete-old`
+6 -3
View File
@@ -1,6 +1,6 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.\" $FreeBSD$
.Dd March 8, 2024
.Dd September 16, 2025
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -30,8 +30,11 @@ variables that control the aspects of how the system builds.
.Pp
The default location of
.Nm
is
.Pa /etc/src.conf ,
is the top level of the source tree, or
.Pa /etc/src.conf
if no
.Nm
is found in the source tree itself,
though an alternative location can be specified in the
.Xr make 1
variable
+4
View File
@@ -6,7 +6,11 @@
.if !defined(_WITHOUT_SRCCONF)
# Allow user to configure things that only effect src tree builds.
.if exists(${SRCTOP}/src.conf)
SRCCONF?= ${SRCTOP}/src.conf
.else
SRCCONF?= /etc/src.conf
.endif
.if !empty(SRCCONF) && \
(exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && \
!target(_srcconf_included_)
+4
View File
@@ -8,7 +8,11 @@
# the rest of /usr/src, but they still always process SRCCONF even though
# the normal mechanisms to prevent that (compiling out of tree) won't
# work. To ensure they do work, we have to duplicate thee few lines here.
.if exists(${SRCTOP}/src.conf)
SRCCONF?= ${SRCTOP}/src.conf
.else
SRCCONF?= /etc/src.conf
.endif
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
.include "${SRCCONF}"
_srcconf_included_:
+5 -2
View File
@@ -174,8 +174,11 @@ variables that control the aspects of how the system builds.
.Pp
The default location of
.Nm
is
.Pa /etc/src.conf ,
is the top level of the source tree, or
.Pa /etc/src.conf
if no
.Nm
is found in the source tree itself,
though an alternative location can be specified in the
.Xr make 1
variable