File: rules

package info (click to toggle)
xemacs21 21.4.24-12
  • links: PTS
  • area: main
  • in suites: sid
  • size: 34,212 kB
  • sloc: ansic: 243,882; lisp: 94,071; cpp: 5,726; sh: 4,406; perl: 1,096; cs: 775; makefile: 765; python: 279; asm: 248; lex: 119; yacc: 95; sed: 22; csh: 9
file content (145 lines) | stat: -rwxr-xr-x 3,775 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
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Also some stuff taken from debmake scripts, by Cristopt Lameter.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_COMPAT=4
#export DEB_BUILD_OPTIONS=nostrip

PACKAGE=xemacs21

# this script moves directories so things can't be on separate
# partitions ( no idea why they would be to begin with, but hey
# doesn't hurt to warn :)
package=xemacs
version = $(shell /bin/sh debian/find-version)
maj_version = $(shell /bin/sh debian/find-major-version)

# any way to do this automatically since we'd like this to be
# easily used with no changes on other architectures, but still
# want to be able to specify.  Does this work OK?
machine_type = $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
prefix=usr

debianconfig = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
tmp_file_loc = debian/tmp

var_file = var_file.pl

debian_config_scripts = debian/makevarfile
topdir = $(shell pwd)

XEMACS_TYPES = nomule mule mule-canna-wnn

# these things should really not be here if this is to become a more
# general packaging method.
support_bins = b2m etags gnuclient gnuattach gnudoit rcs-checkin ellcc
xemacs_ver = xemacs${maj_version}
html_file_loc = debian/html

build-arch: build
build-indep: build

build: pre-build build-stamp
build-stamp: debian/PackagesMakefile
	dh_testdir

	$(MAKE) -f debian/PackagesMakefile build

	touch build-stamp

clean: debian/${var_file}
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp pre-build-stamp

	-mv install.old install
	-rm -f install

	-rm -f debian/substvars
	-rm -f debian/files
	-rm -rf debian/tmp # `find debian/* -type d`
	-rm -f lisp/custom-load.el
	-rm -f configure

	[ ! -f Makefile ] || $(MAKE) distclean

	if [ -f debian/PackagesMakefile ] ; then \
	  $(MAKE) -f debian/PackagesMakefile clean ; \
	fi

	if [ -f lisp/auto-autoloads.el.orig ]; then \
	  cp lisp/auto-autoloads.el.orig lisp/auto-autoloads.el ; \
	fi

	-rm -f `find . -name "*~"`
	-rm -f `find . -name '*.orig'`

	dh_clean

	# must be done last because it removes some utility scripts
	set -e ; cd debian ; \
	$(MAKE) -f ConfigMakefile \
	  VAR_FILE=$(var_file) \
	  XEMACS_TYPES="$(XEMACS_TYPES)" \
	  clean
	rm -f debian/$(var_file)

install: install-stamp
install-stamp: build
	dh_testdir
	dh_testroot
	dh_prep
	${MAKE} -f debian/PackagesMakefile installit

	touch install-stamp

debian/${var_file}:
	chmod +x $(debian_config_scripts)
	debian/makevarfile "debian/$(var_file)" \
	    "MAJVERSION" "$(maj_version)" \
	    "VERSION" "$(version)" \
	    "SUBNAME" "" \
	    "CONF_NAME" "$(debianconfig)" \
	    "ARCH" "$(machine_type)" \
	    "HTML_FILE_LOC" "$(html_file_loc)" \
	    "TMP_FILE_LOC" "$(tmp_file_loc)" \
	    "PREFIX" "$(prefix)" \
	    "TOPDIR" "$(topdir)" \
	    "SUPPORT_BINS" "$(support_bins)"

debian/PackagesMakefile: debian/PackagesMakefile.in debian/${var_file}
	set -e ; cd debian ; \
	$(MAKE) -f ConfigMakefile \
	  VAR_FILE=$(var_file) \
	  XEMACS_TYPES="$(XEMACS_TYPES)"

pre-build: pre-build-stamp
pre-build-stamp: debian/${var_file} debian/PackagesMakefile
	$(checkdir)

	touch pre-build-stamp
	cp lisp/auto-autoloads.el lisp/auto-autoloads.el.orig

# Build architecture-independent files here.
binary-indep: build install
	-mv install install.old
	$(MAKE) -f debian/PackagesMakefile binary-indep

# Build architecture-dependent files here.
binary-arch: build install
	-mv install install.old
	$(MAKE) -f debian/PackagesMakefile binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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

# Local variables:
# mode: makefile
# End: