makefile - why "make" before "make install" -


i know process of installing source are.

  1. ./configure
  2. make
  3. make install

but why "make" before "make install", why not "make install"

my understanding far "make" compile source executable file, , "make install" place them executable path folder, right?

maybe didn't make question clear, , sorry it.

say want install executable on machine, can

  1. ./configure
  2. make install

instead of 3 steps shown above.

when run make, you're instructing follow set of build steps particular target. when make called no parameters, runs first target, compiles project. make install maps install target, nothing more copy binaries destinations.

frequently, install target depends upon compilation target, can same results running make install. however, can see @ least 1 reason them in separate steps: privilege separation.

ordinarily, when install software, goes locations ordinary users not have write access (like /usr/bin , /usr/local/bin). often, then, end having run make , sudo make install, install step requires privilege escalation. "good thing™", because allows software compiled normal user (which makes difference projects), limiting scope of potential damage badly-behaving build procedure, , obtains root privileges install step.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -