| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
debian-tmp := $(CURDIR)/debian/id-utils |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 17 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 18 |
|
| 19 |
confflags := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNUn_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --datadir=/usr/share/misc CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" |
| 20 |
|
| 21 |
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) |
| 22 |
confflags += --disable-silent-rules |
| 23 |
endif |
| 24 |
|
| 25 |
include /usr/share/dpkg/buildflags.mk |
| 26 |
|
| 27 |
CFLAGS += -Wall -g |
| 28 |
|
| 29 |
config.status: configure |
| 30 |
dh_update_autotools_config |
| 31 |
dh_testdir |
| 32 |
|
| 33 |
EMACS=no ./configure $(confflags) |
| 34 |
|
| 35 |
build: build-indep build-arch |
| 36 |
|
| 37 |
build-indep: |
| 38 |
|
| 39 |
build-arch: build-stamp |
| 40 |
|
| 41 |
build-stamp: config.status |
| 42 |
dh_testdir |
| 43 |
|
| 44 |
|
| 45 |
$(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" |
| 46 |
|
| 47 |
touch $@ |
| 48 |
|
| 49 |
clean: |
| 50 |
dh_testdir |
| 51 |
dh_testroot |
| 52 |
rm -f build-stamp |
| 53 |
|
| 54 |
rm -f man/*.1 doc/idutils.info doc/stamp-vti doc/version.texi |
| 55 |
|
| 56 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 57 |
|
| 58 |
dh_clean |
| 59 |
|
| 60 |
install: build |
| 61 |
dh_testdir |
| 62 |
dh_testroot |
| 63 |
dh_prep |
| 64 |
dh_installdirs |
| 65 |
|
| 66 |
|
| 67 |
$(MAKE) DESTDIR=$(debian-tmp) install |
| 68 |
find $(debian-tmp) -type d -empty -delete |
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
binary-indep: build install |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
binary-arch: build install |
| 77 |
dh_testdir |
| 78 |
dh_testroot |
| 79 |
dh_installchangelogs ChangeLog |
| 80 |
dh_installdocs |
| 81 |
install -D -m 644 lisp/idutils.el $(debian-tmp)/usr/share/emacs/site-lisp/id-utils.el |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/defid.1.gz |
| 86 |
dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/eid.1.gz |
| 87 |
dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/aid.1.gz |
| 88 |
dh_link usr/share/man/man1/lid.1.gz usr/share/man/man1/gid.1.gz |
| 89 |
help2man -i debian/seealso -N -n "Build an identifier database" $(debian-tmp)/usr/bin/mkid > $(debian-tmp)/usr/share/man/man1/mkid.1 |
| 90 |
help2man -i debian/seealso -N -n "Query ID database and report results" $(debian-tmp)/usr/bin/lid > $(debian-tmp)/usr/share/man/man1/lid.1 |
| 91 |
help2man -i debian/seealso -N -n "List identifiers that occur in FILENAME" $(debian-tmp)/usr/bin/fid > $(debian-tmp)/usr/share/man/man1/fid.1 |
| 92 |
help2man -i debian/seealso -N -n "Print constituent file names that match PATTERN" $(debian-tmp)/usr/bin/fnid > $(debian-tmp)/usr/share/man/man1/fnid.1 |
| 93 |
help2man -i debian/seealso -N -n "Print all tokens found in a source file" $(debian-tmp)/usr/bin/xtokid > $(debian-tmp)/usr/share/man/man1/xtokid.1 |
| 94 |
|
| 95 |
dh_strip |
| 96 |
dh_compress |
| 97 |
dh_fixperms |
| 98 |
rm -f $(debian-tmp)/usr/share/info/dir.gz |
| 99 |
|
| 100 |
|
| 101 |
dh_installdeb |
| 102 |
dh_shlibdeps |
| 103 |
dh_gencontrol |
| 104 |
dh_md5sums |
| 105 |
dh_builddeb |
| 106 |
|
| 107 |
binary: binary-indep binary-arch |
| 108 |
.PHONY: build clean binary-indep binary-arch binary install |