File: rules

package info (click to toggle)
grub 0.5.93.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,348 kB
  • ctags: 3,759
  • sloc: ansic: 15,606; sh: 2,024; asm: 1,100; perl: 291; makefile: 166
file content (84 lines) | stat: -rwxr-xr-x 2,397 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
82
83
84
#!/usr/bin/make -f
# -*-makefile-*-
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package:=grub

# For cross-compilation.
DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture)
DEB_BUILD_GNU_CPU := $(patsubst hurd-%,%,$(DEB_BUILD_ARCH))
ifeq ($(filter-out hurd-%,$(DEB_BUILD_ARCH)),)
 DEB_BUILD_GNU_SYSTEM := gnu
else
 DEB_BUILD_GNU_SYSTEM := linux
endif
DEB_BUILD_GNU_TYPE := $(DEB_BUILD_GNU_CPU)-$(DEB_BUILD_GNU_SYSTEM)
DEB_HOST_GNU_TYPE := $(DEB_BUILD_GNU_TYPE)

INSTALL = install -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_PROGRAM = $(INSTALL) -m 755

build:
	$(checkdir)
	./configure --prefix=/usr \
	  $(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
	  --mandir='$${datadir}/man' --infodir='$${datadir}/info'
	make
	echo timestamp > build

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

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
## make dirs
	install -d debian/tmp debian/tmp/usr/share/doc/grub debian/tmp/DEBIAN
## install files

	dir=`cd debian/tmp && pwd` && make install DESTDIR=$$dir
	gzip -f9 debian/tmp/usr/share/info/* debian/tmp/usr/share/man/*/*
	strip -s debian/tmp/usr/sbin/*

	$(INSTALL_DATA)	TODO BUGS NEWS docs/menu.lst \
	  debian/tmp/usr/share/doc/grub/

	$(INSTALL_DATA) ChangeLog debian/tmp/usr/share/doc/grub/changelog
	gzip -f9 debian/tmp/usr/share/doc/grub/changelog
	$(INSTALL_DATA) debian/changelog debian/tmp/usr/share/doc/grub/changelog.Debian
	gzip -f9 debian/tmp/usr/share/doc/grub/changelog.Debian
	$(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/grub/
	$(INSTALL_DATA) debian/README.debian debian/tmp/usr/share/doc/grub/

	# Install control files.
	$(INSTALL_PROGRAM) debian/postinst debian/prerm debian/tmp/DEBIAN
	dpkg-shlibdeps debian/tmp/usr/*bin/*
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules -a -f stage2/fsys_ext2fs.c
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot