Some of my projects are organised in way that the there isn't one make file at the top route of the project (git/svn/...) folder but I have several small Makefiles in subfolders of the project. Normally I use Projectile to save only files related to my current project and call the main Makefile but this doesn't work if the Makefiles are more distributed in the project.
I would like to have a function that saves all open/unsaved files from the current folder and it's subfolder and then run the Makefile in the current folder.
(defun max/save-compile-current-folder () (interactive) (max/save-current-and-subfolder-files ...) (compile t))
I currently don't know how to write the function
max/save-current-and-subfolder-files. I would appreciate any hints how to write this function or links to libraries that already implement it.