# Cogito: split Makefile targets of Cogito/git

5 messages from 2005-06-11 to 2005-06-11. Participants: Kay Sievers, Sven Verdoolaege, Petr Baudis, Junio C Hamano.
Thread: https://gitlist.dev/t/912

## Kay Sievers, 2005-06-11 19:50

Subject: Cogito: split Makefile targets of Cogito/git
Message-ID: <20050611195033.GA22713@vrfy.org>
URL: https://gitlist.dev/e/20050611195033.GA22713%40vrfy.org

```
This splits the targets of Cogito/git to be able to call it
independently. This way we can easily make Cogito a separate
package, which just requires git.

Thanks,
Kay


diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -112,9 +112,10 @@ endif
 
 CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
 
-
-all: $(PROG) $(GEN_SCRIPT)
-
+.PHONY: all it cogito
+all: git cogito
+git: $(PROG)
+cogito: $(GEN_SCRIPT)
 
 test-delta: test-delta.c diff-delta.o patch-delta.o
 	$(CC) $(CFLAGS) -o $@ $^
@@ -169,9 +170,16 @@ test: all
 
 sedlibdir=$(shell echo $(libdir) | sed 's/\//\\\//g')
 
-install: $(PROG) $(SCRIPTS) $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT)
+.PHONY: install install-git install-cogito
+install: install-git install-cogito
+
+install-git: $(PROG) $(SCRIPTS)
+	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
+	$(INSTALL) $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
+
+install-cogito: $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT)
 	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
-	$(INSTALL) $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
+	$(INSTALL) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
 	$(INSTALL) -m755 -d $(DESTDIR)$(libdir)
 	$(INSTALL) $(LIB_SCRIPT) $(DESTDIR)$(libdir)
 	cd $(DESTDIR)$(bindir); \

```

## Sven Verdoolaege, 2005-06-11 20:06

Subject: Re: Cogito: split Makefile targets of Cogito/git
Message-ID: <20050611200651.GA12763MdfPADPa@garage.linux.student.kuleuven.ac.be>
URL: https://gitlist.dev/e/20050611200651.GA12763MdfPADPa%40garage.linux.student.kuleuven.ac.be
In-Reply-To: <20050611195033.GA22713@vrfy.org>

```
On Sat, Jun 11, 2005 at 09:50:33PM +0200, Kay Sievers wrote:
> +.PHONY: all it cogito

I suppose this should be

+.PHONY: all git cogito

skimo

```

## Kay Sievers, 2005-06-11 20:19

Subject: Re: Cogito: split Makefile targets of Cogito/git
Message-ID: <20050611201933.GC22991@vrfy.org>
URL: https://gitlist.dev/e/20050611201933.GC22991%40vrfy.org
In-Reply-To: <20050611195033.GA22713@vrfy.org>

```
On Sat, Jun 11, 2005 at 09:50:33PM +0200, Kay Sievers wrote:
> This splits the targets of Cogito/git to be able to call it
> independently. This way we can easily make Cogito a separate
> package, which just requires git.

> +.PHONY: all it cogito

"all it cogito" sounds funny, but is obviously wrong. :)
New patch attached.

Thanks Dave!

Kay


diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -112,9 +112,10 @@ endif
 
 CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)'
 
-
-all: $(PROG) $(GEN_SCRIPT)
-
+.PHONY: all git cogito
+all: git cogito
+git: $(PROG)
+cogito: $(GEN_SCRIPT)
 
 test-delta: test-delta.c diff-delta.o patch-delta.o
 	$(CC) $(CFLAGS) -o $@ $^
@@ -169,9 +170,16 @@ test: all
 
 sedlibdir=$(shell echo $(libdir) | sed 's/\//\\\//g')
 
-install: $(PROG) $(SCRIPTS) $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT)
+.PHONY: install install-git install-cogito
+install: install-git install-cogito
+
+install-git: $(PROG) $(SCRIPTS)
+	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
+	$(INSTALL) $(PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
+
+install-cogito: $(SCRIPT) $(LIB_SCRIPT) $(GEN_SCRIPT)
 	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
-	$(INSTALL) $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
+	$(INSTALL) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
 	$(INSTALL) -m755 -d $(DESTDIR)$(libdir)
 	$(INSTALL) $(LIB_SCRIPT) $(DESTDIR)$(libdir)
 	cd $(DESTDIR)$(bindir); \

```

## Petr Baudis, 2005-06-11 21:11

Subject: Re: Cogito: split Makefile targets of Cogito/git
Message-ID: <20050611211142.GG3193@pasky.ji.cz>
URL: https://gitlist.dev/e/20050611211142.GG3193%40pasky.ji.cz
In-Reply-To: <20050611201933.GC22991@vrfy.org>

```
Dear diary, on Sat, Jun 11, 2005 at 10:19:33PM CEST, I got a letter
where Kay Sievers <kay.sievers@vrfy.org> told me that...
> On Sat, Jun 11, 2005 at 09:50:33PM +0200, Kay Sievers wrote:
> > This splits the targets of Cogito/git to be able to call it
> > independently. This way we can easily make Cogito a separate
> > package, which just requires git.
> 
> > +.PHONY: all it cogito
> 
> "all it cogito" sounds funny, but is obviously wrong. :)
> New patch attached.

Could you please sign off the patch?

Thanks,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
<Espy> be careful, some twit might quote you out of context..

```

## Junio C Hamano, 2005-06-11 22:09

Subject: Re: Cogito: split Makefile targets of Cogito/git
Message-ID: <7vbr6csfzl.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vbr6csfzl.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20050611195033.GA22713@vrfy.org>

```
>>>>> "KS" == Kay Sievers <kay.sievers@vrfy.org> writes:

KS> -
KS> -all: $(PROG) $(GEN_SCRIPT)
KS> -
KS> +.PHONY: all it cogito
KS> +all: git cogito
KS> +git: $(PROG)
KS> +cogito: $(GEN_SCRIPT)
 
(Tongue in cheek)  How about this instead ;^) 

    -
    -all: $(PROG) $(GEN_SCRIPT)
    -
    +.PHONY: all git coo
    +all: git coo
    +git: $(PROG)
    +coo: $(GEN_SCRIPT)



```
