File: rules

package info (click to toggle)
gcc-m68k-gnu 1.0-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 52 kB
  • ctags: 5
  • sloc: sh: 247; makefile: 38
file content (48 lines) | stat: -rwxr-xr-x 1,079 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
#!/usr/bin/make -f

package = gcc-m68k-gnu
docdir = debian/tmp/usr/doc/$(package)

build:
	$(checkdir)
	touch build

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

binary-indep: checkroot build
	$(checkdir)

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)
	cd debian/tmp && install -d usr
	sh debian/populate-debian-tmp
	ln -s gcc debian/tmp/usr/m68k-gnu/bin/cc
	ln -s /gnu/lib debian/tmp/usr/m68k-gnu/lib
	ln -s /gnu/include debian/tmp/usr/m68k-gnu/include
	sh debian/putldso
	cp -p debian/copyright debian/README $(docdir)
	cp -p debian/changelog $(docdir)/changelog.Debian
	cp -p ChangeLog $(docdir)/changelog
	cd $(docdir) && gzip -9 changelog changelog.Debian
	dpkg-gencontrol
	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