1#!/usr/bin/make -f
2# -*- makefile -*-
3
4# Uncomment this to turn on verbose mode.
5#export DH_VERBOSE=1
6
7CFLAGS = -g -Wall
8ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9 CFLAGS += -O0
10else
11 CFLAGS += -O2
12endif
13export CFLAGS
14
15PREFIX := /usr
16MANDIR := /usr/share/man/
17
18SRC := ./
19DOC := Documentation/
20DESTDIR := $(CURDIR)/debian/tmp
21DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
22MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
23
24build: debian/build-stamp
25debian/build-stamp:
26 dh_testdir
27 $(MAKE) all doc
28 touch debian/build-stamp
29
30debian-clean:
31 dh_testdir
32 dh_testroot
33 rm -f debian/build-stamp
34 dh_clean
35
36clean: debian-clean
37 $(MAKE) clean
38
39install: build
40 dh_testdir
41 dh_testroot
42 dh_clean -k
43 dh_installdirs
44
45 make dest=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) install install-doc
46
47 mkdir -p $(DOC_DESTDIR)
48 find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';'
49
50 dh_install --list-missing --sourcedir=$(DESTDIR)
51
52binary: build install
53 dh_testdir
54 dh_testroot
55 dh_installchangelogs
56 dh_installdocs
57 dh_installexamples
58# dh_installmenu
59# dh_installdebconf
60# dh_installlogrotate
61# dh_installemacsen
62# dh_installpam
63# dh_installmime
64# dh_installinit
65# dh_installcron
66# dh_installinfo
67 dh_installman
68 dh_link
69 dh_strip
70 dh_compress
71 dh_fixperms
72# dh_perl
73# dh_python
74 dh_makeshlibs
75 dh_installdeb
76 dh_shlibdeps
77 dh_gencontrol
78 dh_md5sums
79 dh_builddeb
80
81.PHONY: build clean binary install clean debian-clean