File: rules

package info (click to toggle)
xindy 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,700 kB
  • ctags: 800
  • sloc: perl: 15,628; lisp: 4,844; sh: 4,480; makefile: 1,665; lex: 521; sed: 97
file content (126 lines) | stat: -rwxr-xr-x 2,958 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpatch/dpatch.make

# 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)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CFLAGS += -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure_flags = LDFLAGS="$(LDFLAGS) -Wl,-z,defs" CFLAGS="$(CFLAGS)" \
  --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

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

config.status-with-latex: configure patch-stamp
	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

	$(MAKE) -f debian/rules unpatch

	dh_clean

binary-indep: build-indep
	dh_testdir
	dh_testroot
	dh_clean -k -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_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_clean -k -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-fasl-loader-$(shell clisp -x --quiet "(car (system::version))")"
	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