git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Move "-include config.mak" to end of configuration section
@ 2005-11-30 23:23 Timo Hirvonen
  2005-12-01  0:46 ` Johannes Schindelin
  0 siblings, 1 reply; 12+ messages in thread
From: Timo Hirvonen @ 2005-11-30 23:23 UTC (permalink / raw)
  To: git, Junio C Hamano


This makes it possible to define WITH_SEND_EMAIL etc. in config.mak.

---

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

fe5fece83b2ab0d67a4277d851faf50ad944cff4
diff --git a/Makefile b/Makefile
index 984d167..c44f5da 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ RPMBUILD = rpmbuild
 # explicitly what architecture to check for. Fix this up for yours..
 SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
 
-
+-include config.mak
 
 ### --- END CONFIGURATION SECTION ---
 
@@ -254,8 +254,6 @@ ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 endif
 
--include config.mak
-
 ifndef NO_CURL
 	ifdef CURLDIR
 		# This is still problematic -- gcc does not always want -R.
-- 
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move "-include config.mak" to end of configuration section
  2005-11-30 23:23 [PATCH] Move "-include config.mak" to end of configuration section Timo Hirvonen
@ 2005-12-01  0:46 ` Johannes Schindelin
  2005-12-01  1:32   ` [PATCH] Move couple of ifdefs after "include config.mk" Timo Hirvonen
  0 siblings, 1 reply; 12+ messages in thread
From: Johannes Schindelin @ 2005-12-01  0:46 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: git, Junio C Hamano

Hi,

On Thu, 1 Dec 2005, Timo Hirvonen wrote:

> This makes it possible to define WITH_SEND_EMAIL etc. in config.mak.

... but it breaks setups where config.mak overrides platform 
dependent settings...

Hth,
Dscho

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  0:46 ` Johannes Schindelin
@ 2005-12-01  1:32   ` Timo Hirvonen
  2005-12-01  1:43     ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Timo Hirvonen @ 2005-12-01  1:32 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, junkio


This makes it possible to define WITH_SEND_EMAIL etc. in config.mak.

Also remove GIT_LIST_TWEAK because it isn't used anymore.

---

 Makefile |   28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)

f877acdc3f8c888dd82a1e81ce20c8715e3108e4
diff --git a/Makefile b/Makefile
index 984d167..00521fe 100644
--- a/Makefile
+++ b/Makefile
@@ -138,8 +138,6 @@ ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROG
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
 
-GIT_LIST_TWEAK =
-
 # Set paths to tools early so that they can be used for version tests.
 ifndef SHELL_PATH
 	SHELL_PATH = /bin/sh
@@ -154,20 +152,6 @@ endif
 PYMODULES = \
 	gitMergeCommon.py
 
-ifdef WITH_OWN_SUBPROCESS_PY
-	PYMODULES += compat/subprocess.py
-else
-	ifneq ($(shell $(PYTHON_PATH) -c 'import subprocess;print"OK"' 2>/dev/null),OK)
-		PYMODULES += compat/subprocess.py
-	endif
-endif
-
-ifdef WITH_SEND_EMAIL
-	SCRIPT_PERL += git-send-email.perl
-else
-	GIT_LIST_TWEAK += -e '/^send-email$$/d'
-endif
-
 LIB_FILE=libgit.a
 
 LIB_H = \
@@ -256,6 +240,18 @@ endif
 
 -include config.mak
 
+ifdef WITH_OWN_SUBPROCESS_PY
+	PYMODULES += compat/subprocess.py
+else
+	ifneq ($(shell $(PYTHON_PATH) -c 'import subprocess;print"OK"' 2>/dev/null),OK)
+		PYMODULES += compat/subprocess.py
+	endif
+endif
+
+ifdef WITH_SEND_EMAIL
+	SCRIPT_PERL += git-send-email.perl
+endif
+
 ifndef NO_CURL
 	ifdef CURLDIR
 		# This is still problematic -- gcc does not always want -R.
-- 
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  1:32   ` [PATCH] Move couple of ifdefs after "include config.mk" Timo Hirvonen
@ 2005-12-01  1:43     ` Junio C Hamano
  2005-12-01  8:08       ` Johannes Schindelin
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2005-12-01  1:43 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: git

