File: rules

package info (click to toggle)
xindy 2.5.1.20160104-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,512 kB
  • sloc: perl: 15,838; lisp: 4,845; makefile: 1,548; lex: 541; sh: 165; sed: 97
file content (123 lines) | stat: -rwxr-xr-x 2,903 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
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
#!/usr/bin/make -f
# -*- makefile -*-

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

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
include /usr/share/dpkg/architecture.mk

CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS   :=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS  :=$(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs

configure_flags = LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"\
  --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
  --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
  --docdir=\$${prefix}/share/doc/xindy-rules

arch_subdirs=src tex2xindy user-commands
indep_subdirs=modules make-rules doc

xindy_dir=debian/xindy

configure:
	aclocal -Im4
	dh_autoreconf

config.status: configure
	dh_testdir
	./configure $(configure_flags) --disable-make-rules --disable-docs

config.status-with-latex: configure
	dh_testdir
	if [ -e config.status ]; then \
	    rm -f build-arch-stamp build-indep-stamp; \
	    $(MAKE) distclean || true; \
	fi
	./configure $(configure_flags)

	ln config.status config.status-with-latex

#build: build-indep build-arch
build:

build-indep: build-indep-stamp
build-indep-stamp: config.status-with-latex
	dh_testdir

	for i in $(indep_subdirs); do $(MAKE) -C $$i all || exit 1; done

	touch $@

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

	for i in $(arch_subdirs); do $(MAKE) -C $$i all || exit 1; done

	touch $@

clean:
	dh_testdir
	rm -f build-arch-stamp build-indep-stamp config.status-with-latex

	if [ -f Makefile ]; then $(MAKE) distclean; fi

	dh_autoreconf_clean
	dh_clean

binary-indep: build-indep
	dh_testdir
	dh_testroot
	dh_prep -i
	dh_installdirs -i

	for i in $(indep_subdirs); do \
	    $(MAKE) -C $$i install DESTDIR=$(CURDIR)/debian/xindy-rules \
	      || exit 1; \
	done

	dh_installchangelogs -i NEWS
	dh_installdocs -i
	dh_lintian -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch: build-arch
	dh_testdir
	dh_testroot
	dh_prep -a
	dh_installdirs -a

	for i in $(arch_subdirs); do \
	    $(MAKE) -C $$i install DESTDIR=$(CURDIR)/debian/xindy || exit 1; \
	done

	dh_link -a usr/share/doc/xindy-rules usr/share/doc/xindy
	dh_strip -a
	dh_compress -a
	chmod -x $(xindy_dir)/usr/lib/xindy/xindy.mem
	dh_fixperms -a
	dh_perl -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a \
	  -- -Vclisp:Depends="clisp-memfile-hash-$$(clisp -memfile-hash-of $(xindy_dir)/usr/lib/xindy/xindy.mem)"
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

test:
	dh_testdir
	set -e; for i in debian/tests/*; do test -x "$$i" || continue; \
	  echo "$$i"; "$$i"; done

.PHONY: build build-arch build-indep clean binary-indep binary-arch binary \
  get-orig-source test