Shouldn't you configure emacs to auto-detect tabs/spaces on the file you've opened?
Re:An opinionated approach to GNU Make
by anoncake on Tuesday December 17, 2019 @05:38PM
(#21819725)
Whoever is responsible should rename the files so their names end with ".mk" or ".make", the standard extensions that Emacs and other editors recognize.
Auto-detecting tabs/spaces sounds like magic, which not everyone likes.
Re:An opinionated approach to GNU Make
by panpanna on Tuesday December 17, 2019 @12:15PM
(#21815783)
Of course emacs did not "detect" your non-standard makefile.
It is your responsibility to let editors know that, be adding that magical first line to your make.
Not sure who you're responding to. I don't blame anything here, just illustrate what might cause confusion of tabs and spaces in Makefiles, namely unexpected filename suffixes. Holds true for other editors besides Emacs obviously.
Recently I was working on a project with multiple Makefiles, ie Makefile.{win,nix}. My Emacs config did not load makefile-mode due to the suffixes. As spaces are my default, I got spaces on TAB, iirc even after turning on makefile-mode.