threads / discuss / 912

Cogito: split Makefile targets of Cogito/git

Subject: Cogito: split Makefile targets of Cogito/git

## tl;dr

5 messages between Jun 11, 2005 and Jun 11, 2005.

replies: 4people: 4as markdown or json

Kay Sievers· Jun 11, 2005, 19:50 UTC · lore

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); \
Kay Sievers· Jun 11, 2005, 20:19 UTC · re: Kay Sievers · lore

Re: Cogito: split Makefile targets of Cogito/git

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· Jun 11, 2005, 21:11 UTC · re: Kay Sievers · lore

Re: Cogito: split Makefile targets of Cogito/git

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...

Show 9 quoted lines
> 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· Jun 11, 2005, 22:09 UTC · re: Kay Sievers · lore

Re: Cogito: split Makefile targets of Cogito/git

>>>>> "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)

← back to recent threads