File: rules

package info (click to toggle)
autoclass 3.3.6.dfsg.1-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 5,808 kB
  • sloc: ansic: 16,726; makefile: 114; csh: 111; sh: 98; cpp: 95
file content (141 lines) | stat: -rwxr-xr-x 3,538 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Christoph Lameter.

# build without debugging symbols and strip executables when installing,
# unless DEB_BUILD_OPTIONS specifies otherwise

# Note: when changing the debhelper compatibility level, also update
# the dependency in debian/control (e.g. "debhelper (>= 7)")

CFLAGS = -Wall -g
INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
          
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += -j$(NUMJOBS)
endif

DOC= doc/checkpoint-c.text			\
  doc/classes-c.text				\
  doc/interpretation-c.text			\
  doc/introduction-c.text			\
  doc/models-c.text				\
  doc/prediction-c.text				\
  doc/preparation-c.text			\
  doc/reports-c.text				\
  doc/search-c.text				\
  read-me.text

EXAMPLES= sample/imports-*			\
  sample/read.me.c				\
  sample/screenc.text 				\
  sample/scriptc.text				\
  debian/README.sample				\
  debian/simple.README				\
  debian/simple.c				\
  debian/simple.db2				\
  debian/simple.hd2				\
  debian/simple.model				\
  debian/simple.r-params			\
  debian/simple.s-params

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	(cd prog; $(MAKE) $(MAKEFLAGS))

	# assemble changelog in reverse chronological order
	-rm changelog
	for a in 9 8 7 6 5 4 3 2 1; do				\
	  for b in 9 8 7 6 5 4 3 2 1 0; do			\
	    for c in 9 8 7 6 5 4 3 2 1; do			\
	      if [ -f version-$$a-$$b-$$c.text ]; then		\
		cat version-$$a-$$b-$$c.text >>changelog; fi;	\
	    done;						\
	  if [ -f version-$$a-$$b.text ]; then			\
	    cat version-$$a-$$b.text >>changelog; fi;		\
	  done;							\
	done

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	# Add here commands to clean up after the build process.
	rm -f  doc/*.pdf  prog/autoclass prog/*.o

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/autoclass.
	$(INSTALL_PROGRAM) prog/autoclass debian/autoclass/usr/bin/autoclass

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	rm -f debian/postinst.debhelper debian/prerm.debhelper
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdocs $(DOC)

	dh_installexamples $(EXAMPLES)

#	dh_installmenu
#	dh_installemacsen
#	dh_installinit
#	dh_installcron
	dh_installman debian/autoclass.1
#	dh_undocumented
	dh_installchangelogs  changelog
	dh_link
	dh_strip
	dh_compress -X.pdf
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl 
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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