git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Re: [PATCH] Fix git.c compilation target

From
Andreas Ericsson <ae@op5.se>
Date
Nov 21, 2005, 23:44 UTC
Message-ID
<43825BCF.8040402@op5.se>
In-Reply-To
<7vlkzhmwq4.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 7 quoted lines
> 
>  - 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
Previous: Junio C HamanoNext: Alex Riesen
Message 4 of 6 in “Fix git.c compilation target”
  1. Fix git.c compilation targetAlex Riesen, Nov 21, 2005
  2. Alex RiesenNov 21, 2005
  3. Junio C HamanoNov 21, 2005
  4. Re: [PATCH] Fix git.c compilation targetAndreas Ericsson, Nov 21, 2005
  5. Alex RiesenNov 22, 2005
  6. Junio C HamanoNov 22, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.