tags:

views:

201

answers:

1

Hello

Most linux apps are compiled with

make
make install clean

As i understood, make takes names of build targets as arguments. so "install" is a target that copies some files and after that "clean" is a target that removes temporary files.

But what target "make" will build if no arguments are specified (first command in my example)?

+6  A: 

By default, it begins by processing the first target that does not begin with a '.', to do that, it may have to process other targets - specifically, ones the first target depends on. The GNU make manual covers all this stuff, and is a suprisingly easy and informative read.

anon
Not the target "all" as previous answer states? :(
Eye of Hell
No, not the target 'all'.
anon
Calling the first target `all` is just a convention.
Tobu
And if i issue "make install" it will only build "install" target. skipping first one is "install" don't depend on it, correct?
Eye of Hell
Correct, but 'install' almost certainly DOES depend on it - 'install' is typically the most dependent rule, because it needs all the exes, libraries etc. Of course, you can also write an 'install' rule that just does a copy.
anon
William Pursell
It's useful to run them separately if you're installing for other users, as you then only need to run the `make install` in sudo, rather than the entire build.
Scott Wales