File: rules

package info (click to toggle)
x48 0.4-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 896 kB
  • ctags: 1,703
  • sloc: ansic: 20,843; asm: 297; makefile: 50; sh: 34
file content (81 lines) | stat: -rwxr-xr-x 1,649 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
#!/usr/bin/make -f
# Sample debian.rules file - Copyright 1994,1995 by Ian Jackson.
#
# Invoke each target with `./debian/rules <target>'.  All targets should be
# invoked with the package root as the current directory.

# The name of the package
P = x48

R = debian/tmp

DIRECTORIES = \
        $(R) \
        $(R)/DEBIAN \
        $(R)/usr \
        $(R)/usr/share/doc/$(P) \
	$(R)/usr/bin \
	$(R)/usr/lib \
	$(R)/usr/lib/menu
	
$(DIRECTORIES):
	install -d -g root -o root -m 755 $@
	chmod g-s $@

# Builds the binary package.
build:
	$(checkdir)
	touch build

# Clean $(DIRECTORIES)
clean-dir:
	$(checkdir)
	rm -rf $(R)

# Undoes the effect of `make -f rules build'.
clean: clean-dir
	$(checkdir)
	xmkmf
	[ ! -f Makefile ] || make clean
	rm -f debian/files* debian/substvars core debian/*~ *~ build 
	rm -f {.,bin,doc,readline,romdump,src,utils}/Makefile*

# Makes a binary package.
binary-indep: $(DIRECTORIES) checkroot build
	$(checkdir)

	cp README $(R)/usr/share/doc/$(P)
	gzip -9v $(R)/usr/share/doc/$(P)/README

binary-arch: $(DIRECTORIES) checkroot build
	$(checkdir)

	xmkmf
	make
	install -s bin/checkrom bin/dump2rom bin/mkcard bin/x48 $(R)/usr/bin
	install romdump/ROMDump src/X48.ad $(R)/usr/share/doc/$(P)	

	debstd -m
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -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