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
This commit is contained in:
Ed Maste
2022-03-02 09:45:23 -05:00
parent 045a4c108f
commit 7f91623604
5 changed files with 4 additions and 12 deletions
-5
View File
@@ -50,11 +50,6 @@ SRCS+= getrrsetbyname-ldns.c
LIBADD+= ldns LIBADD+= ldns
.endif .endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
SRCS+= krb5_config.h
.endif
.if defined(LOCALBASE) .if defined(LOCALBASE)
CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"' CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
.endif .endif
-2
View File
@@ -45,8 +45,6 @@ LDFLAGS+=-L${LIBBLACKLISTDIR}
.endif .endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5 LIBADD+= gssapi_krb5 gssapi krb5
.endif .endif
+4 -1
View File
@@ -5,7 +5,10 @@
SSHDIR= ${SRCTOP}/crypto/openssh SSHDIR= ${SRCTOP}/crypto/openssh
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h 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\" CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
-2
View File
@@ -22,8 +22,6 @@ CFLAGS+= -DHAVE_LDNS=1
.endif .endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
SRCS+= krb5_config.h
LIBADD+= gssapi LIBADD+= gssapi
.endif .endif
-2
View File
@@ -17,8 +17,6 @@ moduli: .MADE
LIBADD= ssh util LIBADD= ssh util
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" .if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -include krb5_config.h
SRCS+= krb5_config.h
LIBADD+= gssapi_krb5 gssapi krb5 LIBADD+= gssapi_krb5 gssapi krb5
.endif .endif