File: rules

package info (click to toggle)
xt-sdf2 2.0.1-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,988 kB
  • ctags: 9,985
  • sloc: ansic: 92,584; sh: 2,298; makefile: 849
file content (104 lines) | stat: -rwxr-xr-x 3,076 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
#!/usr/bin/make -f
#                                                       -*- makefile -*-
# debian/rules file for the Debian/GNU Linux centericq package
# Copyright 2003-2004 by Julien LEMOINE <speedblue@debian.org>

#export DH_VERBOSE=1

# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

MANPAGES= asc-support-config dump-actions dump-priorities parse-sdf2 	\
          restorebrackets asf-support-config dump-gotos 		\
	  dump-productions parsetablegen sdf-support-config sdfchecker	\
          toolbuslib-config addPosInfo apply-function implodePT		\
	  tree2dot unparseProd ambtracker flattenPT parsePT unparsePT

CFLAGS = -Wall -g
PKG=$(CURDIR)/debian/xt-sdf2
PKG-DEV=$(CURDIR)/debian/xt-sdf2-dev

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

config.status: configure
	dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess config.guess
endif
	CFLAGS="$(CFLAGS)" ./configure 				\
	--build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr 		\
	--mandir=\$${prefix}/share/man 				\
	--infodir=\$${prefix}/share/info --with-aterm=/usr	\
	--datadir=\$${prefix}/share/xt-sdf2

build: patch build-stamp

build-stamp:  config.status
	dh_testdir
	@for file in $(MANPAGES); do                                  	\
	  if [ -f /usr/bin/docbook2man ]; then                         	\
		/usr/bin/docbook2man debian/$$file.sgml;               	\
	else                                                         	\
		/usr/bin/docbook-to-man debian/$$file.sgml > $$file.1; 	\
	  fi;                                                          	\
	done
	$(MAKE)
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	-$(MAKE) clean distclean
	rm -rf pre-pkgs/ build-stamp manpage.refs *.1 			\
	./toolbuslib/toolbuslib-config.sh 				\
	./asf-support/utils/asf-support-config 				\
	./asc-support/utils/asc-support-config 				\
	./sdf-support/utils/sdf-support-config 				\
	./sglr/test/regress-terms.sh 					\
	./pgen/src/sdf2table ./pgen/src/parse-sdf2 			\
	./pgen/test/regress-lang.sh config.sub config.guess
	find ./ -name Makefile -print | xargs rm || true
	find ./ -name config.log -print | xargs rm || true
	find ./ -name config.status -print | xargs rm || true
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) install prefix=$(PKG)/usr
	mv $(PKG)/usr/include/* $(PKG-DEV)/usr/include/xt-sdf2
	mv $(PKG)/usr/lib $(PKG-DEV)/usr

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installexamples
	dh_installman *.1
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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