git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix git.c compilation target
@ 2005-11-21  8:10 Alex Riesen
  2005-11-21  9:24 ` Alex Riesen
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2005-11-21  8:10 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]

The target for "git" was missing $(X), strangely essential for some
exotic platform.

Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>

[-- Attachment #2: 0001-fix-compilation-of-git-.exe.txt --]
[-- Type: text/plain, Size: 990 bytes --]

Subject: [PATCH] fix compilation of git(.exe)
(cherry picked from b0911b2af7c52639a2c6ae8f038ba5753f886a28 commit)

Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>


---

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

applies-to: e12ceef6841365e64bb765294235a67e9263d7de
2323c0467c437c337c0ad59e9660ccea920ff866
diff --git a/Makefile b/Makefile
index 092931a..65b948b 100644
--- a/Makefile
+++ b/Makefile
@@ -342,15 +342,15 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)
 export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
 ### Build rules
 
-all: $(PROGRAMS) $(SCRIPTS) git
+all: $(PROGRAMS) $(SCRIPTS) git$(X)
 
 all:
 	$(MAKE) -C templates
 
 # Only use $(CFLAGS). We don't need anything else.
-git: git.c Makefile
+git$(X): git.c Makefile
 	$(CC) -DGIT_EXEC_PATH='"$(bindir)"' -DGIT_VERSION='"$(GIT_VERSION)"' \
-		$(CFLAGS) $@.c -o $@
+		$(CFLAGS) $< -o $@
 
 $(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh
 	rm -f $@
---
0.99.9.GIT

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

* Re: [PATCH] Fix git.c compilation target
  2005-11-21  8:10 [PATCH] Fix git.c compilation target Alex Riesen
@ 2005-11-21  9:24 ` Alex Riesen
  2005-11-21 23:01   ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2005-11-21  9:24 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

There was more to it.
The patch removes a reference to git.sh from Makefile and installs
_all_ programs and scripts.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

[-- Attachment #2: 0002-forget-git.sh-and-install-all-programs-and-scripts.txt --]
[-- Type: text/plain, Size: 1267 bytes --]

Subject: [PATCH] forget git.sh and install all programs and scripts

Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>


---

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

applies-to: 0d9013b9e1804aa68afbc6328d9cf93f36a6bebe
c32490dd373e0fb8b963aa0d2aa31f8a209e09b1
diff --git a/Makefile b/Makefile
index 65b948b..f6f4b87 100644
--- a/Makefile
+++ b/Makefile
@@ -352,7 +352,7 @@ git$(X): git.c Makefile
 	$(CC) -DGIT_EXEC_PATH='"$(bindir)"' -DGIT_VERSION='"$(GIT_VERSION)"' \
 		$(CFLAGS) $< -o $@
 
-$(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh
+$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 	rm -f $@
 	sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
@@ -436,9 +436,9 @@ check:
 
 ### Installation rules
 
-install: $(PROGRAMS) $(SCRIPTS) git
+install: $(PROGRAMS) $(SCRIPTS) git$(X)
 	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))
-	$(INSTALL) git $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir))
+	$(INSTALL) $+ $(call shellquote,$(DESTDIR)$(bindir))
 	$(MAKE) -C templates install
 	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
 	$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
---
0.99.9.GIT

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

* Re: [PATCH] Fix git.c compilation target
  2005-11-21  9:24 ` Alex Riesen
@ 2005-11-21 23:01   ` Junio C Hamano
  2005-11-21 23:44     ` [PATCH] " Andreas Ericsson
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-11-21 23:01 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

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

> There was more to it.
> The patch removes a reference to git.sh from Makefile and installs
> _all_ programs and scripts.
>

Thanks; the filter-out should go, but I am wondering if it makes
more sense to:

 - make git$(X) part of PROGRAMS (probably it is a
   SIMPLE_PROGRAM that does not link with many extra stuff, or a
   class on its own);

 - have "install" target depend on "all".

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

* [PATCH] Re: [PATCH] Fix git.c compilation target
  2005-11-21 23:01   ` Junio C Hamano
@ 2005-11-21 23:44     ` Andreas Ericsson
  2005-11-22  7:47       ` Alex Riesen
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Ericsson @ 2005-11-21 23:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Alex Riesen, git

Junio C Hamano wrote:
> 
>  - make git$(X) part of PROGRAMS (probably it is a
>    SIMPLE_PROGRAM that does not link with many extra stuff, or a
>    class on its own);
> 
>  - have "install" target depend on "all".
> 

Something like this?

##########
Introduce $(ALL_PROGRAMS) for 'all:' and 'install:' to operate on.

