git: 7f916236044d - main - ssh: tidy include handling
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Feb 2025 22:39:56 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=7f916236044d9a733de8b3c47b5dcbf71988cb03
commit 7f916236044d9a733de8b3c47b5dcbf71988cb03
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-03-02 14:45:23 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-02-20 22:39:48 +0000
ssh: tidy include handling
Centralize optional krb5_config.h handling in ssh.mk. Do not add
headers (that are committed to the src tree) to SRCS as there is no
need.
Reviewed by: imp, jlduran, kevans (all earlier)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34409
---
secure/lib/libssh/Makefile | 5 -----
secure/libexec/sshd-session/Makefile | 2 --
secure/ssh.mk | 5 ++++-
secure/usr.bin/ssh/Makefile | 2 --
secure/usr.sbin/sshd/Makefile | 2 --
5 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index c8cf1fe6de80..43fa46149dfa 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -50,11 +50,6 @@ SRCS+= getrrsetbyname-ldns.c
LIBADD+= ldns
.endif
-.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
-.endif
-
.if defined(LOCALBASE)
CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
.endif
diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile
index e365b0c53dde..bce96112f65a 100644
--- a/secure/libexec/sshd-session/Makefile
+++ b/secure/libexec/sshd-session/Makefile
@@ -45,8 +45,6 @@ LDFLAGS+=-L${LIBBLACKLISTDIR}
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5
.endif
diff --git a/secure/ssh.mk b/secure/ssh.mk
index c331e40c16f8..bd88e43aa0a3 100644
--- a/secure/ssh.mk
+++ b/secure/ssh.mk
@@ -5,7 +5,10 @@
SSHDIR= ${SRCTOP}/crypto/openssh
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
-SRCS+= ssh_namespace.h
+
+.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
+CFLAGS+= -include krb5_config.h
+.endif
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile
index 9bff63f29395..aba1bce9c9a1 100644
--- a/secure/usr.bin/ssh/Makefile
+++ b/secure/usr.bin/ssh/Makefile
@@ -22,8 +22,6 @@ CFLAGS+= -DHAVE_LDNS=1
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi
.endif
diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile
index d5bcf008e233..d3b228bbbeb4 100644
--- a/secure/usr.sbin/sshd/Makefile
+++ b/secure/usr.sbin/sshd/Makefile
@@ -17,8 +17,6 @@ moduli: .MADE
LIBADD= ssh util
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -include krb5_config.h
-SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5
.endif