File: rules

package info (click to toggle)
gpivtools 0.6.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,472 kB
  • ctags: 528
  • sloc: ansic: 6,804; sh: 5,105; perl: 1,035; makefile: 299; python: 207
file content (146 lines) | stat: -rwxr-xr-x 3,545 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
#!/usr/bin/make -f
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)


include /usr/share/dpatch/dpatch.make

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

config-serial.status: 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
	# Add here commands to configure the package.
	-mkdir debian/build-serial
	cd debian/build-serial && \
	../../configure $(CONFIGURE_OPTIONS)


config-mpi.status: 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
	# Add here commands to configure the package.
	-mkdir debian/build-mpi
	cd debian/build-mpi && \
	../../configure $(CONFIGURE_OPTIONS) \
			--enable-mpi


build: build-stamp-serial build-stamp-mpi
build-stamp-serial: config-serial.status
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE) -C debian/build-serial/
	#/usr/bin/docbook-to-man debian/gpivtools.sgml > gpivtools.1

	touch  $@


build-stamp-mpi: config-mpi.status
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE) -C debian/build-mpi/
	#/usr/bin/docbook-to-man debian/gpivtools.sgml > gpivtools.1

	touch  $@


clean: unpatch
	dh_testdir
	dh_testroot
	dh_clean build-stamp* install-stamp*

	# 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
	-rm -rf debian/build-serial
	-rm -rf debian/build-mpi
	-rm -rf debian/tmp debian/tmp-mpi
	-rm -rf debian/gpivtools debian/gpivtools-mpi
	dh_clean


install: build-stamp-serial build-stamp-mpi
install-serial: install-stamp-serial
install-stamp-serial: build-stamp-serial
	dh_testdir
	dh_testroot
#	dh_clean -k
#	dh_installdirs

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

	dh_install --sourcedir=debian/tmp  -pgpivtools
	touch $@


install-mpi: install-stamp-mpi
install-stamp-mpi: build-stamp-mpi
	dh_testdir
	dh_testroot
#	dh_clean -k
#	dh_installdirs

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

	dh_install --sourcedir=debian/tmp-mpi  -pgpivtools-mpi
	touch $@


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

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

binary-common:
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installcron
	dh_installman
	dh_installinfo
	dh_installchangelogs ChangeLog
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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