File: rules

package info (click to toggle)
gettext 0.19.8.1-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 107,908 kB
  • ctags: 52,827
  • sloc: ansic: 388,188; sh: 51,030; makefile: 8,521; perl: 4,181; lisp: 3,413; yacc: 1,072; cpp: 673; java: 613; cs: 578; sed: 369; objc: 337; awk: 80; tcl: 63; xml: 27; pascal: 11; php: 8
file content (231 lines) | stat: -rwxr-xr-x 8,257 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
231
#!/usr/bin/make -f

package = gettext

export DEB_BUILD_MAINT_OPTIONS = hardening=-format

DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CC = $(DEB_HOST_GNU_TYPE)-gcc
CFLAGS := `dpkg-buildflags --get CFLAGS` -Wall
CXXFLAGS := `dpkg-buildflags --get CXXFLAGS` -Wall
LDFLAGS := `dpkg-buildflags --get LDFLAGS`
CPPFLAGS := `dpkg-buildflags --get CPPFLAGS`

export AM_UPDATE_INFO_DIR = no

# PNET_ARCHS = %alpha%amd64%hppa%i386%ia64%mips%mipsel%powerpc%s390%sparc%
# ifneq (,$(findstring %$(DEB_HOST_ARCH)%,$(PNET_ARCHS)))
#   CSHARP = --enable-csharp=pnet
# endif

# MONO_ARCHS = %amd64%arm%i386%ia64%lpia%powerpc%
# ifneq (,$(findstring %$(DEB_HOST_ARCH)%,$(MONO_ARCHS)))
#   CSHARP = --enable-csharp=mono
# endif

# On emulated m68k and sh4 targets, OpenMP can cause lockups,
# we therefore disable it for the time being.
ifneq (,$(findstring $(DEB_HOST_ARCH), m68k sh4))
  CONF_OPENMP = --disable-openmp
else
  CONF_OPENMP = --enable-openmp
endif

NOJAVA_ARCHS = %none%

build:
	./configure --prefix=/usr --enable-threads $(CSHARP) \
		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
		--disable-native-java CC="$(CC)" CFLAGS="$(CFLAGS)" \
		JAVAC=/usr/lib/jvm/default-java/bin/javac \
		$(CONF_OPENMP) \
		CPPFLAGS="$(CPPFLAGS)" \
		CXXFLAGS="$(CXXFLAGS)" \
		LDFLAGS="$(LDFLAGS)"
	$(MAKE)
	$(MAKE) install DESTDIR=`pwd`/debian/tmp
	touch build

clean:
	rm -f build
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f `find . -name "*~"`
	rm -rf debian/tmp debian/files* core debian/substvars debian/a.out
	dh_clean

binary-arch: build
	debian/rules gettext-base
	debian/rules gettext
	debian/rules libgettextpo0
	debian/rules libasprintf0v5
	debian/rules libgettextpo-dev
	debian/rules libasprintf-dev
	dh_lintian -a
	dh_installdocs -a
	dh_installchangelogs -a
	dh_link -a
	dh_compress -a -X NEWS -X ABOUT-NLS
	dh_fixperms -a
	dh_strip -a
	dh_shlibdeps -a
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: build
	debian/rules gettext-el
	debian/rules gettext-doc
	debian/rules autopoint
	dh_installdocs -i
	dh_installchangelogs -i
	dh_compress -i -X NEWS -X ABOUT-NLS -X examples
	dh_fixperms -i
	dh_strip -i
	dh_shlibdeps -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

gettext-base: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d usr/share/man/man1 usr/bin usr/lib
	cp -p debian/tmp/usr/share/man/man1/gettext.1 \
		debian/$@/usr/share/man/man1
	cp -p debian/tmp/usr/share/man/man1/ngettext.1 \
		debian/$@/usr/share/man/man1
	cp -p debian/tmp/usr/share/man/man1/envsubst.1 \
		debian/$@/usr/share/man/man1
	cp -a debian/tmp/usr/share/man/man3 debian/$@/usr/share/man
	cd debian/$@/usr/share/man/man3 && \
		rm -f dcgettext.3 dcngettext.3 dgettext.3 dngettext.3
	cp -p debian/tmp/usr/bin/gettext debian/$@/usr/bin
	cp -p debian/tmp/usr/bin/ngettext debian/$@/usr/bin
	cp -p debian/tmp/usr/bin/envsubst debian/$@/usr/bin
	cp -p debian/tmp/usr/bin/gettext.sh debian/$@/usr/bin
	cp -a debian/tmp/usr/share/locale debian/$@/usr/share
	if [ -f debian/tmp/usr/lib/GNU.Gettext.dll ]; then \
		cp -p debian/tmp/usr/lib/GNU.Gettext.dll debian/$@/usr/lib; \
	fi
	find debian/$@/usr/share/locale | grep gettext-tools | xargs rm
ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS)))
ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
	install -d debian/$@/usr/share/java
	cp -p debian/tmp/usr/share/gettext/libintl.jar \
		debian/$@/usr/share/java
