Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2014 10:36:15 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r260505 - in head: . share/mk
Message-ID:  <201401101036.s0AAaFC7047759@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Fri Jan 10 10:36:14 2014
New Revision: 260505
URL: http://svnweb.freebsd.org/changeset/base/260505

Log:
  Allow tests to provide a Kyuafile when they relied on auto-generation.
  
  When generating a Kyuafile in the KYUAFILE=auto case, use a filename
  that is unlikely to clash with the filename used by explicitly-provided
  Kyuafiles.
  
  This allows a Makefile to set KYUAFILE=yes and provide a Kyuafile in
  the same directory when such Makefile was previously relying on
  KYUAFILE=auto.
  
  Fixes issues with new Kyuafiles not being picked up in NO_CLEAN builds
  (although manual intervention is required once, unfortunately, as
  described in UPDATING).
  
  Reviewed by:	sjg
  MFC after:	1 week

Modified:
  head/UPDATING
  head/share/mk/bsd.test.mk

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Fri Jan 10 09:45:28 2014	(r260504)
+++ head/UPDATING	Fri Jan 10 10:36:14 2014	(r260505)
@@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20140110:
+	If a Makefile in a tests/ directory was auto-generating a Kyuafile
+	instead of providing an explicit one, this would prevent such
+	Makefile from providing its own Kyuafile in the future during
+	NO_CLEAN builds.  This has been fixed in the Makefiles but manual
+	intervention is needed to clean an objdir if you use NO_CLEAN:
+	  # find /usr/obj -name Kyuafile | xargs rm -f
+
 20131213:
 	The behavior of gss_pseudo_random() for the krb5 mechanism
 	has changed, for applications requesting a longer random string

Modified: head/share/mk/bsd.test.mk
==============================================================================
--- head/share/mk/bsd.test.mk	Fri Jan 10 09:45:28 2014	(r260504)
+++ head/share/mk/bsd.test.mk	Fri Jan 10 10:36:14 2014	(r260505)
@@ -79,14 +79,20 @@ WITHOUT_MAN=yes
 PROG_VARS+= BINDIR
 PROGS_TARGETS+= install
 
-.if ${KYUAFILE:tl} != "no"
+.if ${KYUAFILE:tl} == "yes"
 FILES+=	Kyuafile
 FILESDIR_Kyuafile= ${TESTSDIR}
 
-.if ${KYUAFILE:tl} == "auto"
-CLEANFILES+= Kyuafile Kyuafile.tmp
+CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+.elif ${KYUAFILE:tl} == "auto"
+FILES+=	Kyuafile.auto
+FILESDIR_Kyuafile.auto= ${TESTSDIR}
+FILESNAME_Kyuafile.auto= Kyuafile
 
-Kyuafile: Makefile
+CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+
+.NOPATH: Kyuafile.auto
+Kyuafile.auto: Makefile
 	@{ \
 	    echo '-- Automatically generated by bsd.test.mk.'; \
 	    echo; \
@@ -94,16 +100,15 @@ Kyuafile: Makefile
 	    echo; \
 	    echo 'test_suite("${TESTSUITE}")'; \
             echo; \
-	} >Kyuafile.tmp
+	} >Kyuafile.auto.tmp
 .for _T in ${_TESTS}
 	@echo "${TEST_INTERFACE.${_T}}_test_program{name=\"${_T}\"}" \
-	    >>Kyuafile.tmp
+	    >>Kyuafile.auto.tmp
 .endfor
 .for _T in ${TESTS_SUBDIRS:N.WAIT}
-	@echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.tmp
+	@echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
 .endfor
-	@mv Kyuafile.tmp Kyuafile
-.endif
+	@mv Kyuafile.auto.tmp Kyuafile.auto
 .endif
 
 KYUA?= ${KYUA_PREFIX}/bin/kyua



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