This simplifies the Makefile implementation and removes the knowledge burden of having to define something without really knowing why.
Consistently use tabs for indentation
Not only does this allow for copy/pasting, but it should also prevent emacs/vim/whatever from detecting the Makefile as using spaces for indentation.
Move -o flag to the end of the compilation command
We constantly see people who remove only the filename after the -o but not the flag itself, causing them to overwrite their own files. Moving it to the end should help with that.
Simplify macros section
There is no need for students to know about e.g. PC or RM, and just confuses them more
Get rid of defaults, especially because they were wrong and because it's a potential source of confusion ("why do I have to define CXX=clang++ when the tutorial already says it's the default?").
Go directly into an example to show how macros are defined and used, rather than trying to be abstract at first.
Fixes a typo in the dependencies section where targets was used instead of dependencies
I doubt many people make it this far, but it still should be fixed.
Give an example of a comment in the Makefile
Saw a few people who forgot that Makefiles used # and were trying to use C-style comments.
Even after these changes the tutorial still seems pretty overly verbose, but it's a start, at least.
I've attempted to clean up tutorial 5, Makefiles, a bit.
-o
flag to the end of the compilation command-o
but not the flag itself, causing them to overwrite their own files. Moving it to the end should help with that.targets
was used instead ofdependencies
#
and were trying to use C-style comments.Even after these changes the tutorial still seems pretty overly verbose, but it's a start, at least.