Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Mar 2017 12:20:13 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net>
To:        Bryan Drewery <bdrewery@freebsd.org>
Cc:        rgrimes@freebsd.org, Ngie Cooper <ngie@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314657 - in head/kerberos5: . lib/libgssapi_krb5 lib/libgssapi_ntlm lib/libgssapi_spnego lib/libhdb lib/libkafs5 lib/libkrb5 libexec/hprop libexec/kpasswdd tools/asn1_compile tools/slc
Message-ID:  <201703042020.v24KKD5N078654@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <60fc23c8-f80e-9092-9c01-47850a0ad871@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-- Start of PGP signed section.
[ Charset windows-1252 unsupported, converting... ]
> On 3/4/2017 7:34 AM, Rodney W. Grimes wrote:
> > What is ${.CURDIR:H:H} ?????  Yes that seems to work but now we are obscuring
> > ../.. into makefile syntax magic, probably not a grand idea.
> > 
> 
> It just trims off the last directory component.  This both reduces
> namecache lookups, lessens the amount of data in a log, and makes
> debugging a log simpler by not having a crazy path like:
> /home/bdrewery/big/git/buildserver/sys/modules/usb/template/../../../dev/usb/template/usb_template.c
> 
> It's far simpler to understand and work with:
> /home/bdrewery/big/git/buildserver/sys/dev/usb/template/usb_template.c
> 
> The only downside is it is slightly more obscure in a Makefile, but once
> you know what :H is then it's not a problem.  This is why SRCTOP is even
> better than this as it is far more clear than even :H and avoids the
> ../../ problems.

Lets do one or the other, but not both ${SRCTOP} and :H:H:H.  It appears
that we now have a mix and mashed up some one way others the other.

> 
> >> Author: ngie
> >> Date: Sat Mar  4 11:34:36 2017
> >> New Revision: 314657
> >> URL: https://svnweb.freebsd.org/changeset/base/314657
> >>
> >> Log:
> >>   kerberos5: normalize paths using SRCTOP-relative paths or :H when possible
> >>   
> >>   This simplifies make logic/output
> >>   
> >>   MFC after:	1 month
> >>   Sponsored by:	Dell EMC Isilon
> >>
> >> Modified:
> >>   head/kerberos5/Makefile
> >>   head/kerberos5/Makefile.inc
> >>   head/kerberos5/lib/libgssapi_krb5/Makefile
> >>   head/kerberos5/lib/libgssapi_ntlm/Makefile
> >>   head/kerberos5/lib/libgssapi_spnego/Makefile
> >>   head/kerberos5/lib/libhdb/Makefile
> >>   head/kerberos5/lib/libkafs5/Makefile
> >>   head/kerberos5/lib/libkrb5/Makefile
> >>   head/kerberos5/libexec/hprop/Makefile
> >>   head/kerberos5/libexec/kpasswdd/Makefile
> >>   head/kerberos5/tools/asn1_compile/Makefile
> >>   head/kerberos5/tools/slc/Makefile
> >>
> >> Modified: head/kerberos5/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -11,7 +11,7 @@ KPROGS=	lib/libpam \
> >>  # This target is used to rebuild these programs WITH Kerberos.
> >>  kerberize:
> >>  .for entry in ${KPROGS}
> >> -	cd ${.CURDIR}/../${entry}; \
> >> +	cd ${.CURDIR:H}/${entry}; \

Curdir is /usr/src/kerberos5/
curdir :H is /usr/src
srctop is /usr/src

Please, one way or the other through the whole tree.
And again I understand the value of this, but was it discussed and
some set of this is how you decide to do :H or .. or :H:H or ../..
and here you use SRCTOP.

Cause right now... I see a mess.  The computer can burn the cycles,
the most expensive thing we have is human brain power.  Lets not
waste it by making a change just cause we can change it and make
less work for the computer and more work for the human.

> >>  	${MAKE} cleandir; \
> >>  	${MAKE} obj; \
> >>  	${MAKE} all; \
> >> @@ -21,7 +21,7 @@ kerberize:
> >>  # This target is used to rebuild these programs WITHOUT Kerberos.
> >>  dekerberize:
> >>  .for entry in ${KPROGS}
> >> -	cd ${.CURDIR}/../${entry}; \
> >> +	cd ${.CURDIR:H}/${entry}; \
> >>  	${MAKE} MK_KERBEROS=no cleandir; \
> >>  	${MAKE} MK_KERBEROS=no obj; \
> >>  	${MAKE} MK_KERBEROS=no all; \
> >>
> >> Modified: head/kerberos5/Makefile.inc
> >> ==============================================================================
> >> --- head/kerberos5/Makefile.inc	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/Makefile.inc	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -4,9 +4,9 @@
> >>  
> >>  NO_LINT=
> >>  
> >> -KRB5DIR=	${.CURDIR}/../../../crypto/heimdal
> >> +KRB5DIR=	${SRCTOP}/crypto/heimdal

