I had the same problem and it seems like this is a bug in Emacs (starting from 24.2). Try this using the following .emacs :
(setq-default indent-tabs-mode nil) (add-hook 'after-save-hook 'whitespace-cleanup)
If you open the file, save it and open the Makefile, you will have the problem that you described. But if you open the Makefile first, save it and then open another type of file, you will have the opposite problem: 8 spaces will be replaced by tabs.
The problem is that indent-tabs-mode is a local buffer, but in whitespace.el it is set to a regular variable called whitespace-indent-tabs-mode . Therefore, the first meaning that sees is that which is considered.
Here is another workaround that solves other problems as well. Add this to your .emacs :
(defadvice whitespace-cleanup (around whitespace-cleanup-indent-tab activate) "Fix whitespace-cleanup indent-tabs-mode bug" (let ((whitespace-indent-tabs-mode indent-tabs-mode) (whitespace-tab-width tab-width)) ad-do-it))
Arthur Azevedo De Amorim
source share