* [PATCH] Include Makefile.localdef in Makefile, if it exists.
@ 2005-12-02 23:11 Jason Riedy
2005-12-03 2:23 ` Johannes Schindelin
0 siblings, 1 reply; 5+ messages in thread
From: Jason Riedy @ 2005-12-02 23:11 UTC (permalink / raw)
To: git
Makefile.localdef is just a hook for local definitions. Users
can track their definitions in a branch and not worry about
merge conflicts.
Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
---
Makefile | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
applies-to: b93e1c78095bf4ace0806ab70295931f6da28174
65e5d3d6d31af3dda6d5cfd4e0745f34118955c3
diff --git a/Makefile b/Makefile
index df3c6eb..dc7581d 100644
--- a/Makefile
+++ b/Makefile
@@ -64,18 +64,21 @@ LDFLAGS =
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
-prefix = $(HOME)
-bindir = $(prefix)/bin
-template_dir = $(prefix)/share/git-core/templates/
-GIT_PYTHON_DIR = $(prefix)/share/git-core/python
-# DESTDIR=
-
CC = gcc
AR = ar
TAR = tar
INSTALL = install
RPMBUILD = rpmbuild
+# Include local definitions, if any.
+-include Makefile.localdef
+
+prefix ?= $(HOME)
+bindir ?= $(prefix)/bin
+template_dir ?= $(prefix)/share/git-core/templates/
+GIT_PYTHON_DIR ?= $(prefix)/share/git-core/python
+# DESTDIR=
+
# sparse is architecture-neutral, which means that we need to tell it
# explicitly what architecture to check for. Fix this up for yours..
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
---
0.99.9h
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Include Makefile.localdef in Makefile, if it exists.
2005-12-02 23:11 [PATCH] Include Makefile.localdef in Makefile, if it exists Jason Riedy
@ 2005-12-03 2:23 ` Johannes Schindelin
2005-12-03 6:35 ` Jason Riedy
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2005-12-03 2:23 UTC (permalink / raw)
To: Jason Riedy; +Cc: git
Hi,
On Fri, 2 Dec 2005, Jason Riedy wrote:
> Makefile.localdef is just a hook for local definitions. Users
> can track their definitions in a branch and not worry about
> merge conflicts.
I wonder why you do not just override them in config.mak, which was
introduced just for that purpose...
Hth,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include Makefile.localdef in Makefile, if it exists.
2005-12-03 2:23 ` Johannes Schindelin
@ 2005-12-03 6:35 ` Jason Riedy
2005-12-03 10:45 ` Johannes Schindelin
2005-12-03 19:14 ` Junio C Hamano
0 siblings, 2 replies; 5+ messages in thread
From: Jason Riedy @ 2005-12-03 6:35 UTC (permalink / raw)
To: git
And Johannes Schindelin writes:
- I wonder why you do not just override them in config.mak, which was
- introduced just for that purpose...
'Cause I'm a git and didn't notice it, thanks. The prefix stuff
probably ought to be moved below the -include config.mak so
someone need only change $(prefix) and not the rest. I might
send along such a patch, along with a note about config.mak in
INSTALL...
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include Makefile.localdef in Makefile, if it exists.
2005-12-03 6:35 ` Jason Riedy
@ 2005-12-03 10:45 ` Johannes Schindelin
2005-12-03 19:14 ` Junio C Hamano
1 sibling, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2005-12-03 10:45 UTC (permalink / raw)
To: Jason Riedy; +Cc: git
Hi,
On Fri, 2 Dec 2005, Jason Riedy wrote:
> And Johannes Schindelin writes:
> - I wonder why you do not just override them in config.mak, which was
> - introduced just for that purpose...
>
> 'Cause I'm a git and didn't notice it, thanks.
Nopraw.
> The prefix stuff probably ought to be moved below the -include
> config.mak so someone need only change $(prefix) and not the rest. I
> might send along such a patch, along with a note about config.mak in
> INSTALL...
Actually, it is a feature that you can override prefix and template_dir
independently.
Hth,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Include Makefile.localdef in Makefile, if it exists.
2005-12-03 6:35 ` Jason Riedy
2005-12-03 10:45 ` Johannes Schindelin
@ 2005-12-03 19:14 ` Junio C Hamano
1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2005-12-03 19:14 UTC (permalink / raw)
To: Jason Riedy; +Cc: git
Jason Riedy <ejr@EECS.Berkeley.EDU> writes:
> ... I might
> send along such a patch, along with a note about config.mak in
> INSTALL...
Please don't, unless you are confident your change can satisfy
_everybody_.
People with makefile needs that are more "advanced" (that is,
something a simple "-include config.mak" cannot easily satisfy)
can do any number of things without touching Makefile I ship.
Examples include:
- have own makefile, include Makefile.
- have onw Make script, run "make -f Makefile" with preset
"bindir=HERE NO_XXX=NoThanks" to reduce typing.
- have own makefile, whose build target depends on Make.file
and runs "make -f Make.file", with a build rule for Make.file
to munge Makefile using custom perl/sed into it.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-12-03 19:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02 23:11 [PATCH] Include Makefile.localdef in Makefile, if it exists Jason Riedy
2005-12-03 2:23 ` Johannes Schindelin
2005-12-03 6:35 ` Jason Riedy
2005-12-03 10:45 ` Johannes Schindelin
2005-12-03 19:14 ` Junio C Hamano
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).