Subject: make install

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 23 Apr 2002 14:05:12 +0000

On 23 Apr 2002 11:35:14 +0200, Dominik Vogt wrote:
> 
> On Mon, Apr 22, 2002 at 08:56:19PM +0000, Mikhael Goikhman wrote:
> > On 22 Apr 2002 19:10:43 +0200, Dominik Vogt wrote:
> > > 
> > >  1) "make install" does not work from within a running fvwm session
> > >     (at least the last time I tried).  It does not overwrite the
> > >     running executables.
> > 
> > I do "make install" with fvwm running for years. I think the problem was
> > prior to some linux version (2.0.x?), but it just always worked for me.
> > 
> > >  2) It's ten times slower than my custom script that just overwrite
> > >     the executables before restarting.
> > 
> > On my 350MHz. 128Mb machine "make install" after "make" takes 20 seconds,
> > pretty acceptable. But I usually only do "make install" in the fvwm/
> > directory if modules are not changed, this takes one second.
> > 
> > > When I'm hacking away, I easily reinstall and restart fvwm 100
> > > times per day.  With my script, that takes about five to ten
> > > minutes, with "make install" it's one to two hours.
> > 
> > I don't think so. You should do "make" anyway, it consumes all the time.
> > "make install" takes a constant time, 20 seconds on my machine. And if you
> > combine "make; make install" into one "make install" it takes even less.
> 
> You see, the difference is 1 second with my script and 20 seconds
> with make install.  The relation is pushed a bit in favour of make
> install because restarting takes constant time.
> 
> > If you post your script, I can point out many problems with it as
> > compared to "make install".
> 
> I'm fully aware of the many problems of the script.  Usually I
> copy only the executables (and only if they changed).  I didn't
> care to adapt copying of config files, utils and shell scripts for
> a long time.
> 
> > The point is your script to work correctly
> > should reimplement what "make install" does, i.e. be equally slow.
> 
> Sure, it should do that, but I don't need most of the make install
> functionality.  But it would never become as slow because it has
> the paths of the files to install hard coded and doesn't have to
> start make five dozen times in various directories.

Let's analize using facts, not conjectures. :)

  % make clean >/dev/null; time make install >/dev/null
  Stat: User      System  Total time      CPU     Swaps   Page faults
  Time: 396.980   37.170  7:14.38         99.9%   0       636041/486483

  % make clean >/dev/null; time make >/dev/null
  Stat: User      System  Total time      CPU     Swaps   Page faults
  Time: 387.930   32.250  7:00.36         99.9%   0       493534/429114

I have 3 (actually more) cvs trees, in /data/cvs/fvwm/fvwm-2.2.x,
/data/cvs/fvwm/fvwm-2.4.x and /data/cvs/fvwm/fvwm, configured to install
everything to prefix /opt/fvwm-2.2, /opt/fvwm-2.4 and /opt/fvwm.
I have write permissions to all these directories.

Now I do the following:

  % cd /data/cvs/fvwm/fvwm-2.4.x
  % cvs update  # or change sources
  % make install
  % FvwmCommand 'Restart /opt/fvwm-2.4/bin/fvwm -f ...'

  % cd /data/cvs/fvwm/fvwm
  % cvs update  # or change sources
  % make install
  % FvwmCommand 'Restart /opt/fvwm/bin/fvwm -f ...'

This only rebuilds what was changed.
Please explain how your script does the same.

Moreover, I actually restart to /opt/fvwm-2.4/bin/fvwm-themes-start and
/opt/fvwm/bin/fvwm-themes-start; and fvwm-themes expects a full fvwm
installation to work correctly (scripts, modules, data files).

So, it seems you save 10 seconds from several minutes, but lose
some convenience and, that is more important, correctness.

But I will not try to convince you anymore. :)

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 23 Apr 2002 16:52:36 +0200

>   Time: 387.930   32.250  7:00.36         99.9%   0       493534/429114

Well, I'd never call make install to build the sources since I
don't always get them installed and I'd have to take care what
command I actually issue.  Usually I press ctrl-alt-left to get to
the shell from the xemacs window, the 'm' <up> <return>.  That
does not work if there are several commands beginning with 'm'
that I use frequently.  Therefore, I would use make install only
when I want to install the sources, forcing me to traverse through
the make tree once again.

> Please explain how your script does the same.

  $ make

In fvwm (via FvwmButtons action):

  Restart /home/luthien/bin/restartfvwm

In restartfvwm:

  ~/bin/fvwminstall
  exec ~/bin/fvwm2 $*

In fvwminstall:

  rm ~/bin/fvwm2
  cp $SRCDIR/fvwm/fvwm/fvwm2 ~/bin
  (same for all executables, optionally man pages and utils)

> some convenience and, that is more important, correctness.

No, I actually win convenience because fvwm is reinstalled and
restarted in no time at all and I don't have to think about what I
am doing.  I can start thinking if something goes wrong (usually
due to changes in the module interface or the FvwmWindow
structure).  Oh, and don't forget that I can run configure without
any options, no matter what I'm installing.  I agree about the
correctnass, but since this is a problem in a bout one of thousand
installations I can live with that.

Personally, I think "make install" is only good for one time
installations, not for regular work.
 
> But I will not try to convince you anymore. :)

I don't believe a word ;-)

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]