Adam
Adam

Reputation: 36743

Where did the first make binary come from?

I'm having to build gnu make from source for reasons too complicated to explain here.

I noticed to build it I require the make command itself, in the traditional fashion:

./configure
make install

So what if I didn't have the make binary already? Where did the first ever make binary come from?

Upvotes: 7

Views: 283

Answers (6)

Eric Melski
Eric Melski

Reputation: 16830

If you're building GNU make, have a look at build.sh in the source tree after running configure:

# Shell script to build GNU Make in the absence of any `make' program.
# build.sh.  Generated from build.sh.in by configure.

Upvotes: 1

Jonathan Leffler
Jonathan Leffler

Reputation: 754860

Stuart Feldman, then at AT&T, wrote the source code for make around the time of 7th Edition UNIX™, and used manual compilation (or maybe a shell script) until make was working well enough to be used to build itself. You can find the UNIX Programmer's Manual for 7th Edition online, and in particular, the original paper describing the original version of make, dated August 1978.

Upvotes: 3

Will Hartung
Will Hartung

Reputation: 118784

From the same place the first gcc binary came from.

The first make was created probably using a shell script to do the build. After that, make would "make" itself.

It's a notable achievement in systems development when the platform becomes "self-hosting". That is the platform can build itself.

Things like "make make" and "gcc gcc.c".

Many language writers will create their language in another language (say, C) and when they have moved it far enough along, they will use that original bootstrap compiler to write a new compiler in the original language. Finally, they discard the original.

Back in the day, a friend was working on a debugger for OS/2, notable for being a multi-tasking operating system at the time. And he would regale about the times when they would be debugging the debugger, and find a bug. So, they would debug the debugger debugging the debugger. It's a novel concept and goes to the heart of computing and abstraction.

Inevitably, it all boils back to when someone keyed in something through a hardwire key pad or some other switches to get an initial program loaded. Then they leveraged that program to do other work, and it all just grows from there.

Upvotes: 4

Kendall Frey
Kendall Frey

Reputation: 44374

The essence of make is that it is a simplified way of running some commands.

To make the first make, the author had to manually act as make, and run gcc or whatever toolset was available, rather than having it run automatically.

Upvotes: 0

Guffa
Guffa

Reputation: 700720

Compiling C programs is not the only way to produce an executable file. The first make executable (or more notably the C compiler itself) could for example be an assembly program, or it could be hand coded in machine code. It could also be cross compiled on a completely different system.

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799250

make is just one convenience tool. It is still possible to invoke cc, ld, etc. manually or via other scripting tools.

Upvotes: 2

Related Questions