File: rules

package info (click to toggle)
clisp 1997-12-06-1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 20,744 kB
  • ctags: 8,390
  • sloc: ansic: 37,808; lisp: 37,255; asm: 6,393; sh: 3,077; objc: 2,481; makefile: 1,174; sed: 96; perl: 14
file content (93 lines) | stat: -rwxr-xr-x 3,111 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
#! /usr/bin/make -f
#
# Last updated: $Date: 1996/10/11 06:54:59 $ by Kevin Dalley <kevin@aimnet.com>
#
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

# To make the binary distribution package, the ``Debianized'' source package
# and the context diff to the original package, type `./debian.rules dist'.
# Make sure that `debian.rules' is executable before the final distribution
# is made.
#
# Invoke each target with `./debian.rules <target>'.  All targets should be
# invoked with the package root as the current directory.
#
# The `binary' target must be run as root, as it needs to install files with
# specific ownerships.  The `diff' target assumes that you have the original
# source package available, unpacked, in ../$(p)-$(v).orig, or that you have
# the previous revision of the ``Debianized'' source package and context diff
# in the parent directory.

# The name of the package (for example, `emacs').
package = clisp
prefix=/usr

# to test compilation, run
# cd src; $(MAKE) check
build:
	$(checkdir)
	./configure --prefix=$(prefix)
	cd src; \
        ./makemake  --prefix=$(prefix) --with-newreadline --with-gettext --with-dynamic-ffi --with-wide > Makefile; \
        $(MAKE)
	touch build

clean:
	$(checkdir)
	-rm -f build
	-$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
	-rm -rf *~ debian/tmp debian/*~ debian/files* src/config.cache
	-cd src/newreadline; $(MAKE) -i distclean || \
	$(MAKE) -f Makefile.in distclean

binary-indep:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp$(prefix)/doc/$(package)
	cd src; \
	$(MAKE) INSTALL_PROGRAM='install -s' \
		prefix=`pwd`/../debian/tmp$(prefix) install
	for file in ANNOUNCE COPYRIGHT INSTALL SUMMARY \
			src/CHANGES.LOG src/NEWS src/TODO; do \
		install -m 0644 $$file \
			debian/tmp$(prefix)/doc/$(package)/`basename $$file`; \
		gzip -9v debian/tmp$(prefix)/doc/$(package)/`basename $$file`; \
	done
	dpkg-shlibdeps debian/tmp$(prefix)/lib/lisp/lisp.run \
	debian/tmp$(prefix)/lib/lisp/wlisp.run \
	debian/tmp$(prefix)/bin/clisp
	
	gzip -9v debian/tmp$(prefix)/man/man1/clisp.1 \
		debian/tmp$(prefix)/man/man3/clreadline.3
	mv debian/tmp$(prefix)/man/html debian/tmp$(prefix)/doc/$(package)
	cp debian/copyright debian/tmp$(prefix)/doc/$(package)/.
	cp debian/changelog debian/tmp$(prefix)/doc/$(package)/changelog.Debian
	gzip -9v debian/tmp$(prefix)/doc/$(package)/changelog.Debian
	dpkg-gencontrol
	dpkg --build debian/tmp ..

binary-arch:


define checkdir
	test -f src/_clisp.c -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

checkroot:
	$(checkdir)
	test root = "`whoami`"

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