Build Systems

From bootstrapping
Jump to: navigation, search

GNU Make[edit]

GNU Make is usually built with make, but it actually provides a shell script that breaks the loop!

> If you need to build GNU Make and have no other `make' program to use, > you can use the shell script `build.sh' instead. To do this, first run > `configure' as described in INSTALL. Then, instead of typing `make' to > build the program, type `sh build.sh'. This should compile the program > in the current directory. Then you will have a Make program that you can > use for `./make install', or whatever else.

> As you see, you are not in the vicious circle.

Meson and Ninja[edit]

Meson is a build system intended to replace ./configure and Make.

It depends on Ninja (another more primitive build system) and is implemented in Python. Python may switch to Meson in the future. In that case there would be a bootstrapping loop, but maybe it's a non issue if ninja files are provided.

> Ninja is used to build Google Chrome, parts of Android, LLVM, and can be used in many other projects due to CMake's Ninja backend.

Fortunately because samurai exists and can be built with C and Make; as long as Python core developers refrain from abusing recursive definitions the ninja bootstrap should avoid becoming a loop.

fac[edit]

> Fac uses the ptrace system call to track all system calls that a build rule uses. It recognizes those calls that read or write to files or directories.

Could a tool like fac be used in general to break build system bootstrap loops?

Yes in theory but thankfully Gnu Make does a good enough job this isn't actually required.

http://physics.oregonstate.edu/~roundyd/fac/