File: rules

package info (click to toggle)
libtabe 0.2.5%2Bcvs20030523-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,480 kB
  • ctags: 1,790
  • sloc: ansic: 17,444; sh: 9,781; makefile: 342
file content (144 lines) | stat: -rwxr-xr-x 4,084 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

package = libtabe
SHELL = /bin/bash

# The soname major version is currently 2
libpkg = libtabe2

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3

# Figure out host and build architectures
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

build: build-stamp
build-stamp: build-begin build-basic
	touch build-stamp

build-begin: build-begin-stamp
build-begin-stamp:
	dh_testdir
	./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_BUILD_GNU_TYPE) \
	            --prefix=/usr --enable-shared 
	touch build-begin-stamp

# Build the basic programs in the directories src/{supports/bims,util,tsi-src}
build-basic: build-basic-stamp build-doc-stamp
build-basic-stamp:
	$(MAKE)
#	make -f debian/rules build-doc
	touch build-basic-stamp

# Build documents
build-doc-stamp: doc/libtabe.html doc/libtabe.txt
	touch build-doc-stamp
doc/libtabe.html: doc/libtabe.sgml
	cd doc; bg5sgml2html libtabe.sgml
doc/libtabe.txt: doc/libtabe.sgml
	cd doc; bg5sgml2txt libtabe.sgml

# Build shared library
build-shared: build-shared-stamp
build-shared-stamp:
	$(MAKE) -C src shared
	$(MAKE) -C src/supports/bims shared
	touch build-shared-stamp

# Build static library
build-static: build-static-stamp
build-static-stamp:
	$(MAKE) -C src unshared
	$(MAKE) -C src/supports/bims unshared
	touch build-static-stamp


clean:
	dh_testdir
	dh_testroot
	rm -rf build-stamp build-{begin,shared,static,basic,doc}-stamp install-stamp debian/build

	# Make sure config.sub and config.guess are up-to-date
	-test -r /usr/share/misc/config.sub && \
	   cp -f /usr/share/misc/config.sub script/config.sub
	-test -r /usr/share/misc/config.guess && \
	   cp -f /usr/share/misc/config.guess script/config.guess

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean

# clean documents in doc/
	rm -f doc/libtabe.{html,txt} doc/libtabe-?.html

	dh_clean


install: build
	dh_testdir
	dh_testroot
	dh_clean -k
#	dh_installdirs usr/share/doc/libtabe{-db,0,0-dev}
#	dh_installdirs usr/share/doc/libtabe{-db,0,0-dev} \
#	               usr/lib/xcin/tab/zh_TW.Big5/

	$(MAKE) install DESTDIR=`pwd`/debian/tmp
# don't install symlinks as suggested by foka.
#	( cd debian/tmp/usr/lib/xcin/tab/zh_TW.Big5; \
#	  ln -s ../../../../share/tabe/tsiyin/tsi.db \
#	        ../../../../share/tabe/tsiyin/yin.db . )

    # install of docs and examples now handled by dh_install{docs,examples}
#	dh_movefiles
	touch install-stamp

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep:

# Build architecture dependant packages using the common target.
binary-arch: binary-$(libpkg) binary-libtabe-dev binary-libtabe-db

# Any other binary targets build just one binary package at a time.
binary-%: build install
	make -f debian/rules binary-common package=$* \
	        DH_OPTIONS="-p$* -P`pwd`/debian/build/$*"

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-common:
	dh_testdir
	dh_testroot
	dh_movefiles
	dh_installdocs
	dh_installexamples
#	dh_installmenu
#	dh_installmanpages
	dh_undocumented
# 	if [ "$(package)" = "libtabe-db" ]; then \
# 	    dh_undocumented tsiadd.1 tsidel.1 tsidump.1 tsiyindump.1; \
#         dh_link usr/share/doc/libtabe-db/Changes \
#                 usr/share/doc/libtabe-db/changelog; \
#     fi
	dh_installchangelogs -k doc/Changes
	dh_strip
	dh_compress -X".c"  # don't compress C programs
	dh_fixperms
	dh_installdeb
	if [ "$(package)" = "$(libpkg)" ]; then \
		dh_makeshlibs -V; \
	fi
	if [ "$(package)" = "libtabe-db" ]; then \
	    dh_shlibdeps -ldebian/build/$(libpkg)/usr/lib \
		--dpkg-shlibdeps-params=-Ldebian/build/$(libpkg)/DEBIAN/shlibs; \
	else \
	    dh_shlibdeps; \
	fi
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install