This is an expanded version of @Xaldew's answer that...
Checks for multiple kinds of makefile.
Reports when the makefile isn't found.
(defun locate-dominating-file-multi (dir compilation-filenames)
"Search for the compilation file traversing up the directory tree.
DIR the base directory to search.
COMPILATION-FILENAMES a list pairs (id, list-of-names).