tags:

views:

126

answers:

7

I see in Linux these things, but what is it?:

./configure  
make  
make install

etc etc.

+2  A: 

make is part of the build system commonly used in unix type systems - binutils.

It looks at make files which hold configuration information and build targets.

Specifically -

  • ./configure - this is a script that sets up the environment for the build
  • make - calls make with the default build target. Normally builds the app.
  • make install - calls make with the install build target. Normally installs the app.
Oded
Why the downvote?
Paul Tomblin
@Paul Tomlin - what are you talking about?
Oded
Oh, I guess it was reversed. You were -1 when I asked that question.
Paul Tomblin
@Paul Tomlin - Oh. Didn't see that :)
Oded
+3  A: 

configure checks if you have all the prerequisites/dependencies to build the software.

make does the actual compilation.

make install installs the software in the correct location.

Lo'oris
+2  A: 

Make takes care of running the (sometimes very complex) set of instructions and commands needed to build source control into a compiled executable or library.

make (software)

make is a utility that automatically builds executable programs and libraries from source code

Kragen
+4  A: 

It is basically a build system.

./configure checks if you have all the required dependencies and creates the Makefile.
make compiles the software using the rules of the Makefile.
make install moves the software to the correct location in the filesystem.

Erik B
It's not "basically" a build system. It _is_ a build system.
Bryan Oakley
+5  A: 

./configure is a program that looks at your system configuration and builds some of the system dependencies for your program. make is a program that looks at your Makefile (which was probably built by configure) and uses the rules in there to build your program. The Makefile can have multiple "targets" which are rule sets to do different things - the default is usually just to compile and link your program. When you say make with no arguments, it runs the default target. When you say make install you're running the install target, which usually installs the binaries or libraries built by the default target in their final locations. clean is another common Makefile target that deletes all the generated files like intermediate object files.

Paul Tomblin
A: 

There is also /clean

Here is a good reference: http://makepp.sourceforge.net/1.19/makepp_tutorial.html

Chace Burke
@Chace Burke: nowhere in the referenced document is "/clean" mentioned. Also, are you saying "/clean" is a command or a make target? Taken literally, it is neither. When giving technical answers you need to be precise.
Bryan Oakley
I apologize for not being more exact. Here is an example of a simple make file that I submitted for a school project that I had to do (as well as some code, which can be ignored)...you can find the example in the file "makefile". As I have authored the makefile, you can then use "/clean" which will remove the object file generated by "/make". This would need updating for more complicated compiling that involves linking object code with the application, but it does illustrate the basic concept of what I was talking about. http://www.download.bigsistechnologies.com/csc22001p1_burke.tar.gz
Chace Burke
What's with the leading slashes on your `/make` and `/clean` ??
reinierpost
my mistake. i was tired and put that in. it is "make" and "make clean".
Chace Burke
A: 

'./configure' is a shell script that is portable across multiple Unix systems (Linux, Solaris, etc.). './configure' does a few things: test the build environment, fix up portability issues, check for other optional software, check for where you want to install the software package, etc. You can find out what kind of options can be configured by './configure --help'. Just invoking './configure' will just configure the package with whatever it considers default. The main output file from running './configure' is usually a file called 'Makefile' which is the combined build/install/uninstall instructions for the software package.

'make' uses the 'Makefile' to build the default target which is usually the entire collection of things that need to be built.

'make install' uses the 'Makefile' to build the 'install' target which installs the software.

ldav1s