Honestly speaking, I'd personally prefer to just get rid of
"-include config.mak" from Makefile.  If somebody wants to keep
her customized set of configuration, she can have her own ./Make
script that would look like:

	#!/bin/sh
	make WITH_SEND_EMAIL=YesPlesae NO_EXPAT=NoThanks "$@"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  1:43     ` Junio C Hamano
@ 2005-12-01  8:08       ` Johannes Schindelin
  2005-12-01  9:04         ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Johannes Schindelin @ 2005-12-01  8:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Timo Hirvonen, git

Hi,

On Wed, 30 Nov 2005, Junio C Hamano wrote:

> Honestly speaking, I'd personally prefer to just get rid of "-include 
> config.mak" from Makefile.

But it is only one line, heck only 20 bytes!

And you can still use your "./Make" method, and it is not widely 
advertised, and you can override settings from the platform-dependent 
code, and I feel much better at having my littly config.mak, my precious!

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  8:08       ` Johannes Schindelin
@ 2005-12-01  9:04         ` Junio C Hamano
  2005-12-01  9:40           ` Alex Riesen
  2005-12-03  2:31           ` Johannes Schindelin
  0 siblings, 2 replies; 12+ messages in thread
From: Junio C Hamano @ 2005-12-01  9:04 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Timo Hirvonen, git

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

> But it is only one line, heck only 20 bytes!

Hey, don't get so piped up.  Timo's patch has already been
merged (thanks, Timo).

But think about it a bit.

If you need an override, you have to write down and maintain
those YesPlease _somewhere_ yourself anyway, outside what I
ship.  Either "config.mak" or "Make" script.

If we have '-include' in the Makefile, we need to make a
decision if what we are adding to the Makefile should be
overridable by that config.mak every time, exactly because
whatever is included becomes part of the Makefile.  IOW, that
"only 20 bytes" adds work for the Makefile maintainer.

"Make" script method is a command line override to the "make"
program, which takes precedence and does not have that problem.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  9:04         ` Junio C Hamano
@ 2005-12-01  9:40           ` Alex Riesen
  2005-12-01  9:45             ` Junio C Hamano
  2005-12-03  2:31           ` Johannes Schindelin
  1 sibling, 1 reply; 12+ messages in thread
From: Alex Riesen @ 2005-12-01  9:40 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, Timo Hirvonen, git

On 12/1/05, Junio C Hamano <junkio@cox.net> wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > But it is only one line, heck only 20 bytes!
>
> Hey, don't get so piped up.  Timo's patch has already been
> merged (thanks, Timo).
>
> But think about it a bit.
>
> If you need an override, you have to write down and maintain
> those YesPlease _somewhere_ yourself anyway, outside what I
> ship.  Either "config.mak" or "Make" script.
>
> If we have '-include' in the Makefile, we need to make a
> decision if what we are adding to the Makefile should be
> overridable by that config.mak every time, exactly because
> whatever is included becomes part of the Makefile.  IOW, that
> "only 20 bytes" adds work for the Makefile maintainer.
>
> "Make" script method is a command line override to the "make"
> program, which takes precedence and does not have that problem.
>

I have even my specific targets in the config.mak (and would actually
like to have the default target put before including config.mak, so
default call to make is always the same).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  9:40           ` Alex Riesen
@ 2005-12-01  9:45             ` Junio C Hamano
  2005-12-01  9:53               ` Alex Riesen
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2005-12-01  9:45 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

Alex Riesen <raa.lkml@gmail.com> writes:

> I have even my specific targets in the config.mak (and would actually
> like to have the default target put before including config.mak, so
> default call to make is always the same).

Surely you can do that by having your own "makefile" and include
"Makefile" I ship, and run "make", which prefers makefile over
Makefile ;-).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  9:45             ` Junio C Hamano
@ 2005-12-01  9:53               ` Alex Riesen
  2005-12-01 10:16                 ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Alex Riesen @ 2005-12-01  9:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 12/1/05, Junio C Hamano <junkio@cox.net> wrote:
> > I have even my specific targets in the config.mak (and would actually
> > like to have the default target put before including config.mak, so
> > default call to make is always the same).
>
> Surely you can do that by having your own "makefile" and include
> "Makefile" I ship, and run "make", which prefers makefile over
> Makefile ;-).

But that is not the same:
 - I can put my targets and variables either before or after Makefile,
not somewhere inbetween
 - I have to work on an especially brain-damaged filesystems, like FAT

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  9:53               ` Alex Riesen
@ 2005-12-01 10:16                 ` Junio C Hamano
  2005-12-01 12:51                   ` Alex Riesen
  0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2005-12-01 10:16 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

