Why Makefile?

How Make?

Tutorials

Tips and Tricks

  • Polyglot makefiles

    .ONESHELL: python: SHELL := python3 python: greeting = “hello” print(f”{greeting}, python!“)

Examples of good use of Makefile

Makefile companions — autotools, premake, scons, cmake

Make-like

  • Just ” is a handy way to save and run project-specific commands.” - just is a command runner, not a build system, so it avoids much of make’s complexity and idiosyncrasies. No need for .PHONY recipes!
  • cmake
  • Pants
  • tup is a file-based build system for Linux, OSX, and Windows. It inputs a list of file changes and a directed acyclic graph (DAG), then processes the DAG to execute the appropriate commands required to update dependent files. Updates are performed with very little overhead since tup implements powerful build algorithms to avoid doing unnecessary work. This means you can stay focused on your project rather than on your build system.
  • casey/just: 🤖 Just a command runner ⚡
  • xmake A cross-platform build utility based on Lua Simple, Fast, Cross-platform Modern C/C++ build tools, Support multi-language hybrid compilation.