I had the same problem where it was telling me it couldn’t find the submodules. Everyone here in this thread that answered with updating your git repository is totally right, because you are missing the files in the modules/waf folder. BUT for me, updating the git repo wasn’t loading in those files because they are posted online on a different commit number than what I was updating to (if that makes any sense) See image.
Anyways, if you’re really stuck, just try manually downloading all the files from here (https://github.com/ArduPilot/waf/tree/337b0a96beeac517ecde081fb76dedd039089734) and pasting them into your waf subfolder. This is JUST to see if not having the files is the problem. You can go back later and put in a good reference to the updated versions of the files.