File: rules

package info (click to toggle)
cxref 1.6e-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,592 kB
  • sloc: ansic: 16,579; yacc: 2,091; sh: 919; lex: 470; perl: 452; makefile: 429; lisp: 256; cpp: 188; python: 80
file content (125 lines) | stat: -rwxr-xr-x 3,213 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
#!/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

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_clean -k
	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

#	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_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_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