Date: Tue, 28 Oct 2014 23:01:09 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273803 - head/share/mk Message-ID: <201410282301.s9SN196Z028332@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Oct 28 23:01:09 2014 New Revision: 273803 URL: https://svnweb.freebsd.org/changeset/base/273803 Log: Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly appending the TESTS_SUBDIRS variable to SUBDIR Duplicate directory entries can cause unexpected side effects, like installing the same files multiple times. This can be easily reproduced via the following testcase prior to this commit: SUBDIR= dir TESTS_SUBDIRS+= dir .include <bsd.test.mk> Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.test.mk Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Tue Oct 28 22:14:31 2014 (r273802) +++ head/share/mk/bsd.test.mk Tue Oct 28 23:01:09 2014 (r273803) @@ -54,9 +54,11 @@ _TESTS= .include <plain.test.mk> .include <tap.test.mk> -.if !empty(TESTS_SUBDIRS) -SUBDIR+= ${TESTS_SUBDIRS} +.for ts in ${TESTS_SUBDIRS} +.if empty(SUBDIR:N${ts}) +SUBDIR+= ${ts} .endif +.endfor # it is rare for test cases to have man pages .if !defined(MAN)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410282301.s9SN196Z028332>