File: rules

package info (click to toggle)
ispell 3.4.00-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,284 kB
  • ctags: 2,204
  • sloc: ansic: 10,081; makefile: 1,851; yacc: 1,702; objc: 385; csh: 215; python: 112; perl: 89; sed: 32; sh: 15
file content (117 lines) | stat: -rwxr-xr-x 3,704 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
SHELL                   := sh -e
CFLAGS                  := $(shell dpkg-buildflags --get CPPFLAGS) \
                           $(shell dpkg-buildflags --get CFLAGS)   \
                           $(shell getconf LFS_CFLAGS)             \
                           -Wall
LDFLAGS                 := $(shell dpkg-buildflags --get LDFLAGS)
DH_AUTO_OPTIONS         := -v -Smakefile
GEN_DH_FILES            := debian/packages.d/gen_debhelper_files.pl
export DESTDIR          := $(CURDIR)/debian/tmp

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC  := $(DEB_HOST_GNU_TYPE)-gcc
else
  CC  := gcc
endif

MAKE_OPTIONS :=  CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"


%:
	dh ${@}

override_dh_auto_clean:
	rm -f debian/*.stamp debian/*.config debian/*.templates *.mwl*
	
	for dir in . languages/*; do                                    \
	        [ ! -d $$dir ] || $(MAKE) -C $$dir clean dictclean;     \
	done
	
	[ ! -f Makefile ] || $(MAKE) realclean
	-find . -name "*~" -delete
	
	rm -f local.h defhash.h
	
	$(GEN_DH_FILES) clean

override_dh_installdocs-arch:
	dh_installdocs -a

override_dh_installdocs-indep:
	dh_installdocs -i  --link-doc=ienglish-common
	

debian/packages.stamp: $(wildcard debian/packages.d/*.in) $(GEN_DH_FILES) debian/rules debian/control
	perl $(GEN_DH_FILES) generate
	touch "$@"


debian/build-common.stamp: debian/packages.stamp
	@echo "*** Building common files"
	
	ln -sf local.h.linux local.h
	
	dh_auto_build $(DH_AUTO_OPTIONS) --no-parallel -- $(MAKE_OPTIONS)      \
	                config.sh
	
	dh_auto_build $(DH_AUTO_OPTIONS) --parallel -- $(MAKE_OPTIONS)         \
	                programs defmt-programs showversion ispell.1 ispell.5
	touch "$@"

override_dh_auto_build-arch: debian/build-common.stamp

override_dh_auto_build-indep: debian/build-common.stamp
	@echo "*** Building arch:all files"
	dh_auto_build $(DH_AUTO_OPTIONS) --no-parallel -- $(MAKE_OPTIONS) all-languages
	
	$(MAKE) -f debian/rules american.xxl+.mwl british.xxl+.mwl

override_dh_prep: debian/packages.stamp
	dh_prep

override_dh_auto_install-arch:
	@echo "*** Installing data into arch:any packages"
	
# Note: do not call dh_auto_install, as it automatically pulls `install' target
	$(MAKE) $(MAKE_OPTIONS) DESTDIR="$(DESTDIR)"  \
	        install-basic install-deformatters install-dictbuild
	
override_dh_auto_install-indep:
	@echo "*** Installing data into arch:all packages"
	
	$(MAKE) $(MAKE_OPTIONS) DESTDIR="$(DESTDIR)"  \
	        install-languages
	
	mv $(DESTDIR)/usr/lib/ispell/english.aff $(DESTDIR)/usr/share/ispell/english.aff
	
	set -e; \
	for lang in american british ; do \
	   cp -a $$lang.xxl+.mwl $(DESTDIR)/usr/share/ispell/$$lang.xxl+.mwl; \
	   gzip -9nf $(DESTDIR)/usr/share/ispell/$$lang.xxl+.mwl; \
	done
	
	set -e; \
	for infofile in debian/*.info-ispell; do \
	        installdeb-ispell --package=`basename $$infofile .info-ispell`; \
	done

override_dh_install:
	dh_install --fail-missing


american.xxl+.mwl british.xxl+.mwl  : languages/english/english.aff
american.xxl+.mwl  : languages/american/american.xlg+ /usr/share/dict/american-english-insane
british.xxl+.mwl   : languages/british/british.xlg+   /usr/share/dict/british-english-insane

%.mwl:
	# Note: assumes that affix file is the first prerequisite
	./munchlist -v -T utf8 -l   $^ > $@.tmp
	mv -f $@.tmp $@

.PHONY: override_dh_auto_build-arch override_dh_auto_build-indep               \
        override_dh_auto_install-arch override_dh_auto_install-indep           \
        override_dh_installdocs-arch override_dh_installdocs-indep             \
        override_dh_prep override_dh_auto_clean override_dh_install