4 ms·
Learn Makefiles with the Tastiest Examples
- mostthingsweb 3y agoFrom a cross-compiling standpoint, Makefiles are usually a nightmare. Please stop using them. CMake or Meson are infinitely better.
- akdor1154 3y agoGreat article, I will be linking to this next time someone asks me what some line in a makefile means. ONESHELL is conspicuously absent though. Any conscious decision there? I quite like make for golang and web projects as well, though half just as a universally available task runner. With that said, it's the only language that has ever made me curse indentation-as-syntax, and that's for someone quite happy with Python and even F#.
- akdor1154 3y agoI wish someone would make "make, but based on input/output content hashes instead of input/output mtimes". A super-lite Bazel or Nix if you will.
- cweagans 3y agoYou’re looking for taskfile.dev. You can specify that a particular task has zero or more files as sources and generates zero or more files as outputs. You can also use the ‘watch’ flag to continuously monitor the inputs and regenerate the outputs. If the content hashes aren’t good enough, you can also specify a command that determines whether or not a task needs to be re-run.
- akdor1154 3y agoCool! I have an automatic skepticism of things that boil down to 'shell snippets embedded in yaml files', but it does look very complete. I might play with this for personal projects.
- dang 3y agoLearn Makefiles with the Tastiest Examples - https://news.ycombinator.com/item?id=35936665 https://news.ycombinator.com/item?id=35936665 - May 2023 (95 comments)