File: rules

package info (click to toggle)
xindy 2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 51,492 kB
  • ctags: 16,667
  • sloc: lisp: 82,455; ansic: 43,027; xml: 25,207; asm: 22,166; sh: 20,913; perl: 15,725; fortran: 6,951; makefile: 3,644; cpp: 2,636; lex: 503; sed: 97
file content (144 lines) | stat: -rwxr-xr-x 3,546 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
#!/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

export CLISP_DIR = $(shell dirname $$(readlink --canonicalize /usr/bin/clisp-link))
export CLISP_LINKKIT = $(CLISP_DIR)/linkkit

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 \
  --enable-external-clisp --enable-clisp-dir=$(CLISP_DIR)

arch_subdirs=rte binaries tex2xindy user-commands
indep_subdirs=modules make-rules doc

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 $@

cl_src = $(CURDIR)/clisp-link-src

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

	rm -fr $(cl_src)
	cp -Lr $(CLISP_DIR)/full $(cl_src)
	sed -i '/^LIBS/!n; s/-ldb /-ldb-4.6 /; s/-l\(SM\|ICE\) //g' \
	  $(cl_src)/makevars
	$(MAKE) -C rte fulldir=$(cl_src) all

	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

	rm -fr $(cl_src)

	# fixme upstream: clisp-link creates this directory, but upstream
        # doesn't remove it
	rm -fr rte/dynmod

	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

#       docdir is /usr/share/doc/xindy-rules instead of …/doc/xindy-VERSION
	for i in $(indep_subdirs); do \
	    $(MAKE) -C $$i install DESTDIR=$(CURDIR)/debian/xindy-rules \
	      docdir='$$(datadir)/doc/xindy-rules' || exit 1; \
	done
	find debian/xindy-rules/usr/share/xindy/lang -name \*.pl -delete

	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
	dh_fixperms -a
	dh_perl -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

get-orig-source:
	wget -O xindy_2.3.orig.tar.gz \
	  http://surfnet.dl.sourceforge.net/sourceforge/xindy/xindy-2.3.tar.gz

test:
	dh_testdir
	set -e; for i in debian/tests/*; do $i; done

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