File: Makefile.in

package info (click to toggle)
dictionaries-common 1.31.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,136 kB
  • sloc: lisp: 5,521; perl: 3,163; sh: 199; makefile: 179
file content (274 lines) | stat: -rw-r--r-- 9,361 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File: Makefile.in   -*- Makefile -*-
# Description: Makefile for the dictionaries-common Debian package
# Author:      Rafael Laboissière <rafael@debian.org>
#              Some modifications by Agustin Martin <agmartin@debian.org>
# Created on:  Tue Oct 26 11:08:11 CEST 1999

#########################################################################
# Release definitions (set by from configure script from information
# extracted from debian/changelog)

release 	:= @RELEASE@
date		:= @DATE@

#########################################################################
# Installation directories

DESTDIR          =
usr_dir		:= $(DESTDIR)/usr
bin_dir		:= $(usr_dir)/bin
sbin_dir	:= $(usr_dir)/sbin
share_dir       := $(usr_dir)/share
policy_dir      := $(share_dir)/doc/dictionaries-common-dev
man1_dir	:= $(share_dir)/man/man1
man3_dir	:= $(share_dir)/man/man3
man8_dir	:= $(share_dir)/man/man8
perl_dir 	:= $(share_dir)/perl5
ispell_dir      := $(usr_dir)/lib/ispell
wordlist_dir    := $(share_dir)/dict

#########################################################################
# Perl module definitions

lib_dir		:= $(DESTDIR)@LIBDIR@
cache_dir 	:= $(DESTDIR)@CACHEDIR@

emacs_init_dir  := $(DESTDIR)/etc/emacs/site-start.d
xemacs_init_dir := $(DESTDIR)/etc/xemacs21/site-start.d
share_dict_dir	:= $(share_dir)/dictionaries-common
debconf_dir	:= $(share_dict_dir)/debconf
emacs_lisp_dir  := $(share_dict_dir)/site-elisp

dh_auto_dir     := $(share_dir)/debhelper/autoscripts

cdbs_dir	:= $(share_dict_dir)/cdbs

#########################################################################
# Script definitions

base_maintainer_scripts := config postinst postrm templates
auto_maintainer_scripts := preinst-compatfile postinst-compatfile postrm-varlibrm
ispell_maintainer_scripts := $(addsuffix -ispell, \
		$(base_maintainer_scripts) \
		$(auto_maintainer_scripts))
aspell_maintainer_scripts := $(addsuffix -aspell, \
		postinst postrm \
		$(auto_maintainer_scripts))
hunspell_maintainer_scripts := $(addsuffix -hunspell, postinst postrm)
wordlist_maintainer_scripts := \
                  $(addsuffix -wordlist,$(base_maintainer_scripts))
maintainer_scripts := $(addprefix scripts/maintainer/,\
                  $(ispell_maintainer_scripts) \
                  $(aspell_maintainer_scripts) \
                  $(hunspell_maintainer_scripts) \
                  $(wordlist_maintainer_scripts))

base_system_scripts := update-default select-default remove-default
ispell_system_scripts := $(addsuffix -ispell,$(base_system_scripts))
aspell_system_scripts := $(addsuffix -aspell, update-dictcommon)
hunspell_system_scripts := $(addsuffix -hunspell, update-dictcommon)
wordlist_system_scripts := $(addsuffix -wordlist,$(base_system_scripts))
# myspell system script moved to system_scripts_noauto

system_scripts := $(addprefix scripts/system/,\
                  $(ispell_system_scripts)   \
                  $(aspell_system_scripts)   \
                  $(hunspell_system_scripts) \
		  $(myspell_system_scripts)  \
                  $(wordlist_system_scripts))

base_debhelper_script := installdeb
debhelper_scripts := $(addprefix scripts/debhelper/,\
                  $(base_debhelper_script)-ispell \
                  $(base_debhelper_script)-aspell \
                  $(base_debhelper_script)-hunspell \
                  $(base_debhelper_script)-wordlist)

select_readmes := README.select-ispell README.select-wordlist
varlib_readmes := README.varlib-aspell README.varlib-ispell

# noauto scripts. This will not be generated from .in files but directly handled
# user scripts also fit in this section

user_scripts :=	$(addprefix scripts/system/, \
		select-default-iwrap \
		ispell-wrapper)
system_scripts_noauto := $(addprefix scripts/system/,\
		ispell-autobuildhash \
		aspell-autobuildhash)
maintainer_scripts_noauto :=
debhelper_scripts_noauto := $(addprefix scripts/debhelper/, \
		installdeb-myspell \
		dh_aspell-simple)

dico_config := debian/dictionaries-common.config
dico_config_parts := debian/dictionaries-common.config-header \
	        scripts/system/dc-debconf-default-value.pl \
	        scripts/system/dc-debconf-select.pl \
	        debian/dictionaries-common.config-footer

#########################################################################
# Policy definitions

policy := policy/dsdt-policy
html_stylesheet := policy/html.dsl

#########################################################################
# Main target for build

all: $(policy).txt \
	$(system_scripts) \
	$(debhelper_scripts) \
	$(select_readmes) \
	$(varlib_readmes) \
	$(dico_config)

#########################################################################
# Policy XML document

$(policy).html: $(policy).xml $(html_stylesheet) $(maintainer_scripts)
	openjade -t sgml -V nochunks -d $(html_stylesheet) -b UTF-8 \
	  /usr/share/sgml/declaration/xml.decl $< > $@

