File: rules

package info (click to toggle)
cxref 1.6e-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,996 kB
  • sloc: ansic: 16,598; yacc: 2,091; sh: 937; lex: 470; perl: 452; makefile: 433; lisp: 256; cpp: 188; python: 80
file content (137 lines) | stat: -rwxr-xr-x 3,553 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/usr/bin/make -f
# MAde with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

#export DH_COMPAT=3

include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM
export DEB_UPSTREAM_VERSION

VERS:=$(shell cat debian/changelog |grep ^cxref|head -n 1|cut -f2 -d\ |tr -d '()[a-z]')

DPKG_EXPORT_BUILDFLAGS=1

include /usr/share/dpkg/buildflags.mk

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir

	./configure --prefix=/usr --mandir=/usr/share/man --enable-us-paper \
		--datadir=/etc
	$(MAKE) 

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	[ ! -f Makefile ] || $(MAKE) distclean
	-rm -f cxref-inst
	-rm -f *~ \
	README.c.sty README.c.src.html README.c.tex README.c.html README.c.rtf README.c.sgml \
	cxref.function cxref.include cxref.apdx.html cxref.apdx.tex cxref.typedef cxref.variable \
	cxref.aux cxref.dvi cxref.log cxref.toc cxref.html cxref.sty cxref.tex fonts.sty page.sty \
        README_c.tex config.log
	rm -f src/README.man doc/README.dvi doc/FAQ.html
	rm -f cpp/foo.c doc/README.c.html doc/README.c.rtf doc/README.c.sgml doc/README.c.src.html \
		doc/README.ps doc/README_c.tex
	debconf-updatepo
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	rm -f src/README.man
	cp doc/README.man src

	$(MAKE) install DESTDIR=`pwd`/debian/tmp
	$(MAKE) docs DESTDIR=`pwd`/debian/tmp

	mkdir -p debian/tmp/usr/share/cxref
	mv debian/tmp/etc/cxref/cxref-cpp.defines debian/tmp/usr/share/cxref

	mkdir -p debian/tmp/usr/share/emacs/site-lisp/cxref
	cp contrib/*.el debian/tmp/usr/share/emacs/site-lisp/cxref

	mv debian/tmp/usr/bin/cxref-cpp debian/tmp/usr/bin/cxref-cpp.upstream
	cp debian/cxref-cpp.wrap debian/tmp/usr/bin/cxref-cpp
	chmod +x debian/tmp/usr/bin/cxref-cpp

	mkdir -p debian/tmp/usr/lib/emacsen-common/packages/compat
	echo 0 >debian/tmp/usr/lib/emacsen-common/packages/compat/cxref-emacs

#	cat debian/cxref-emacs-pkg.el.in |
#		sed "s,@VERS@,$(VERS),1" >
#		debian/tmp/usr/share/emacs/site-lisp/cxref/cxref-emacs-pkg.el

#	mkdir -p debian/tmp/etc/cxref
#	cp debian/config debian/tmp/etc/cxref
#	chmod 644 debian/tmp/etc/cxref/config

	dh_install

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i
	dh_installexamples -i -Xdoc/COPYING
	dh_installmenu -i
	dh_installemacsen -i
#	dh_elpa -i -v
	dh_installcron -i
	dh_installchangelogs ./ChangeLog -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installmenu -a
	dh_installemacsen -a
#	dh_elpa -a
	dh_installcron -a
	dh_installman -p cxref debian/cxref-cc.1
	dh_installchangelogs ./ChangeLog -a
	dh_installdebconf -a
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary