File: rules

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.2-5
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 117,312 kB
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,617; makefile: 4,022; asm: 3,007; perl: 839; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (148 lines) | stat: -rwxr-xr-x 4,114 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
146
147
148
#!/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

PACKAGE=xemacs21-packages

# 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 --print-architecture)
prefix=usr

debianconfig = ${machine_type}-debian-linux
html_file_loc = debian/html
tmp_file_loc = debian/tmp

var_file = ./var_file.pl

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

# to make this basically cross portable to
xemacs_ver = xemacs${maj_version}

create-source-tar: pre-build
	cp debian/Local.rules .
	$(MAKE) -f debian/PackagesMakefile create-source-tar

build: pre-build build-stamp
build-stamp:
	dh_testdir

	cp debian/Local.rules .
	$(MAKE) all

	$(MAKE) -f debian/PackagesMakefile build

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp pre-build-stamp
	# set up the files to not cause problems when trying to use them
	set -e ; cd debian ; $(MAKE) -f ConfigMakefile VAR_FILE=$(var_file)

	#-mv install.old install

	-rm -f debian/substvars
	-rm -f debian/files
	-rm -rf debian/tmp #`find debian/* -type d`
	-rm -f xemacs-packages/auctex/preview/latex/bootstrap.log
	-rm -f xemacs-packages/auctex/preview/latex/preview-mk.ins
	-rm -f xemacs-packages/auctex/preview/latex/preview-mk.log
	-rm -f xemacs-packages/auctex/preview/latex/preview.aux
	-rm -f xemacs-packages/auctex/preview/latex/preview.drv
	-rm -f xemacs-packages/auctex/preview/latex/preview.log

	# Add here commands to clean up after the build process.
	[ ! -f Local.rules ] || $(MAKE) distclean

# Remove extra generated files
	-rm -f xemacs-packages/eshell/esh-groups.el \
		xemacs-packages/ess/texi/version.texi \
		xemacs-packages/ess/VERSION \
		xemacs-packages/x-symbol/man/index.html
	if [ -f debian/PackagesMakefile ] ; then \
	  $(MAKE) -f debian/PackagesMakefile clean ; \
	fi

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

	dh_clean

	# must be done last because it removes the control file
	set -e ; cd debian ; $(MAKE) -f ConfigMakefile VAR_FILE=$(var_file) clean

debian/PackagesMakefile: pre-build

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	#dh_installdirs

	# Add here commands to install the package into debian/tmp.
	$(MAKE) install

	#touch install-stamp


pre-build: pre-build-stamp
pre-build-stamp:
	$(checkdir)
	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)"
	#set -e ; cd debian ; $(MAKE) -f ConfigMakefile VAR_FILE=$(var_file) clean
	set -e ; cd debian ; $(MAKE) -f ConfigMakefile VAR_FILE=$(var_file)
	# replace all references to (dir) to XEmacs${maj_version} in
	# the info files
	#touch pre-build-stamp




# 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 binary-indep binary-arch binary

# Local variables:
# mode: makefile
# End: