# Installing without rebuilding

3 messages from 2007-11-11 to 2007-11-12. Participants: Brian Gernhardt, Benoit Sigoure.
Thread: https://gitlist.dev/t/10808

## Brian Gernhardt, 2007-11-11 16:49

Subject: Installing without rebuilding
Message-ID: <8B92E213-17DB-4E83-B045-01CE0E7D26CB@silverinsanity.com>
URL: https://gitlist.dev/e/8B92E213-17DB-4E83-B045-01CE0E7D26CB%40silverinsanity.com

```
Git has a very clever Makefile.  Sometimes its a little overly clever.

1) I use stow to manage my /usr/local directory.  With many other  
programs I am able to build with a prefix of /usr/local and install  
with a prefix of /usr/local/stow/$program.  Git detects a change in  
the build variables and recompiles pretty much everything.

2) If I remove the old copy of git before installing the new, git will  
notice this and again start a (smaller) recompile because the GIT- 
VERSION-FILE file changes from something detailed like  
"1.5.3.5.622.g6fd7a" to "1.5.3.GIT".

Is there a way to tell git to be a bit less clever and just install  
the already compiled program?  If not, would changing the Makefile to  
read something like the following be accepted?

----- 8< -----

install: all install-dumb

install-dumb: # No rebuild!
   # Current install process

----- 8< -----

~~ Brian

```

## Benoit Sigoure, 2007-11-11 16:55

Subject: Re: Installing without rebuilding
Message-ID: <8FE99206-EECF-4081-B4B7-82707FA4E863@lrde.epita.fr>
URL: https://gitlist.dev/e/8FE99206-EECF-4081-B4B7-82707FA4E863%40lrde.epita.fr
In-Reply-To: <8B92E213-17DB-4E83-B045-01CE0E7D26CB@silverinsanity.com>

```
On Nov 11, 2007, at 5:49 PM, Brian Gernhardt wrote:

> Git has a very clever Makefile.  Sometimes its a little overly clever.
>
> 1) I use stow to manage my /usr/local directory.  With many other  
> programs I am able to build with a prefix of /usr/local and install  
> with a prefix of /usr/local/stow/$program.  Git detects a change in  
> the build variables and recompiles pretty much everything.
>
> 2) If I remove the old copy of git before installing the new, git  
> will notice this and again start a (smaller) recompile because the  
> GIT-VERSION-FILE file changes from something detailed like  
> "1.5.3.5.622.g6fd7a" to "1.5.3.GIT".
>
> Is there a way to tell git to be a bit less clever and just install  
> the already compiled program?  If not, would changing the Makefile  
> to read something like the following be accepted?
>
> ----- 8< -----
>
> install: all install-dumb
>
> install-dumb: # No rebuild!
>   # Current install process
>
> ----- 8< -----

I also stow git (which doesn't come with a make uninstall grrrrrr)  
and what I do is that I dropped the dependency of `install' on  
`all'.  Also, I always install the new version before removing (stow - 
D) the previous one.

Cheers,

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory



```

## Brian Gernhardt, 2007-11-12 22:33

Subject: Re: Installing without rebuilding
Message-ID: <FA694907-4845-4102-8A74-F084F88626AE@silverinsanity.com>
URL: https://gitlist.dev/e/FA694907-4845-4102-8A74-F084F88626AE%40silverinsanity.com
In-Reply-To: <8B92E213-17DB-4E83-B045-01CE0E7D26CB@silverinsanity.com>

```

On Nov 11, 2007, at 11:49 AM, Brian Gernhardt wrote:

> Git has a very clever Makefile.  Sometimes its a little overly clever.

I found a way around the Makefile cleverness.  It's ugly, but it  
requires no changes to the existing Makefile.  I'm posting it in case  
anyone finds this thread trying to do what I'm doing.  My nieve  
suggestion fails, BTW, because git-gui's Makefile does the same  
cleverness.

----- 8< -----

# Install ignoring version changes, etc.
ignore="-o GIT-VERSION-FILE -o GIT-CFLAGS -o GIT-GUI-VARS"
install="$ignore prefix=/usr/local/stow/git"
gitgui="$install gitexecdir=/usr/local/bin"
sudo make $install NO_TCLTK=Yes install install-doc
sudo make $gitgui -C git-gui install

----- 8< -----

Why do I have to go through so many hoops just to install what I've  
already compiled?

~~ Brian

```
