File: rules

package info (click to toggle)
clif 0.90.2-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 4,336 kB
  • ctags: 2,815
  • sloc: ansic: 29,914; yacc: 4,338; lex: 644; makefile: 373; sh: 48
file content (104 lines) | stat: -rwxr-xr-x 2,900 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
#!/usr/bin/make -f
# ssystem debian build rules
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
 
package=clif
#CC := $(shell if [ -x /usr/bin/egcc ]; then echo egcc; else echo cc; fi)
#    egcc seems to build broken binary now , so don't use it
CC=cc

build:
	$(checkdir)
	make  CC=$(CC)
# doesn't work well
#	cd doc; latex2html guide_programmers
#  This one is a little better, but still not very good.
#	cd doc; latex2html guide_users
	cd doc; dvips -o guide_programmers.ps guide_programmers.dvi
	cd doc; dvips -o guide_users.ps guide_users.dvi
	cd doc; dvips -o cimcsp94.ps cimcsp94.dvi

clean:
	$(checkdir)
	-rm -f build
	-make clean
	-rm -rf doc/guide_programmers doc/guide_users *.ps
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files* core debian/substvars

binary-indep: checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/usr/bin

# install man page
	install -d debian/tmp/usr/man/man1
	install -m 644  debian/$(package).1 debian/tmp/usr/man/man1
	gzip -9 debian/tmp/usr/man/man1/*

#install other docs
	install -d debian/tmp/usr/doc/$(package)
	cp doc/*.ps doc/*.dvi debian/tmp/usr/doc/$(package)
	-gzip -9 debian/tmp/usr/doc/$(package)/*
	-cp -r doc/guide_programmers doc/guide_users debian/tmp/usr/doc/$(package)

# install standard docs
	cp debian/README.debian  debian/tmp/usr/doc/$(package)
	cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
	cp ChangeLog debian/tmp/usr/doc/$(package)/changelog
	cp README TODO INSTALL running_notes debian/tmp/usr/doc/$(package)
	-gzip -9v debian/tmp/usr/doc/$(package)/*

# but don't gzip the copyright statement
#
	cp debian/copyright debian/tmp/usr/doc/$(package)/copyright


# install examples
	install -d debian/tmp/usr/doc/$(package)/examples
	cp -r tests \
	    example debian/tmp/usr/doc/$(package)/examples
	chmod 644 debian/tmp/usr/doc/$(package)/examples/tests/*
	chmod 755 debian/tmp/usr/doc/$(package)/examples/tests/check-them

# install binary
	install -m 755 clif debian/tmp/usr/bin
	strip --strip-unneeded debian/tmp/usr/bin/*

# install support files
	install -d debian/tmp/usr/lib/$(package)
	cp small.hlp io.ci clif.ini debian/tmp/usr/lib/$(package)
	chmod 644 debian/tmp/usr/lib/$(package)/*

# install things in debian/tmp/DEBIAN
	install -d debian/tmp/DEBIAN
	dpkg-shlibdeps debian/tmp/usr/bin/*
	dpkg-gencontrol -isp

# clean permissions and build
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

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

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