The build system sounds eerily familiar to one I used at a previous job.
There was a "gmake" and "cmake", one of them written in Perl and one written in shell, which wrapped make on a Windows port of the GNU toolchain, and the makefiles were generated (as far as I can tell) using Make as a scripting language. Hard-coded drive letters, company-internal packaging systems, Cygwin mount points, multiple terminal windows, etc. The build system dated back a couple decades and was ported from Unix.
If you tracked down the actual rules that Make executed, you'd find something like this:
$(TARGET_1): $(DEPS_1)
$(RECIPE_1)
Copy/pasted a hundred times.
I have no idea of the actual history for this software. Few teams used it. I can only imagine that it was slowly modified, over decades, by people who did not understand the system that they were modifying. By this point in history computers were plenty fast and had plenty of memory, so I can only imagine how much of a pain it must have been to work with back in the 1990s. During the short time I was there, I managed to reduce the build time by a factor of about 100x, there were so many easy opportunities for improvement. I heard from someone who still works there that my improvements were removed, which doesn't surprise me at all--after all, I wasn't there to support those improvements.
At some point I realized that I was cleaning up bugs introduced by other members of the team, and I was on the losing side. My direct manager had almost zero knowledge of software engineering, as far as I could tell (only seniority & some domain expertise). Some other people on the team were figuring out how to provide proper support, and a couple others were doing stuff with Node.js.