Interesting, thanks for sharing. I would be tempted to call this a bug in the Makefile if this is the case. CDPATH is a standard bash environment variable, people use it in various ways: https://github.com/search?q=%22export+CDPATH%22&type=code
If all these causes the build to fail then the maintainers of that build should be informed.
If all these causes the build to fail then the maintainers of that build should be informed.