2 ms·
What if you want to build Python? Oh, that' easy, you unpack the Python sources and start with: ./configure But what is that? It's not written in Python.
by kazinator 11y ago
What if you want to build Python?
Oh, that' easy, you unpack the Python sources and start with:
./configure
But what is that? It's not written in Python. It can't be, because you don't have Python yet. It's a shell script.
It's not a hand-maintained shell script; it's written by expanding Autoconf macros (in the M4 preprocessing language) to shell code: essentially a compiler from another language to shell.
A cleaner language which does the same thing could, in principle, replace Autoconf.
A related use for such a language would be install scripts: perform complex actions to install some software, with minimal dependencies on what is already installed.
- MichaelBurge 11y agoWriting your language's build system in itself shouldn't be any worse than writing your language's compiler in itself. The GHC folks are rewriting their jungle of recursive Makefiles in Shake, a Haskell-based build system. I think you only need the ability to build a cross compiler for this to work.