Alex Riesen <raa.lkml@gmail.com> writes:

> On 12/1/05, Junio C Hamano <junkio@cox.net> wrote:
>> > I have even my specific targets in the config.mak (and would actually
>> > like to have the default target put before including config.mak, so
>> > default call to make is always the same).

Hmph.  Do you mean something like this?

-- >8 --
diff --git a/Makefile b/Makefile
index 00521fe..45db357 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all:
+
 # Define MOZILLA_SHA1 environment variable when running make to make use of
 # a bundled SHA1 routine coming from Mozilla. It is GPL'd and should be fast
 # on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01 10:16                 ` Junio C Hamano
@ 2005-12-01 12:51                   ` Alex Riesen
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Riesen @ 2005-12-01 12:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 12/1/05, Junio C Hamano <junkio@cox.net> wrote:
> Alex Riesen <raa.lkml@gmail.com> writes:
>
> > On 12/1/05, Junio C Hamano <junkio@cox.net> wrote:
> >> > I have even my specific targets in the config.mak (and would actually
> >> > like to have the default target put before including config.mak, so
> >> > default call to make is always the same).
>
> Hmph.  Do you mean something like this?
>
> -- >8 --
> diff --git a/Makefile b/Makefile
> index 00521fe..45db357 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,3 +1,6 @@
> +# The default target of this Makefile is...
> +all:
> +

Yes. In fact, that is what I have in my tree :)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Move couple of ifdefs after "include config.mk"
  2005-12-01  9:04         ` Junio C Hamano
  2005-12-01  9:40           ` Alex Riesen
@ 2005-12-03  2:31           ` Johannes Schindelin
  1 sibling, 0 replies; 12+ messages in thread
From: Johannes Schindelin @ 2005-12-03  2:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Timo Hirvonen, git

Hi,

On Thu, 1 Dec 2005, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > But it is only one line, heck only 20 bytes!
> 
> Hey, don't get so piped up.  Timo's patch has already been
> merged (thanks, Timo).

In case I did not make it clear: I was not mad or something like that. I 
only see 3 ways to go about that particular problem:

- maintain your private config.mak
- maintain your private Make (shell script)
- maintain your private Makefile

I actually did the third way for a while, always merging the newest 
version. But all of a sudden -- when I was working on another project, 
which *has* a config.mak -- I had the idea to do the first way.

Actually, the second way falls a little bit short for some of my 
applications: I sometimes override settings in the first part of the 
Makefile. This is not possible with Make.

> If you need an override, you have to write down and maintain
> those YesPlease _somewhere_ yourself anyway, outside what I
> ship.  Either "config.mak" or "Make" script.

As mentioned, with the difference that you just can't override some things 
in Make.

> If we have '-include' in the Makefile, we need to make a
> decision if what we are adding to the Makefile should be
> overridable by that config.mak every time, exactly because
> whatever is included becomes part of the Makefile.  IOW, that
> "only 20 bytes" adds work for the Makefile maintainer.

... which might have another (desired) effect: the structure of the 
Makefile is better. More organized.

Besides, if you change things in an organized Makefile, you tend to be a 
little bit more careful where you put things, so the cost of maintaining 
is not really high (happened to me...).

Hth,
Dscho

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-12-03  2:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-30 23:23 [PATCH] Move "-include config.mak" to end of configuration section Timo Hirvonen
2005-12-01  0:46 ` Johannes Schindelin
2005-12-01  1:32   ` [PATCH] Move couple of ifdefs after "include config.mk" Timo Hirvonen
2005-12-01  1:43     ` Junio C Hamano
2005-12-01  8:08       ` Johannes Schindelin
2005-12-01  9:04         ` Junio C Hamano
2005-12-01  9:40           ` Alex Riesen
2005-12-01  9:45             ` Junio C Hamano
2005-12-01  9:53               ` Alex Riesen
2005-12-01 10:16                 ` Junio C Hamano
2005-12-01 12:51                   ` Alex Riesen
2005-12-03  2:31           ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).