threads / patch / 2069

patchSupport custom build options in config.mak

Subject: [PATCH] Support custom build options in config.mak

## tl;dr

4 messages between Oct 11, 2005 and Oct 11, 2005. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Johannes Schindelin· Oct 11, 2005, 07:49 UTC · lore

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

Show changes to Makefile +4 −0
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· Oct 11, 2005, 08:07 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Support custom build options in config.mak

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· Oct 11, 2005, 11:08 UTC · re: Junio C Hamano · lore

Re: [PATCH] Support custom build options in config.mak

Hi,
On Tue, 11 Oct 2005, Junio C Hamano wrote:
Show 5 quoted lines
> 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· Oct 11, 2005, 17:18 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Support custom build options in config.mak

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*

← back to recent threads