makefiles: Automatically create all directories that contain a target file.