Dune started as a makefile generator.
I wrote an OCaml program that was generating a Makefile for the Base library about 5 years ago. I then extended it to build more packages and after several months of work it became Jbuilder. It was a standalone tool that could build all Jane Street packages. Jbuilder then became Dune with the help of the community.
The original code of this Makefile generator can be found here. The Dune repository still has a file called gen_rules.ml today.