# Build without BUILT_INS

5 messages from 2012-04-24 to 2012-04-25. Participants: Steven Penny, Junio C Hamano, Andreas Ericsson.
Thread: https://gitlist.dev/t/30317

## Steven Penny, 2012-04-24 02:19

Subject: Build without BUILT_INS
Message-ID: <CAAXzdLVbqp-_9A+BwcOuiHi3A39gAJb7_NqANfhAfuK9-+iZ0g@mail.gmail.com>
URL: https://gitlist.dev/e/CAAXzdLVbqp-_9A%2BBwcOuiHi3A39gAJb7_NqANfhAfuK9-%2BiZ0g%40mail.gmail.com

```
I would like to build Git for Windows without the hard links in libexec/git-core

I tried doing

make install prefix=/c/git BUILT_INS=

and I get this error

install git.exe git-upload-pack.exe git-receive-pack.exe
git-upload-archive.exe git-shell.exe git-cvsserver '/c/git/bin'
install: cannot stat `git-receive-pack.exe': No such file or directory
install: cannot stat `git-upload-archive.exe': No such file or directory
make: *** [install] Error 1

Is there a way to build Git without the built-ins?

Some discussion here

http://github.com/msysgit/git/pull/4

```

## Junio C Hamano, 2012-04-24 02:42

Subject: Re: Build without BUILT_INS
Message-ID: <xmqqmx61hmtu.fsf@junio.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqmx61hmtu.fsf%40junio.mtv.corp.google.com
In-Reply-To: <CAAXzdLVbqp-_9A+BwcOuiHi3A39gAJb7_NqANfhAfuK9-+iZ0g@mail.gmail.com>

```
Steven Penny <svnpenn@gmail.com> writes:

> I would like to build Git for Windows without the hard links in libexec/git-core
>
> I tried doing
>
> make install prefix=/c/git BUILT_INS=
>
> and I get this error

Unsurprising.

What are you trying to do?  Are you trying to build a git that does not
know any of the built-in commands like "checkout", "commit", etc?  Or do
you still want a full-featured git, but because you know the code to
perform "git foo" for any builtin command "foo" is contained in git
executable itself, you want to "rm -f git-foo" from the filesystem?

The latter is a bad idea to begin with, as it will break older scripts
that trust the promise that by having git --exec-path early on the $PATH
older forms "git-foo" will always work.

If you really want to do so, the right way is not by mucking BUILT_INS
to empty.  I do not know how GfW is built, but if it uses our usual
Makefile, find the place where it installs the git-foo forms of links
after it installs the main git executable, and comment it out.

And no, it will *not* be a compilation option, as the resulting
installation will break the age-old promise we made to script writers.

Good luck, and have fun.

```

## Andreas Ericsson, 2012-04-24 08:32

Subject: Re: Build without BUILT_INS
Message-ID: <4F96650E.7040900@op5.se>
URL: https://gitlist.dev/e/4F96650E.7040900%40op5.se
In-Reply-To: <xmqqmx61hmtu.fsf@junio.mtv.corp.google.com>

```
On 04/24/2012 04:42 AM, Junio C Hamano wrote:
> Steven Penny<svnpenn@gmail.com>  writes:
> 
>> I would like to build Git for Windows without the hard links in libexec/git-core
>>
>> I tried doing
>>
>> make install prefix=/c/git BUILT_INS=
>>
>> and I get this error
> 
> Unsurprising.
> 
> What are you trying to do?  Are you trying to build a git that does not
> know any of the built-in commands like "checkout", "commit", etc?  Or do
> you still want a full-featured git, but because you know the code to
> perform "git foo" for any builtin command "foo" is contained in git
> executable itself, you want to "rm -f git-foo" from the filesystem?
> 
> The latter is a bad idea to begin with, as it will break older scripts
> that trust the promise that by having git --exec-path early on the $PATH
> older forms "git-foo" will always work.
> 
> If you really want to do so, the right way is not by mucking BUILT_INS
> to empty.  I do not know how GfW is built, but if it uses our usual
> Makefile, find the place where it installs the git-foo forms of links
> after it installs the main git executable, and comment it out.
> 
> And no, it will *not* be a compilation option, as the resulting
> installation will break the age-old promise we made to script writers.
> 

Otoh, we did warn that we were going to deprecate the 'git-foo' form back
in 2005 when the git wrapper was rewritten in C, so perhaps we should
consider marking it as deprecated now so we can get rid of them altogether
altogether in another seven years. ;)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

```

## Junio C Hamano, 2012-04-24 19:41

Subject: Re: Build without BUILT_INS
Message-ID: <xmqqwr54gbo0.fsf@junio.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqwr54gbo0.fsf%40junio.mtv.corp.google.com
In-Reply-To: <4F96650E.7040900@op5.se>

```
Andreas Ericsson <ae@op5.se> writes:

> On 04/24/2012 04:42 AM, Junio C Hamano wrote:
>>  ...
>> And no, it will *not* be a compilation option, as the resulting
>> installation will break the age-old promise we made to script writers.
>
> Otoh, we did warn that we were going to deprecate the 'git-foo' form back
> in 2005 when the git wrapper was rewritten in C, so perhaps we should
> consider...

We already discussed it and shot it down soon after 1.6.0 fiasco.

    http://thread.gmane.org/gmane.comp.version-control.git/93511

Please do not drag me into that mess again.

```

## Steven Penny, 2012-04-25 03:11

Subject: Re: Build without BUILT_INS
Message-ID: <CAAXzdLXa_s4yDzV4HJk3dV1hYU1cekMXqcvEvoPcDrTm0tAyXQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAAXzdLXa_s4yDzV4HJk3dV1hYU1cekMXqcvEvoPcDrTm0tAyXQ%40mail.gmail.com
In-Reply-To: <xmqqmx61hmtu.fsf@junio.mtv.corp.google.com>

```
Junio C Hamano wrote:
> And no, it will *not* be a compilation option, as the resulting
> installation will break the age-old promise we made to script writers.

A compilation option, does not break any promise to script writers.

The default build still has hard links.

A compilation option, such as "make NO_BUILTINS=1" would merely give
users the choice to build without the hard links; an option they do
_not_ have currently.

Seeing how there already is

NO_GETTEXT
NO_OPENSSL
NO_TCLTK

and so on, I dont see this as being a big issue to add.

```
