Depends on the language and the kind of software you’re developing.
make
is typical and one of the oldest tools that people use to wrap whatever other language specific things developers choose to use.
For hacky home stuff you’d just type compiler commands into a Makefile in the root of your project.
… or maybe even don’t have a Makefile if you just have everything in one directory.
For that kind of use it doesn’t matter what languages you’re using or if you’re even building code.
For example, to distribute your c
code, typically you’d use something like autoconf and automake. Autoconf is a tool you invoke when you add/remove dependencies from your code, it’s what generates the configure script.
People building the code you’re distributing are expected to obtain dependencies you’ve listed in your documentation somehow, then run the ./configure
script which will generate the make file from your template with correct paths for wherever dependencies are installed on your system, and the right set of compiler flags.
The person building the binary can call make
afterwards.
make
is so pervasive it even gets used to wrap other build tools, like scons
, buck
, bazel
, cmake
,maven
, gradle
, ninja
, etc…etc… people keep inventing new ones.
Some of the other ones can call and generate configs for other tools and can wrap each other … and they compete in being more versatile and meta, it’s weird.
In general you have to rely on end users/people reading README.txt/.md/.rst and being able to follow your/developer instructions.
You, as a developer, probably want to pick whatever set of tools gets in your way the least, and gets the job done…
… If you have a large developer organization and a big monorepo and insist on reproducible builds, you just use whatever people around you use most of the time, and cry every time you want to stick a copy of third party software into your monorepo.
Nobody’s ever been happy with build tools ever, usually the combination they use will suck but whatever other stuff they don’t use will be worse, from the individuals perspectives.
Personally, I like Bazel for monorepos (/me ducks).