File: rules

package info (click to toggle)
libgpiv 0.6.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,804 kB
  • ctags: 1,098
  • sloc: ansic: 17,801; sh: 9,152; makefile: 266
file content (230 lines) | stat: -rwxr-xr-x 6,147 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

include /usr/share/dpatch/dpatch.make

# This is the debhelper compatibility version to use.
#export DH_COMPAT=5

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


CONFIGURE_OPTIONS=      --host=$(DEB_HOST_GNU_TYPE) \
		    	--build=$(DEB_BUILD_GNU_TYPE) \
			--prefix=/usr \
			--sysconfdir=/etc \
			--mandir=\$${prefix}/share/man \
			--infodir=\$${prefix}/share/info \
			--enable-omp


configure: configure-serial configure-doc configure-mpi
configure-doc: configure-stamp-doc
configure-serial: configure-stamp-serial
configure-mpi: configure-stamp-mpi


configure-stamp-doc: patch-stamp
	dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif

	#================> Configuring libgpiv3-doc.
	-mkdir debian/build-doc
	cd debian/build-doc && \
	../../configure $(CONFIGURE_OPTIONS)

	touch $@


configure-stamp-serial: patch-stamp
	dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif

	#================> Configuring libgpiv3(-serial).
	-mkdir debian/build-serial
	cd debian/build-serial && \
	../../configure $(CONFIGURE_OPTIONS)

	touch $@


configure-stamp-mpi: patch-stamp
	dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif

	#================> Configuring libgpiv-mpi3.
	-mkdir debian/build-mpi
	cd debian/build-mpi && \
	../../configure $(CONFIGURE_OPTIONS) \
			--enable-mpi

	touch $@



build: build-doc build-serial build-mpi

build-doc: build-stamp-doc
build-stamp-doc: configure-doc
	dh_testdir

	#================> Compiling libgpiv3-doc using Doxygen.
	$(MAKE)  -C debian/build-doc/ doxygen-doc

	touch $@


build-serial: build-stamp-serial
build-stamp-serial:  configure-serial
	dh_testdir

	#================> Compiling libgpiv3(-serial).
	$(MAKE)  -C debian/build-serial/

	touch $@


build-mpi: build-stamp-mpi
build-stamp-mpi: configure-mpi
	dh_testdir

	#================> Compiling libgpiv-mpi3.
	$(MAKE) -C debian/build-mpi/

	touch $@


clean: unpatch
	#================> Cleaning (after eventual unpatching).
	dh_testdir
	dh_testroot
	dh_clean configure-stamp* build-stamp* install-stamp* patch-stamp* \
	debian/*.shlibs
	rm -rf debian/tmp debian/tmp-mpi \
	debian/libgpiv3 debian/libgpiv3-dev debian/libgpiv3-dbg \
	debian/libgpiv-mpi3 debian/libgpiv-mpi3-dbg \
	debian/libgpiv3-doc
	-rm -rf debian/build-doc
	-rm -rf debian/build-serial
	-rm -rf debian/build-mpi

	#================> Add here commands to clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) distclean
	-test -r /usr/share/misc/config.sub && \
	 rm -f config.sub
	-test -r /usr/share/misc/config.guess && \
	 rm -f config.guess

	dh_clean


install: build-doc build-serial build-mpi
install-doc: install-stamp-doc
install-stamp-doc: build-stamp-doc
	#================> Installing libgpiv3-doc into debian/tmp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package libgpiv3-doc into debian/tmp
	install -d $(CURDIR)/debian/tmp
	$(MAKE) -C $(CURDIR)/debian/build-doc/ doxygen-install prefix=$(CURDIR)/debian/tmp/usr \
	sysconfdir=$(CURDIR)/debian/tmp/etc

	install -d $(CURDIR)/debian/tmp/usr/share/doc-base/
	install -m 644 $(CURDIR)/debian/libgpiv3-doc.doc-base \
	$(CURDIR)/debian/tmp/usr/share/doc-base/libgpiv3

	dh_install --sourcedir=debian/tmp -plibgpiv3-doc
	touch $@


install-serial: install-stamp-serial
install-stamp-serial: build-stamp-serial
	#================> Installing libgpiv3 into debian/tmp
	dh_testdir
	dh_testroot
#	dh_clean -k
#	dh_installdirs

	# Add here commands to install the package libgpiv3(-common) into debian/tmp
	install -d $(CURDIR)/debian/tmp
	$(MAKE) -C $(CURDIR)/debian/build-serial/ install prefix=$(CURDIR)/debian/tmp/usr \
	sysconfdir=$(CURDIR)/debian/tmp/etc

	dh_install --sourcedir=debian/tmp  -plibgpiv3 -plibgpiv3-dev
	dh_install --sourcedir=debian/tmp  -plibgpiv3-common
	touch $@


install-mpi: install-stamp-mpi
install-stamp-mpi: build-stamp-mpi
	#================> Installing libgpiv-mpi3 into debian/tmp-mpi
	dh_testdir
	dh_testroot
#	dh_clean -k --exclude=debian/tmp
#	dh_installdirs

	# Add here commands to install the package libgpiv-mpi3 into debian/tmp-mpi
	install -d $(CURDIR)/debian/tmp-mpi
	$(MAKE) -C $(CURDIR)/debian/build-mpi/ install prefix=$(CURDIR)/debian/tmp-mpi/usr \
	sysconfdir=$(CURDIR)/debian/tmp-mpi/etc

	dh_install --sourcedir=debian/tmp-mpi  -plibgpiv-mpi3 -plibgpiv3-dev
	touch $@


# Build architecture-independent files here.
binary-indep: build-doc install-doc
	#================> building DEB of libgpiv3-doc.
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture-dependent files here.
	#================> building DEB of libgpiv3(-serial) and -mpi.
binary-arch: build install-serial install-mpi
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

binary-common:
	dh_testdir
	dh_testroot
	dh_installdebconf	
	dh_installdocs
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip --dbg-package=libgpiv3-dbg 
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


binary: binary-indep binary-arch
.PHONY: build build-doc build-serial build-mpi clean binary-indep binary-arch binary binary-serial binary-mpi libgpiv-mpi3 install install-doc install-stamp-doc install-serial install-stamp-serial install-mpi install-stamp-mpi