File: rules.modules

package info (click to toggle)
squashfs 1%3A3.3-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,032 kB
  • ctags: 992
  • sloc: ansic: 6,257; makefile: 84
file content (52 lines) | stat: -rw-r--r-- 1,789 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

# prefix of the target package name
PACKAGE=squashfs-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make

# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)

# The kdist_configure target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the neccessary debian/ files
kdist_config: prep-deb-files

# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean:
	$(MAKE) -C $(KSRC) M=$(PWD) clean

binary-modules:
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) -C $(KSRC) M=$(PWD) modules

	# Install the module
	mkdir -p debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/squashfs
	cp squashfs.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/fs/squashfs

	dh_installdocs
	dh_installchangelogs
	dh_installmodules
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol -- -v$(VERSION)
	dh_md5sums
	dh_builddeb --destdir=$(DEB_DESTDIR)
	dh_clean -k