File: rules

package info (click to toggle)
libxml 0.30-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 560 kB
  • ctags: 375
  • sloc: ansic: 3,942; sh: 1,824; makefile: 119
file content (101 lines) | stat: -rwxr-xr-x 2,351 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
#!/usr/bin/make -f

i=$(shell pwd)/debian/tmp
b=$(shell pwd)/debian/build

configure: configure.in
	@echo "--- Making configure script and configuring"
	./autogen.sh --prefix=/usr

Makefile: configure
	@echo "--- Configuring"
	./configure --prefix=/usr

build: configure Makefile build-debstamp
build-debstamp:
	@echo "--- Compiling"
	dh_testdir
	$(MAKE) all
	touch build-debstamp

clean: configure
	@echo "--- Cleaning"
	dh_testdir
	-rm -rf static shared
	-rm -f build-debstamp install-debstamp
	-make distclean
	-rm -f `find . -name "*~"`
	-rm -rf `find . -name "\.deps"`
	-rm -rf `find . -name "\.libs"`
	-rm -rf `find . -name "*\.rej"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -f debian/*substvars

install: build install-debstamp
install-debstamp:
	@echo "--- Installing"
	dh_testdir
	dh_testroot
	dh_clean
	rm -rf $(b)
	$(MAKE) install prefix=$(i)/usr exec_prefix=$(i)/usr
	touch install-debstamp

install-save: install
	rm -rf $(i).saved
	cp -a $(i) $(i).saved

install-saved:
	rm -rf $(i)
	cp -a $(i).saved $(i)
	rm -rf $(b)
	touch install-debstamp

binary-indep: build install

binary-arch: build install \
		libxml0 \
		libxml-dev \

#
# libxml0
#

libxml0: install
	@echo "--- Building: $@"
	dh_installdocs       -p$@ -P$(b)/$@ README NEWS AUTHORS
	dh_installchangelogs -p$@ -P$(b)/$@ ChangeLog
	dh_movefiles         -p$@ -P$(b)/$@
	dh_strip             -p$@ -P$(b)/$@ 
	dh_compress          -p$@ -P$(b)/$@ 
	dh_fixperms          -p$@ -P$(b)/$@ 
	dh_installdeb        -p$@ -P$(b)/$@
	dh_shlibdeps         -p$@ -P$(b)/$@
	dh_gencontrol        -p$@ -P$(b)/$@
	dh_makeshlibs        -p$@ -P$(b)/$@ -V
	dh_md5sums           -p$@ -P$(b)/$@
	dh_builddeb          -p$@ -P$(b)/$@
 
#
# libxml-dev
#

libxml-dev: install
	@echo "--- Building: $@"
	mkdir -p $(b)/$@/usr/doc
	cd $(b)/$@/usr/doc; ln -s libxml0 $@	
	dh_movefiles         -p$@ -P$(b)/$@
	dh_strip             -p$@ -P$(b)/$@ 
	dh_compress          -p$@ -P$(b)/$@ 
	dh_fixperms          -p$@ -P$(b)/$@ 
	dh_installdeb        -p$@ -P$(b)/$@
	dh_shlibdeps         -p$@ -P$(b)/$@
	dh_gencontrol        -p$@ -P$(b)/$@
	dh_makeshlibs        -p$@ -P$(b)/$@ -V
	dh_md5sums           -p$@ -P$(b)/$@
	dh_builddeb          -p$@ -P$(b)/$@

binary: binary-indep binary-arch
.PHONY: binary clean binary-indep binary-arch build install install-save install-saved