Hi, please see the notes of my first email, thx.
/holger
make some makefile variables conditional for easy build of .deb. --- commit 5811433ca54eaab5cefe36924154428697e8826e tree 80a4a22022659eb3e0406c6da65a60fee1fbfd4f parent 39b146fbd789ccb685e42f8e0076e3802da22b55 author Holger Eitzenberger <[EMAIL PROTECTED]> Mon, 01 Aug 2005 23:26:25 +0200 committer Holger Eitzenberger <[EMAIL PROTECTED]> Mon, 01 Aug 2005 23:26:25 +0200 Documentation/Makefile | 14 +++++++------- Makefile | 27 +++++++++++---------------- tools/Makefile | 10 +++++----- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -9,11 +9,11 @@ DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) -prefix=$(HOME) -bin=$(prefix)/bin -mandir=$(prefix)/man -man1=$(mandir)/man1 -man7=$(mandir)/man7 +prefix ?= $(HOME) +bin ?= $(prefix)/bin +mandir ?=$(prefix)/man +man1 ?=$(mandir)/man1 +man7 ?=$(mandir)/man7 INSTALL=install @@ -48,13 +48,13 @@ clean: rm -f *.xml *.html *.1 *.7 cg-*.txt cogito.txt %.html : %.txt - asciidoc -b xhtml11 -d manpage -f asciidoc.conf $< + asciidoc -b xhtml -d manpage $< %.1 %.7 : %.xml xmlto man $< %.xml : %.txt - asciidoc -b docbook -d manpage -f asciidoc.conf $< + asciidoc -b docbook -d manpage $< cogito.txt : make-cogito-asciidoc ./make-cogito-asciidoc > $@ diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -29,29 +29,24 @@ # DEFINES += -DUSE_STDEV -CFLAGS?=-g -O2 -CFLAGS+=-Wall $(DEFINES) +CFLAGS ?=-g -O2 +CFLAGS +=-Wall $(DEFINES) # Should be changed to /usr/local -prefix=$(HOME) - -bindir=$(prefix)/bin -libdir=$(prefix)/lib/cogito - -CC?=gcc -AR?=ar -INSTALL?=install +prefix ?= $(HOME) +bindir ?= $(prefix)/bin +libdir ?= $(prefix)/lib/cogito + +CC ?= gcc +AR ?= ar +INSTALL ?= install # 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__ - ### --- END CONFIGURATION SECTION --- - - - SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \ git-pull-script git-tag-script git-resolve-script git-whatchanged \ git-fetch-script git-status-script git-commit-script \ @@ -63,7 +58,7 @@ SCRIPTS=git git-apply-patch-script git-m git-ls-remote-script git-clone-dumb-http git-rename-script \ git-request-pull-script -PROG= git-update-cache git-diff-files git-init-db git-write-tree \ +PROG= git-update-cache git-diff-files git-init-db git-write-tree \ git-read-tree git-commit-tree git-cat-file git-fsck-cache \ git-checkout-cache git-diff-tree git-rev-tree git-ls-files \ git-check-files git-ls-tree git-merge-base git-merge-cache \ @@ -245,7 +240,7 @@ install-cogito: $(SCRIPT) $(LIB_SCRIPT) done install-tools: - $(MAKE) -C tools install + $(MAKE) -C tools install DESTDIR=$(CURDIR)/debian/cogito install-doc: $(MAKE) -C Documentation install diff --git a/tools/Makefile b/tools/Makefile --- a/tools/Makefile +++ b/tools/Makefile @@ -5,9 +5,9 @@ CC=gcc COPTS=-O2 CFLAGS=-g $(COPTS) -Wall INSTALL=install -HOME=$(shell echo $$HOME) -prefix=$(HOME) -bin=$(prefix)/bin + +prefix ?= $(HOME) +bin ?= $(prefix)/bin # dest= PROGRAMS=git-mailsplit git-mailinfo @@ -19,8 +19,8 @@ git-%: %.c all: $(PROGRAMS) install: $(PROGRAMS) $(SCRIPTS) - $(INSTALL) -m755 -d $(dest)$(bin) - $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(dest)$(bin) + $(INSTALL) -m755 -d $(DESTDIR)/$(dest)$(bin) + $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)/$(dest)$(bin) clean: rm -f $(PROGRAMS) *.o