SOURCES = foo.c \ bar.cwill ignore 'bar.c' if there is a space right of the '\'. I've bitten by this a couple of times, and it's not always directly clear that the reason for some linker errors is a superfluous space in the Makefile.
Some other editor makes those spaces/tabs visible; but by default emacs doesn't. However, it's easy to add a Makefile-hook to your .emacs:
(add-hook 'makefile-mode-hook
(lambda()
(setq show-trailing-whitespace t)))
This sets the buffer-local variable show-trailing-whitespace, only for Makefiles (including Makefile.am and Makefile.in), and makes those trailing spaces visible.
Some people turn it on for all buffers, but I personally find that quite annoying: usually trailing whitespace does not mean anything.
Note that if you want to see all whitespace/tabs etc., you can use whitespace-mode (in recent emacs versions, use M-x whitespace) - which can be useful at times.
No comments:
Post a Comment