Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@AlgoRythm if you need a good tutorial, then oddly enough the best one I've found was embedded somewhere within this pdf: https://cs.bham.ac.uk/~exr/...
(Automating with makefiles, in the contents page) -
zshh38487yMakefiles are really nice and super powerful. I use them as much as possible in projects, that way I can keep a set interface to building, running tests, lint etc even though it’s using different tools under the hood. (make build, make test, make lint etc). And also it auto completes the targets in your terminal.
-
nightowl6987yI used to wonder what these cryptic files were all about. Then I picked up a book about GNU Make and understand them a lot more now. Filename pattern substitution is pretty neat (you can define a list of .c source files, have the Makefile substitute the .c for .o to work out what needs building etc.)
It's clever. But not too clever. Obviously there's cmake and other build systems but this does the job quite simply.
Related Rants
Wow!
Makefiles are SO much cooler than I thought before
$< = the first dependency file
$^ = all the dependency files
$@ = the build target
AND if I try to build something who's dependencies don't exist, it'll automatically try to build them!
rant
makefile