[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing the 'make install'-->'make all' dependency

From: Richard Frith-Macdonald
Subject: Re: removing the 'make install'-->'make all' dependency
Date: Tue, 10 Dec 2002 14:25:12 +0000

On Tuesday, December 10, 2002, at 01:34  pm, Alexander Malmberg wrote:

Nicola Pero wrote:


I'm considering removing the dependency of 'make install' from 'make all'.

I understand the reasons to remove this, but personally, I've always
thought that this was a Good Thing (and I've wondered why just about
every other program and library got it wrong :).

I kept quiet, because I'm not sure either way ...

- compiling as superuser usually creates object files which the normal
user has not enough permissions to touch.  Typically, you type 'make
install' as superuser, that compiles a .m file into an .o file and links.
Next time you run 'make' as a normal user though, building will fail
because the normal user can't delete the .o file owned by the superuser!
Annoying, and might be madly confusing for newbies.

Unless I'm mistaken, the user only needs write permission on the
directory the .o file is in to remove it.

I see this as the one big problem with 'make install' invoking 'make all' ... it does
create difficulties for inexperienced users.
Perhaps it could be solved by having the make program drop back to normal
user privilege to do the 'make all' ? I don't know if that's feasible.
Alternatively, is there any possible mechanism whereby the make program
could be made to use su to start up a subshell to do the parts of the installation
requiring privilege?
ie. instead of doing an 'su' then an 'make install', you would type 'make install'
then the make/su program would prompt you for a password as required.

- there is a huge overhead in the development process; when developing,
you usually do:

 <typing typing coding coding>
 su -c 'make install'
 <checking that it works>

Now the fact that 'make install' always runs 'make all' a second time
causes the process to take up something like 50% more time; without the
dependency, a typical build/install session could be much faster.

But you still have all the overhead of having to run su and make twice.
In my setup, I have a group of "trusted" users who can install stuff
(except where it'd affect root), so I only have to run "make install" as
myself to compile and install everything. Keeping root out of the build
process seems like a Good Thing, anyway (especially when hacking
makefiles; safer to catch "mishaps" as a normal user :).

A few observations ...
1. I'm not sure that performance of the install is a big issue as installs are
probably relatively infrequent for most people, and machines just keep
2. I agree that installing as root should be discouraged except where really

So I think that I'm slightly more in favor of the existing setup, but I'm not
overly bothered either way.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]