endif
endif

gettext: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d usr/share/man usr/share/java
	cd debian/$@/usr/share/doc/$@ && ln -s ../../$(package)/ABOUT-NLS
	cp -a debian/tmp/usr/bin debian/$@/usr
	cp -a debian/tmp/usr/lib debian/$@/usr
	cp -a debian/tmp/usr/share/info debian/$@/usr/share
	cp -a debian/tmp/usr/share/aclocal debian/$@/usr/share
	cp -a debian/tmp/usr/share/gettext* debian/$@/usr/share
	rm -f debian/$@/usr/share/gettext/libintl.jar
ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS)))
ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
	mv debian/$@/usr/share/gettext/gettext.jar debian/$@/usr/share/java
endif
endif
	rm -f debian/$@/usr/lib/GNU.Gettext.dll
	cp -a debian/tmp/usr/share/man/man1 debian/$@/usr/share/man
	cp -a debian/tmp/usr/share/locale debian/$@/usr/share
	find debian/$@/usr/share/locale | grep gettext-runtime | xargs rm
	cd debian/$@/usr/bin && rm -f gettext ngettext envsubst gettext.sh
	cd debian/$@/usr/lib && rm -f libasprintf* libgettextpo* *.la
	cd debian/$@/usr/share/man/man1 && \
		rm -f gettext.1 ngettext.1 envsubst.1
	cd debian/$@/usr/lib && chmod 644 libgettextlib* libgettextsrc*
	rm -f debian/$@/usr/bin/autopoint
	rm -f debian/$@/usr/share/man/man1/autopoint.1
	rm -f debian/$@/usr/share/gettext/archive.dir.tar.xz
	rm -f debian/$@/usr/lib/libgettextlib.so
	rm -f debian/$@/usr/lib/libgettextsrc.so

libgettextpo0: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libgettextpo.so.* debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)

libasprintf0v5: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libasprintf.so.* debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)

libgettextpo-dev: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	install -d debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libgettextpo.a debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libgettextpo.so debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	install -d debian/$@/usr/include
	cp -a debian/tmp/usr/include/gettext-po.h debian/$@/usr/include

libasprintf-dev: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	install -d debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libasprintf.a debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	cp -a debian/tmp/usr/lib/libasprintf.so debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
	install -d debian/$@/usr/include
	cp -a debian/tmp/usr/include/autosprintf.h debian/$@/usr/include

gettext-el: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d \
		etc/emacs/site-start.d \
		usr/share/emacs/site-lisp/$(package) \
		usr/lib/emacsen-common/packages/install \
		usr/lib/emacsen-common/packages/remove
	install -m 644 gettext-tools/misc/po-mode.el \
		debian/$@/usr/share/emacs/site-lisp/$(package)
	install -m 644 gettext-tools/misc/po-compat.el \
		debian/$@/usr/share/emacs/site-lisp/$(package)
	cd debian && install -m 755 $@.emacsen-install \
		$@/usr/lib/emacsen-common/packages/install/$@
	cd debian && install -m 755 $@.emacsen-remove \
		$@/usr/lib/emacsen-common/packages/remove/$@
	install -m 644 debian/50gettext.el debian/$@/etc/emacs/site-start.d

gettext-doc: build
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	install -d debian/$@/usr/share/doc-base
	install -m 644 debian/$@.doc-base debian/$@/usr/share/doc-base/$@
	cp -a debian/tmp/usr/share/doc/gettext/* debian/$@/usr/share/doc/$@
	cp -a debian/tmp/usr/share/doc/libasprintf/* debian/$@/usr/share/doc/$@
	rm -f debian/$@/usr/share/doc/$@/javadoc2/package-list
	ln -s $(package)_toc.html debian/$@/usr/share/doc/$@/index.html

autopoint:
	rm -rf debian/$@
	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
	cd debian/$@ && install -d usr/bin usr/share/gettext usr/share/man/man1
	cp -p debian/tmp/usr/bin/autopoint debian/$@/usr/bin
	cp -p debian/tmp/usr/share/gettext/archive.dir.tar.xz \
		debian/$@/usr/share/gettext
	cp -p debian/tmp/usr/share/man/man1/autopoint.1 \
		debian/$@/usr/share/man/man1

binary: binary-indep binary-arch

build-arch: build

build-indep: build

.PHONY: binary binary-arch binary-indep build-arch build-indep clean
.PHONY: gettext-base gettext gettext-el gettext-doc autopoint libgettextpo0 libasprintf0v5 libgettextpo-dev libasprintf-dev