File: rules

package info (click to toggle)
cafeobj 1.5.9-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 19,888 kB
  • sloc: lisp: 85,046; sh: 659; makefile: 436; perl: 147
file content (105 lines) | stat: -rwxr-xr-x 2,451 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
#!/usr/bin/make -f

export DH_OPTIONS

co := $(CURDIR)/debian/cafeobj
coel := $(CURDIR)/debian/cafeobj-mode

DEB_HOST_ARCH     ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(DEB_HOST_ARCH), armhf)
  export NO_SBCL_BUILDOPTS = 1
endif

# asdf tries to write compiled files to XDG_CACHE_HOME which might not
# exists, use a tmp directory
XDG_CACHE_HOME=$(CURDIR)/tmpcache
export XDG_CACHE_HOME

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

build-arch-stamp:
	dh_testdir
	./configure --prefix=/usr --with-lisp=sbcl
	#./configure --prefix=/usr --with-lisp=sbcl --enable-rebuild-doc
	# remove prebuild documentation pdf and rebuild them
	#rm -f doc/manual/manual.pdf
	#rm -f doc/refman/reference-manual.pdf
	#rm -f doc/PigNose/pnguide.pdf
	#rm -f doc/RefCard/interp.pdf
	#rm -f doc/RefCard/syntax.pdf
	#rm -f doc/namespace/namespace.pdf
	make build
	touch build-arch-stamp

build-indep-stamp:
	touch build-indep-stamp

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f install-arch-stamp install-indep-stamp
	rm -f build-arch-stamp build-indep-stamp
	rm -rf $(XDG_CACHE_HOME)
	dh_clean
	
install: install-arch install-indep
install-arch: install-arch-stamp
install-indep: install-indep-stamp

install-arch-stamp: DH_OPTIONS=-a
install-arch-stamp: build-arch
	dh_testdir
	dh_testroot
	dh_prep
	DESTDIR=$(co) $(MAKE) install
	# make install does also install the cafeobj-mode.el, remove it
	rm $(co)/usr/share/emacs/site-lisp/cafeobj-mode.el
	rmdir $(co)/usr/share/emacs/site-lisp/
	rmdir $(co)/usr/share/emacs
	touch install-arch-stamp

install-indep-stamp: DH_OPTIONS=-i
install-indep-stamp: build-indep
	mkdir -p $(coel)/usr/share/emacs/site-lisp
	cp elisp/cafeobj-mode.el $(coel)/usr/share/emacs/site-lisp
	touch install-indep-stamp


binary: binary-indep binary-arch

binary-indep: DH_OPTIONS=-i
binary-indep: install-indep
	dh_testdir
	dh_testroot
	dh_installdocs README.md
	dh_installchangelogs
	dh_installemacsen
	dh_compress -X.pdf
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs README.md
	dh_installchangelogs
	# do NOT strip otherwise the sbcl dump file is broken!
	#dh_strip
	dh_compress -X.pdf
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


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