Makefiles for skip-level directories?

Peel, Casey casey.peel at
Fri Apr 4 22:28:58 UTC 2014

Ok, I figured it out and wrote up the following document (that is published on our internal wiki). You may take whatever you want of this for the FreeBSD wiki if you find it useful.

Something rcattelan pointed out while doing the code review for my gpart changes that I wanted to run past you:
<daelf> is the include to pick up MK_TESTS?
<cpeel> yes
<daelf> do you need to do that in the files that are not look at MK_TESTS?
<daelf> geom/tests/Makefile ?
<cpeel> I probably don't have to, but that's how the other Makefiles like that are done in FreeBSD, eg: src/bin/tests/Makefile
<daelf> is included by which is included by 
<daelf> so it seems redundant
<daelf> maybe we should ask the upstream if is correct ... might be better to leave it off vs perpetuating  something that might  not be right

-- Casey

Performance Test Ninja
casey.peel at / 206.777.7945

-----Original Message-----
From: Peel, Casey 
Sent: Friday, April 04, 2014 10:15 AM
To: 'Julio Merino'
Cc: freebsd-testing at
Subject: RE: Makefiles for skip-level directories?

> Please let me know where the documentation above is lacking and/or how
> to make it more discoverable.

Well, lets start with the fact that the share/mk/bsd.README file isn't referenced anywhere on yet it contains information on the Makefile variables that don't seem to be documented anywhere else.

It would be good to keep in mind that most testers aren't build engineers and know just enough about Makefiles to get themselves in trouble (me included) so this is an area that needs to be over-documented. If we want to enable people to contribute test code, we need to lower th bar on how to wire them up to the build. In an ideal world, the entire source tree would contain tests/ directories ready and primed for testcases to be added and the Makefile within them simply updated.

In the meantime I'm going to acquire a Sonic Cherry Coke, put up my Do Not Disturb sign, and see if I can't figure out how the hell this stuff works and write up the definitive guide for n00bs like myself.

-- Casey

Performance Test Ninja
casey.peel at / 206.777.7945
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: freebsd_atf_makefiles_for_dummies.txt
URL: <>

More information about the freebsd-testing mailing list