makefile - why "make" before "make install" -
i know process of installing source are.
- ./configure
- make
- 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
- ./configure
- 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
Post a Comment