# [PATCH] Support custom build options in config.mak

4 messages from 2005-10-11 to 2005-10-11. Participants: Johannes Schindelin, Junio C Hamano, Daniel Barkalow.
Thread: https://gitlist.dev/t/2069

## Johannes Schindelin, 2005-10-11 07:49

Subject: [PATCH] Support custom build options in config.mak
Message-ID: <Pine.LNX.4.63.0510110948170.19774@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0510110948170.19774%40wbgn013.biozentrum.uni-wuerzburg.de

```
With this patch, it is possible to store configuration options like
NO_CURL=YesPlease or NO_OPENSSL=YesPlease into a file named
config.mak, which will be included in the Makefile.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

applies-to: 1abfad3540e705eb33e589a8e8cf2be781c89030
94ca33678ce4f582d9bcbaa7baf9223e026c0b13
diff --git a/Makefile b/Makefile
index ea4332b..4e2fa7e 100644
--- a/Makefile
+++ b/Makefile
@@ -213,6 +213,10 @@ ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 endif
 
+ifneq (,$(wildcard config.mak))
+include config.mak
+endif
+
 ifndef NO_CURL
 	ifdef CURLDIR
 		# This is still problematic -- gcc does not want -R.
---
0.99.8.GIT

```

## Junio C Hamano, 2005-10-11 08:07

Subject: Re: [PATCH] Support custom build options in config.mak
Message-ID: <7vr7astr27.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vr7astr27.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0510110948170.19774@wbgn013.biozentrum.uni-wuerzburg.de>

```
With this patch, you can store the configuration options like
NO_CURL=YesPlease or NO_OPENSSL=YesPlease into a file named
Make, and I typically do this:

    $ ./Make CFLAGS='-O1 -Wal -g' clean test install

My "Make" file looks like this:

    $ cat Make
    #!/bin/sh

    PATH=/usr/bin:/bin
    LANG=C
    LC_CTYPE=C
    export PATH LANG LC_CTYPE

    make bindir=$HOME/bin/Linux \
         PYTHON_PATH=/usr/bin/python2.4 \
         CFLAGS="${CFLAGS-'-O1 -Wall -g'}" \
         WITH_SEND_EMAIL=YesPlease "$@"

Nothing-to-sign-off-by: Junio C Hamano <junkio@cox.net>
---
  0 files changed.

    Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

    > With this patch, it is possible to store configuration options like
    > NO_CURL=YesPlease or NO_OPENSSL=YesPlease into a file named
    > config.mak, which will be included in the Makefile.

    IOW, I'll have to think about its merit ;-)

```

## Johannes Schindelin, 2005-10-11 11:08

Subject: Re: [PATCH] Support custom build options in config.mak
Message-ID: <Pine.LNX.4.63.0510111307410.20527@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0510111307410.20527%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7vr7astr27.fsf@assigned-by-dhcp.cox.net>

```
Hi,

On Tue, 11 Oct 2005, Junio C Hamano wrote:

> With this patch, you can store the configuration options like
> NO_CURL=YesPlease or NO_OPENSSL=YesPlease into a file named
> Make, and I typically do this:
> 
> [...]

:-)

```

## Daniel Barkalow, 2005-10-11 17:18

Subject: Re: [PATCH] Support custom build options in config.mak
Message-ID: <Pine.LNX.4.63.0510111308520.23242@iabervon.org>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0510111308520.23242%40iabervon.org
In-Reply-To: <Pine.LNX.4.63.0510110948170.19774@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Tue, 11 Oct 2005, Johannes Schindelin wrote:

> +ifneq (,$(wildcard config.mak))
> +include config.mak
> +endif
> +

You can just do:

-include config.mak

for the same effect; it includes the file if it exists, and doesn't 
complain if it doesn't exist. (It also means that make has a clearer idea 
of what it's doing, which doesn't matter in this case, but is good in 
general.)

	-Daniel
*This .sig left intentionally blank*

```
