File: rules

package info (click to toggle)
libintl-perl 1.26-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 5,696 kB
  • ctags: 495
  • sloc: perl: 156,143; makefile: 137
file content (51 lines) | stat: -rwxr-xr-x 1,249 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# If set to a true value then MakeMaker's prompt function will
# always return the default without waiting for user input.
export PERL_MM_USE_DEFAULT=1

TMP     =$(CURDIR)/debian/tmp

include /usr/share/dpkg/buildflags.mk

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp:
	dh_testdir
	perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE='$(CFLAGS) $(CPPFLAGS)' LD='$(CC) $(CFLAGS) $(LDFLAGS)'
	cd $(CURDIR)/gettext_xs && perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE='$(CFLAGS) $(CPPFLAGS)' LD='$(CC) $(CFLAGS) $(LDFLAGS)'
	$(MAKE) LD_RUN_PATH=""
	$(MAKE) -C $(CURDIR)/gettext_xs
	dh_auto_test
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) realclean
	[ ! -f Makefile ] || $(MAKE) -C $(CURDIR)/gettext_xs realclean
	rm -f xs_disabled
	dh_clean build-stamp config.log

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
	$(MAKE) -C $(CURDIR)/gettext_xs install DESTDIR=$(TMP) PREFIX=/usr

binary-indep: install
	dh_testdir
	dh_testroot
	dh_install -i --exclude=xs
	dh $@

binary-arch: install
	dh $@

binary: binary-indep binary-arch

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