LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how does a "makefile" relate to the make command? (https://www.linuxquestions.org/questions/linux-newbie-8/how-does-a-makefile-relate-to-the-make-command-135798/)

mjewell 01-17-2004 03:44 PM

how does a "makefile" relate to the make command?
 
I bought this great book by Richard Stallman and Roland McGrath. Its called GNU Make.

The book is over my head, but its fun to try to piece together what they're trying to teach.

There's a lot of emphasis in the book on "makefiles" but whenever I copy (by rote) the make command to compile something, there's no mention of makefiles of any kind.

Can anyone explain on a conceptual and very broad level what a makefile is and what its supposed to do in the context of the make command and the overall filesystem.

I'm not looking for the actual, discursive set of instructions about doing particular tasks. I can imitate those when I read them in the book. I'm hoping for some more basic historical (and yes basic) understanding of the life, the universe and everything with respect to make and makefiles.

Color me newbie. I'm curious.

mjewell 01-17-2004 03:47 PM

PS

PLEASE don't distress about the technical accuracy of your response to my question. I'm more interested in your perceptions and opinions on the subject at hand and hereby disclaim all reliance on any warranty you might make (heh-heh) on behalf of said information, whether express or implied, including the warranty of merchantability or fitness for a particular purpose and resolve to accept said information on an 'as is' basis.

In other words, feel free to riff and rant.

urka58 01-17-2004 06:17 PM

As you are not looking for accurate response I'll try to give you one.
Makefile is generated by the script "configure" used when you compile programs from sources.
With the command "configure" you check first if the required libraries, some time programs, other tools necessary to the program you are going to compile are set up correctly in your system. Then "configure" generates the Makefile according to your system configuration. Makefile is a sort of "to do list" used by the command "make" to correctly compile the program generating the binary files.
The further command "make install" simply copies the file generated from the compilation to the proper destination directories
Not stricly technical but I hpoe this help.
Ciao

mjewell 01-17-2004 08:27 PM

That's fantastic! Thanks so much. That sort of explanation is so much more helpful to me than just the bare commands.

Hope I can return the favor some day.


All times are GMT -5. The time now is 11:59 PM.