Whats the rule your using?  ../../.. gets srctop but two ../.. gets :H:H?

> >>  
> >> -CFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/../../include
> >> +CFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR:H:H}/include
> >>  
> >>  .if ${MK_OPENLDAP} != "no" && !defined(COMPAT_32BIT)
> >>  OPENLDAPBASE?=	/usr/local
> >>
> >> Modified: head/kerberos5/lib/libgssapi_krb5/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libgssapi_krb5/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libgssapi_krb5/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -82,4 +82,4 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I.
> >>  
> >>  .include <bsd.lib.mk>
> >>  
> >> -.PATH: ${KRB5DIR}/lib/gssapi/krb5 ${.CURDIR}/../../../lib/libgssapi
> >> +.PATH: ${KRB5DIR}/lib/gssapi/krb5 ${SRCTOP}/lib/libgssapi
> >>
> >> Modified: head/kerberos5/lib/libgssapi_ntlm/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libgssapi_ntlm/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libgssapi_ntlm/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -45,4 +45,4 @@ CFLAGS+=-I${KRB5DIR}/lib/ntlm
> >>  
> >>  .include <bsd.lib.mk>
> >>  
> >> -.PATH: ${KRB5DIR}/lib/gssapi/ntlm ${.CURDIR}/../../../lib/libgssapi ${.CURDIR}/../libgssapi_krb5
> >> +.PATH: ${KRB5DIR}/lib/gssapi/ntlm ${SRCTOP}/lib/libgssapi ${.CURDIR:H}/libgssapi_krb5
> >>
> >> Modified: head/kerberos5/lib/libgssapi_spnego/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libgssapi_spnego/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libgssapi_spnego/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -31,7 +31,7 @@ CFLAGS+=-I${KRB5DIR}/lib/gssapi
> >>  CFLAGS+=-I${KRB5DIR}/lib/gssapi/gssapi
> >>  CFLAGS+=-I${KRB5DIR}/lib/gssapi/spnego
> >>  CFLAGS+=-I${KRB5DIR}/lib/asn1
> >> -CFLAGS+=-I${.CURDIR}/../../../lib/libgssapi
> >> +CFLAGS+=-I${SRCTOP}/lib/libgssapi
> >>  CFLAGS+=-I${KRB5DIR}/lib/roken -I.
> >>  
> >>  CLEANFILES=	${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} \
> >> @@ -45,7 +45,7 @@ ${GEN}: spnego.asn1 spnego.opt
> >>  
> >>  .SUFFIXES: .h .c .x .hx
> >>  
> >> -.x.c:   
> >> +.x.c:
> >>  	${CP} ${.IMPSRC} ${.TARGET}
> >>  
> >>  .hx.h:
> >> @@ -55,4 +55,4 @@ ${GEN}: spnego.asn1 spnego.opt
> >>  
> >>  .SUFFIXES: .h .c .x .hx
> >>  
> >> -.PATH: ${KRB5DIR}/lib/gssapi/spnego ${.CURDIR}/../../../lib/libgssapi ${.CURDIR}/../libgssapi_krb5
> >> +.PATH: ${KRB5DIR}/lib/gssapi/spnego ${SRCTOP}/lib/libgssapi ${.CURDIR:H}/libgssapi_krb5
> >>
> >> Modified: head/kerberos5/lib/libhdb/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libhdb/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libhdb/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -57,7 +57,7 @@ SRCS=	common.c \
> >>  	${GEN:S/.x$/.c/:S/.hx$/.h/}
> >>  
> >>  CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \
> >> -	-I${KRB5DIR}/lib/roken -I${.CURDIR}/../../../contrib/sqlite3/ \
> >> +	-I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/sqlite3/ \
> >>  	-I${KRB5DIR}/lib/krb5 \
> >>  	-I. ${LDAPCFLAGS}
> >>  CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\""
> >>
> >> Modified: head/kerberos5/lib/libkafs5/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libkafs5/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libkafs5/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -26,7 +26,7 @@ SRCS=	afssys.c afskrb5.c common.c krb5_e
> >>  
> >>  CFLAGS+=	-I${KRB5DIR}/lib/kafs \
> >>  		-I${KRB5DIR}/lib/krb5 \
> >> -		-I${.OBJDIR}/../libkrb5/ \
> >> +		-I${.OBJDIR:H}/libkrb5/ \
> >>  		-I${KRB5DIR}/lib/roken
> >>  
> >>  CLEANFILES= kafs5.3
> >>
> >> Modified: head/kerberos5/lib/libkrb5/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/lib/libkrb5/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/lib/libkrb5/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -625,4 +625,4 @@ CFLAGS+=	-I${KRB5DIR}/lib/krb5 \
> >>  
> >>  .include <bsd.lib.mk>
> >>  
> >> -.PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/
> >> +.PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${SRCTOP}/kerberos5/include ${KRB5DIR}/doc/doxyout/krb5/man/man3/
> >>
> >> Modified: head/kerberos5/libexec/hprop/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/libexec/hprop/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/libexec/hprop/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -9,7 +9,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1
> >>  CFLAGS+=-I${KRB5DIR}/lib/hx509
> >>  CFLAGS+=-I${KRB5DIR}/lib/ntlm
> >>  CFLAGS+=-I${KRB5DIR}/kdc
> >> -CFLAGS+=-I${.OBJDIR}/../../lib/libkrb5
> >> +CFLAGS+=-I${.OBJDIR:H:H}/lib/libkrb5
> >>  LIBADD=	hdb krb5 roken vers
> >>  DPADD=	${LDAPDPADD}
> >>  LDADD=	${LDAPLDADD}
> >>
> >> Modified: head/kerberos5/libexec/kpasswdd/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/libexec/kpasswdd/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/libexec/kpasswdd/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -2,7 +2,7 @@
> >>  
> >>  PROG=	kpasswdd
> >>  MAN=	kpasswdd.8
> >> -CFLAGS+=-I${KRB5DIR}/lib/roken -I../../lib/libhdb ${LDAPCFLAGS}
> >> +CFLAGS+=-I${KRB5DIR}/lib/roken -I${.CURDIR:H:H}/lib/libhdb ${LDAPCFLAGS}
> >>  LIBADD=	kadm5srv hdb krb5 roken vers asn1
> >>  DPADD=	${LDAPDPADD}
> >>  LDADD=	${LDAPLDADD}
> >>
> >> Modified: head/kerberos5/tools/asn1_compile/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/tools/asn1_compile/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/tools/asn1_compile/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -2,7 +2,7 @@
> >>  
> >>  PROG=	asn1_compile
> >>  MAN=
> >> -LIBROKEN_A=	${.OBJDIR}/../../lib/libroken/libroken.a
> >> +LIBROKEN_A=	${.OBJDIR:H:H}/lib/libroken/libroken.a
> >>  LIBADD=	vers
> >>  LDADD=	${LIBROKEN_A}
> >>  DPADD=	${LIBROKEN_A}
> >>
> >> Modified: head/kerberos5/tools/slc/Makefile
> >> ==============================================================================
> >> --- head/kerberos5/tools/slc/Makefile	Sat Mar  4 11:33:01 2017	(r314656)
> >> +++ head/kerberos5/tools/slc/Makefile	Sat Mar  4 11:34:36 2017	(r314657)
> >> @@ -1,7 +1,7 @@
> >>  # $FreeBSD$
> >>  
> >>  PROG=	slc
> >> -LIBROKEN_A=     ${.OBJDIR}/../../lib/libroken/libroken.a
> >> +LIBROKEN_A=     ${.OBJDIR:H:H}/lib/libroken/libroken.a
> >>  LIBADD=	vers
> >>  LDADD=  ${LIBROKEN_A}
> >>  DPADD=  ${LIBROKEN_A}
> >> @@ -18,7 +18,7 @@ CLEANFILES= roken.h slc-gram.c slc-lex.c
> >>  roken.h:
> >>  	${MAKE_ROKEN} > ${.TARGET}
> >>  
> >> -#	${.OBJDIR}/../make-roken/make-roken > ${.TARGET}
> >> +#	${.OBJDIR:H}/make-roken/make-roken > ${.TARGET}
> >>  
> >>  .include <bsd.prog.mk>
> >>  
> >>
> >>
> > 
> 
> 
> -- 
> Regards,
> Bryan Drewery
> 
-- End of PGP section, PGP failed!

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703042020.v24KKD5N078654>