Remove $(SIMPLE_PROGRAMS) from $(PROGRAMS) so buildrules don't have
to be overridden.

Put $(SCRIPTS) with the other target-macros so it doesn't get lonely.

Signed-off-by: Andreas Ericsson <ae@op5.se>

---

  Makefile |   22 ++++++++++++----------
  1 files changed, 12 insertions(+), 10 deletions(-)

applies-to: 339319e60db7b3f96f8c711407b135a54da7aa2e
bf68baa57babbff57761a802fde801e71e85807e
diff --git a/Makefile b/Makefile
index d6dad19..0e2f65d 100644
--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,11 @@ SCRIPT_PERL = \
  SCRIPT_PYTHON = \
  	git-merge-recursive.py

+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
+	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
+	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
+	  gitk git-cherry-pick
+
  # The ones that do not have to link with lcrypto nor lz.
  SIMPLE_PROGRAMS = \
  	git-get-tar-commit-id$X git-mailinfo$X git-mailsplit$X \
@@ -125,8 +130,10 @@ PROGRAMS = \
  	git-unpack-objects$X git-update-index$X git-update-server-info$X \
  	git-upload-pack$X git-verify-pack$X git-write-tree$X \
  	git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
-	git-name-rev$X git-pack-redundant$X git-config-set$X git-var$X \
-	$(SIMPLE_PROGRAMS)
+	git-name-rev$X git-pack-redundant$X git-config-set$X git-var$X
+
+# what 'all' will build and 'install' will install.
+ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) git$X

  # Backward compatibility -- to be removed after 1.0
  PROGRAMS += git-ssh-pull$X git-ssh-push$X
@@ -339,15 +346,10 @@ endif

  ALL_CFLAGS += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER))

-SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
-	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
-	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
-	  gitk git-cherry-pick
-
  export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
  ### Build rules

-all: $(PROGRAMS) $(SCRIPTS) git
+all: $(ALL_PROGRAMS)

  all:
  	$(MAKE) -C templates
@@ -441,9 +443,9 @@ check:

  ### Installation rules

-install: $(PROGRAMS) $(SCRIPTS) git
+install: all
  	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))
-	$(INSTALL) git $(PROGRAMS) $(SCRIPTS) $(call 
shellquote,$(DESTDIR)$(bindir))
+	$(INSTALL) $(ALL_PROGRAMS) $(call shellquote,$(DESTDIR)$(bindir))
  	$(MAKE) -C templates install
  	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
  	$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
---
0.99.9.GIT

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

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

* Re: [PATCH] Re: [PATCH] Fix git.c compilation target
  2005-11-21 23:44     ` [PATCH] " Andreas Ericsson
@ 2005-11-22  7:47       ` Alex Riesen
  2005-11-22  8:08         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Riesen @ 2005-11-22  7:47 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: Junio C Hamano, git

On 11/22/05, Andreas Ericsson <ae@op5.se> wrote:
> >  - make git$(X) part of PROGRAMS (probably it is a
> >    SIMPLE_PROGRAM that does not link with many extra stuff, or a
> >    class on its own);
> >
> >  - have "install" target depend on "all".
> >
>
> Something like this?
>
> ##########
> Introduce $(ALL_PROGRAMS) for 'all:' and 'install:' to operate on.
>

Yes, that's what I _actually_ mean :)

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

* Re: [PATCH] Re: [PATCH] Fix git.c compilation target
  2005-11-22  7:47       ` Alex Riesen
@ 2005-11-22  8:08         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2005-11-22  8:08 UTC (permalink / raw)
  To: Alex Riesen, Andreas Ericsson; +Cc: git

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

> On 11/22/05, Andreas Ericsson <ae@op5.se> wrote:
>> >  - make git$(X) part of PROGRAMS (probably it is a
>> >    SIMPLE_PROGRAM that does not link with many extra stuff, or a
>> >    class on its own);
>> >
>> >  - have "install" target depend on "all".
>> >
>>
>> Something like this?
>>
>> ##########
>> Introduce $(ALL_PROGRAMS) for 'all:' and 'install:' to operate on.
>
> Yes, that's what I _actually_ mean :)

Thanks, both.  Applied with minor clean-ups for the "clean"
target on top (forgot to remove SIMPLE_PROGRAM), and will push
out.

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

end of thread, other threads:[~2005-11-22  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21  8:10 [PATCH] Fix git.c compilation target Alex Riesen
2005-11-21  9:24 ` Alex Riesen
2005-11-21 23:01   ` Junio C Hamano
2005-11-21 23:44     ` [PATCH] " Andreas Ericsson
2005-11-22  7:47       ` Alex Riesen
2005-11-22  8:08         ` 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).