makefiles: Generate all the test rules inside the corresponding shell function.