File: rules

package info (click to toggle)
kernel-internals-guide 20011021-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 260 kB
  • ctags: 8
  • sloc: makefile: 49
file content (69 lines) | stat: -rwxr-xr-x 1,504 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
#! /usr/bin/make -f

package = kernel-internals-guide
dtmp    = debian/$(package)
docdir  = usr/share/doc/$(package)

export DH_COMPAT=2

source = $(shell dpkg-parsechangelog | grep '^Source:' | sed 's/^Source: //')
upstream = $(shell dpkg-parsechangelog | grep '^Version:' | \
		   sed -e 's/^Version: //' -e 's/-.*//')

# Override this if you find a mirror closer to home. It's not a lot to
# download, though.
#LDP_MIRROR = http://www.ibiblio.org/pub/Linux/docs/linux-doc-project
LDP_MIRROR = http://www.moses.uklinux.net/patches

DATE = $(shell date +%Y%m%d)

refresh:
	dh_testdir
	wget --passive --output-document lki-$(DATE).sgml \
		$(LDP_MIRROR)/lki.sgml
	# Now check this and move it to lki.sgml if it's OK.

orig: clean
	tar -C .. --exclude debian -czvf \
	    ../$(source)_$(upstream).orig.tar.gz $(source)-$(upstream)

clean:
	dh_testdir
	dh_testroot
	rm -f lki*.html lki.txt
	dh_clean build-indep-stamp

build-indep: build-indep-stamp
build-indep-stamp:
	dh_testdir
	sgml2html lki.sgml
	sgml2txt lki.sgml
	touch $@

build: build-indep

install:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs $(docdir)
	install -m644 lki.sgml lki*.html lki.txt $(dtmp)/$(docdir)/

binary-arch:

binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch binary-indep

.PHONY: refresh orig build build-indep clean install
.PHONY: binary-arch binary-indep binary