%.txt: %.html
	w3m -dump -O UTF-8 $< | \
		perl -pi -e 's/\015 *//g' > $@

#########################################################################
# Make dictionaries-common debconf config file combining the diferent parts

$(dico_config): $(dico_config_parts)
	cat $^ > $@

#########################################################################
# Template rules using the slice filter

%-ispell: %.in
	slice -oUNDEF+I+IW+IA-A-H-W-AH:$@ $<

%-aspell: %.in
	slice -oUNDEF+A+IA+AH-I-H-W:$@ $<

%-hunspell: %.in
	slice -oUNDEF+H+AH-I-A-W-IA-IW:$@ $<

%-wordlist: %.in
	slice -oUNDEF+W+IW-I-A-AH:$@ $<

#########################################################################
# Installation

install: all

	# -- Superuser scripts
	install -d $(sbin_dir)
	install --mode=755 $(system_scripts) $(system_scripts_noauto) $(sbin_dir)

	# -- Regular system scripts
	install -d $(bin_dir)
	install --mode=755 $(user_scripts) $(bin_dir)

	# -- Debhelper scripts
	install --mode=755 $(debhelper_scripts) $(debhelper_scripts_noauto) $(bin_dir)

	# -- CDBS makefile scrap
	install -d $(cdbs_dir)
	install --mode=644 scripts/cdbs/dict-common.mk $(cdbs_dir)

	# -- Maintainer script
	install -d $(dh_auto_dir)
	install --mode=644 $(maintainer_scripts) $(maintainer_scripts_noauto) $(dh_auto_dir)
	install -d $(debconf_dir)
	mv $(dh_auto_dir)/config-* $(dh_auto_dir)/templates-* $(debconf_dir)

	# -- Perl module
	install -d $(perl_dir)/Debian $(perl_dir)/Devel
	install --mode=644 scripts/perl5/Debian/DictionariesCommon.pm $(perl_dir)/Debian
	install --mode=644 scripts/perl5/Devel/DictionariesCommon.pm  $(perl_dir)/Devel

	# -- Man pages
	install -d $(man1_dir)
	install -d $(man3_dir)
	install -d $(man8_dir)
	for i in $(sbin_dir)/* ; do \
	  b=`basename $$i` ; \
	  ( cd $(sbin_dir) ; \
            pod2man --release=$(release) --section=8 --date=$(date) \
              --center=" "  $$b ) > $(man8_dir)/$$b.8 ; \
	done
	for i in $(bin_dir)/* ; do \
	  b=`basename $$i` ; \
	  ( cd $(bin_dir) ; \
            pod2man --release=$(release) --section=1 --date=$(date) \
              --center=" "  $$b ) | sed s/E\<ecirc\>/\\\\[^e]/ > $(man1_dir)/$$b.1 ; \
	done
	( cd scripts/perl5/Debian ; \
          pod2man --release=$(release) --section=3pm --date=$(date) \
            --center=" " DictionariesCommon.pm ) \
            > $(man3_dir)/Debian::DictionariesCommon.3pm
	( cd scripts/perl5/Devel ; \
          pod2man --release=$(release) --section=3pm --date=$(date) \
            --center=" " DictionariesCommon.pm ) \
            > $(man3_dir)/Devel::DictionariesCommon.3pm

	# -- dictionaries-common cache & lib directories
	install -d $(lib_dir)/ispell
	install -d $(lib_dir)/wordlist
	install -d $(cache_dir)

	# -- README files for ispell and wordlist dirs
	install -d $(ispell_dir)
	install -d $(wordlist_dir)
	install --mode=644 README.select-ispell   $(ispell_dir)
	install --mode=644 README.select-wordlist $(wordlist_dir)

	# -- README files for aspell and ispell dirs under /var/lib
	for i in aspell ispell; do \
		mkdir -p $(DESTDIR)/var/lib/$$i; \
		install --mode=644 README.varlib-$$i $(DESTDIR)/var/lib/$$i/README; \
	done

	# -- Policy
	install -d $(policy_dir)
	install --mode=644 $(policy).html $(policy).txt $(policy_dir)

	# -- Emacsen support
	install -d $(emacs_lisp_dir) $(emacs_init_dir) $(xemacs_init_dir)
	install --mode=644 support/emacsen/*.el $(emacs_lisp_dir)
	touch $(emacs_lisp_dir)/.nosearch
	cp $(emacs_lisp_dir)/startup.el \
	  $(xemacs_init_dir)/50dictionaries-common.el
	mv $(emacs_lisp_dir)/startup.el \
	  $(emacs_init_dir)/50dictionaries-common.el

	# -- Mutt support
	install --mode=644 support/mutt/ispell-init \
	  $(share_dict_dir)/mutt-ispell-init

	# -- Shared debconf stuff
	install --mode=644 scripts/system/dc-debconf-select.pl \
		scripts/system/dc-debconf-default-value.pl \
	  $(share_dict_dir)
	touch $(share_dict_dir)/elanguages

#########################################################################
# Mr Proper

clean:
	rm -f $(policy).html $(policy).txt $(maintainer_scripts) \
	  $(system_scripts) $(debhelper_scripts) $(select_readmes) \
	  $(dico_config)

distclean: clean
	rm -f Makefile config.* \
	  scripts/perl5/Debian/DictionariesCommon.pm \
	  scripts/perl5/Devel/DictionariesCommon.pm  \
	  support/emacsen/startup.el $(policy).xml

maintainer-clean: distclean
	rm -f configure

#########################################################################
# Postlog

.PHONY: all clean distclean maintainer-clean install