| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_OPTIONS |
| 4 |
|
| 5 |
co := $(CURDIR)/debian/cafeobj |
| 6 |
coel := $(CURDIR)/debian/cafeobj-mode |
| 7 |
|
| 8 |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 9 |
ifeq ($(DEB_HOST_ARCH), armhf) |
| 10 |
export NO_SBCL_BUILDOPTS = 1 |
| 11 |
endif |
| 12 |
|
| 13 |
# asdf tries to write compiled files to XDG_CACHE_HOME which might not |
| 14 |
# exists, use a tmp directory |
| 15 |
XDG_CACHE_HOME=$(CURDIR)/tmpcache |
| 16 |
export XDG_CACHE_HOME |
| 17 |
|
| 18 |
build: build-arch build-indep |
| 19 |
build-arch: build-arch-stamp |
| 20 |
build-indep: build-indep-stamp |
| 21 |
|
| 22 |
build-arch-stamp: |
| 23 |
dh_testdir |
| 24 |
./configure --prefix=/usr --with-lisp=sbcl |
| 25 |
#./configure --prefix=/usr --with-lisp=sbcl --enable-rebuild-doc |
| 26 |
# remove prebuild documentation pdf and rebuild them |
| 27 |
#rm -f doc/manual/manual.pdf |
| 28 |
#rm -f doc/refman/reference-manual.pdf |
| 29 |
#rm -f doc/PigNose/pnguide.pdf |
| 30 |
#rm -f doc/RefCard/interp.pdf |
| 31 |
#rm -f doc/RefCard/syntax.pdf |
| 32 |
#rm -f doc/namespace/namespace.pdf |
| 33 |
make build |
| 34 |
touch build-arch-stamp |
| 35 |
|
| 36 |
build-indep-stamp: |
| 37 |
touch build-indep-stamp |
| 38 |
|
| 39 |
clean: |
| 40 |
dh_testdir |
| 41 |
dh_testroot |
| 42 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 43 |
rm -f install-arch-stamp install-indep-stamp |
| 44 |
rm -f build-arch-stamp build-indep-stamp |
| 45 |
rm -rf $(XDG_CACHE_HOME) |
| 46 |
dh_clean |
| 47 |
|
| 48 |
install: install-arch install-indep |
| 49 |
install-arch: install-arch-stamp |
| 50 |
install-indep: install-indep-stamp |
| 51 |
|
| 52 |
install-arch-stamp: DH_OPTIONS=-a |
| 53 |
install-arch-stamp: build-arch |
| 54 |
dh_testdir |
| 55 |
dh_testroot |
| 56 |
dh_prep |
| 57 |
DESTDIR=$(co) $(MAKE) install |
| 58 |
# make install does also install the cafeobj-mode.el, remove it |
| 59 |
rm $(co)/usr/share/emacs/site-lisp/cafeobj-mode.el |
| 60 |
rmdir $(co)/usr/share/emacs/site-lisp/ |
| 61 |
rmdir $(co)/usr/share/emacs |
| 62 |
touch install-arch-stamp |
| 63 |
|
| 64 |
install-indep-stamp: DH_OPTIONS=-i |
| 65 |
install-indep-stamp: build-indep |
| 66 |
mkdir -p $(coel)/usr/share/emacs/site-lisp |
| 67 |
cp elisp/cafeobj-mode.el $(coel)/usr/share/emacs/site-lisp |
| 68 |
touch install-indep-stamp |
| 69 |
|
| 70 |
|
| 71 |
binary: binary-indep binary-arch |
| 72 |
|
| 73 |
binary-indep: DH_OPTIONS=-i |
| 74 |
binary-indep: install-indep |
| 75 |
dh_testdir |
| 76 |
dh_testroot |
| 77 |
dh_installdocs README.md |
| 78 |
dh_installchangelogs |
| 79 |
dh_installemacsen |
| 80 |
dh_compress -X.pdf |
| 81 |
dh_fixperms |
| 82 |
dh_installdeb |
| 83 |
dh_gencontrol |
| 84 |
dh_md5sums |
| 85 |
dh_builddeb |
| 86 |
|
| 87 |
binary-arch: DH_OPTIONS=-a |
| 88 |
binary-arch: build install |
| 89 |
dh_testdir |
| 90 |
dh_testroot |
| 91 |
dh_installdocs README.md |
| 92 |
dh_installchangelogs |
| 93 |
# do NOT strip otherwise the sbcl dump file is broken! |
| 94 |
#dh_strip |
| 95 |
dh_compress -X.pdf |
| 96 |
dh_fixperms |
| 97 |
dh_installdeb |
| 98 |
dh_shlibdeps |
| 99 |
dh_gencontrol |
| 100 |
dh_md5sums |
| 101 |
dh_builddeb |
| 102 |
|
| 103 |
|
| 104 |
.PHONY: config build clean binary-indep binary-arch binary install |
| 105 |
|