On Fri, Jan 10, 2020 at 10:52:03PM +0100, Alexander Bluhm wrote: > On Fri, Jan 10, 2020 at 01:58:47PM +0100, Marc Espie wrote: > > Bleh, I forgot to synch two patches I already committed. Here's a patch > > that applies cleanly. > > I did run this make through a full regress. It seems that make > regress in /usr/src/regress/usr.sbin/ldapd/ exits with an error. > > http://bluhm.genua.de/regress/results/2020-01-10T14%3A11%3A58Z/logs/usr.sbin/ldapd/make.log > > *** Error 1 in /usr/src/regress/usr.sbin/ldapd (Makefile:44 '.END': @[ -f > /usr/src/regress/usr.sbin/ldapd/obj/ldapd.pid ] && kill $(cat /us...) > > I have never seen this problem before. > > bluhm
Oh, the test is wrong, and it's now enough to have make complain about it. Before the patch, errors in .END and .BEGIN were not properly looked at. See, that -f ... && will be *false* if the file doesn't exist. The way to this kind of test without failing is if [ -f ... ]; then ... fi Index: Makefile =================================================================== RCS file: /cvs/src/regress/usr.sbin/ldapd/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- Makefile 28 Jun 2018 02:47:55 -0000 1.9 +++ Makefile 11 Jan 2020 11:29:35 -0000 @@ -39,9 +39,10 @@ bootstrap: .if ! (make(clean) || make(cleandir) || make(obj)) .END: - @[ -f ${.OBJDIR}/ldapd.pid ] &&\ + @if [ -f ${.OBJDIR}/ldapd.pid ]; then \ ${SUDO} kill $$(cat ${.OBJDIR}/ldapd.pid) &&\ - rm ${.OBJDIR}/ldapd.pid + rm ${.OBJDIR}/ldapd.pid; \ + fi .endif connect: bootstrap