File: rules

package info (click to toggle)
fai-kernels 1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 80 kB
  • ctags: 6
  • sloc: makefile: 53
file content (80 lines) | stat: -rwxr-xr-x 1,760 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
#!/usr/bin/make -f
#
# debian/rules for fai-kernels
#
# $Id: rules,v 1.4 2002/01/03 13:52:27 lange Exp $

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=2

DEB_HOST_ARCH=$(MACHTYPE)
BOOTP_REVISION=BOOTP1
DHCP_REVISION=DHCP1
kversion=$(shell cat kernel-version)

kname=kernel-source-$(kversion)

unpack: unpack-stamp
unpack-stamp:
	bzcat /usr/src/$(kname).tar.bz2 | tar -xf -
	touch unpack-stamp

# kernel using BOOTP protocol
bootp: bootp-stamp
bootp-stamp: unpack-stamp kernel-config fai-kernel-config-bootp
	cat kernel-config fai-kernel-config-bootp > $(kname)/.config
	cd $(kname) ; \
	echo -e "\t\n\n" | make menuconfig ; \
	make-kpkg clean ; \
	make-kpkg --revision $(BOOTP_REVISION) kernel-image 
	touch bootp-stamp

# kernel using DHCP protocol
dhcp: dhcp-stamp
dhcp-stamp:
	cat kernel-config fai-kernel-config-bootp enable-dhcp > $(kname)/.config
	cd $(kname) ; \
	echo -e "\t\n\n" | make menuconfig ; \
	make-kpkg clean ; \
	make-kpkg --revision $(DHCP_REVISION) kernel-image 
	touch dhcp-stamp

build: bootp-stamp dhcp-stamp

veryclean:
	rm -f *-stamp *.deb
	-rm -rf $(kname)
	dh_clean

clean:
	dh_clean

install: install-stamp
install-stamp: build
	dh_clean -k
	dh_installdirs
	cp -p *.deb `pwd`/debian/fai-kernels/usr/lib/fai/kernel
	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
#	dh_testversion

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs 
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch
.PHONY: build clean binary-indep binary-arch binary install unpack bootp dhcp