~ubuntu-branches/ubuntu/wily/grub2/wily-proposed

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Felix Zielcke, Robert Millan, Felix Zielcke
  • Date: 2010-01-26 19:26:25 UTC
  • mfrom: (1.13.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100126192625-coq6czap2ofjollf
Tags: 1.98~20100126-1
* New Bazaar snapshot.
  - Includes mipsel-yeeloong port.

[ Robert Millan ]
* config.in: Lower priority of grub2/linux_cmdline_default.

[ Felix Zielcke ]
* Drop `CFLAGS=-O0' workaround on powerpc. Should be fixed correctly now.
* Ship grub-bin2h and grub-script-check in grub-common.
* Terminate NEWS.Debian with a blank line like lintian would suggest
  if that check would be working correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19
19
        CFLAGS += -O0
20
20
else
21
 
# Avoid `_restgpr_31_x in boot is not defined' FTBFS.
22
 
  ifeq (powerpc,$(DEB_HOST_ARCH_CPU))
23
 
        CFLAGS += -O0
24
 
  else
25
21
        CFLAGS += -O2
26
 
  endif
27
22
endif
28
23
 
29
24
CC := gcc-4.4
44
39
        sed -i configure.ac -e "s/^AC_INIT.*/AC_INIT(\[GRUB\],\[$(deb_version)\],\[bug-grub@gnu.org\])/"
45
40
        ./autogen.sh
46
41
 
47
 
configure/grub-pc configure/grub-ieee1275 configure/grub-coreboot configure/grub-emu:: $(AUTOGEN_FILES)
 
42
configure/grub-pc configure/grub-ieee1275 configure/grub-coreboot configure/grub-emu configure/grub-yeeloong:: $(AUTOGEN_FILES)
48
43
        mkdir -p $(subst configure/,build/,$@)
49
44
        cd $(subst configure/,build/,$@) && $(CONFIGURE) --with-platform=$(subst configure/grub-,,$@)
50
45
 
64
59
        mkdir -p $(subst configure/,build/,$@)
65
60
        cd $(subst configure/,build/,$@) && $(CONFIGURE)
66
61
 
67
 
build/grub-common build/grub-pc build/grub-efi-ia32 build/grub-efi-amd64 build/grub-ieee1275 build/grub-coreboot build/grub-emu::
 
62
build/grub-common build/grub-pc build/grub-efi-ia32 build/grub-efi-amd64 build/grub-ieee1275 build/grub-coreboot build/grub-emu build/grub-yeeloong::
68
63
        $(MAKE) -C $@
69
64
 
70
65
build/grub-firmware-qemu::
80
75
                -m $${grub_memdisk} \
81
76
                -o $(CURDIR)/$@/grub.bin
82
77
 
83
 
install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-ieee1275 install/grub-coreboot install/grub-emu::
 
78
install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-ieee1275 install/grub-coreboot install/grub-emu install/grub-yeeloong::
84
79
        $(MAKE) -C $(subst install/,build/,$@) install DESTDIR=$(CURDIR)/debian/$(subst install/,,$@)/
85
80
 
86
81
        # shipped with grub-common
87
82
        rm -rf $(CURDIR)/debian/$(subst install/,,$@)/etc/grub.d
88
83
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{sbin,share/man/man8}/{grub-dumpbios,grub-probe,grub-mkconfig,grub-mkdevicemap,grub-ofpathname}{,.8}
89
 
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{bin,share/man/man1}/{grub-mkelfimage,grub-mkfont,grub-editenv,grub-mkisofs,grub-mkrescue,grub-mkrelpath,grub-mkpasswd-pbkdf2}{,.1}
 
84
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{bin,share/man/man1}/{grub-bin2h,grub-mkelfimage,grub-mkfont,grub-editenv,grub-mkisofs,grub-mkrescue,grub-mkrelpath,grub-script-check,grub-mkpasswd-pbkdf2}{,.1}
90
85
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
91
86
        rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/share/{grub,info,locale}/
92
87
        rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/include
106
101
                done ; \
107
102
        fi
108
103
 
109
 
        if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] ; then \
 
104
        if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "mipsel" ] ; then \
110
105
                i=$(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/*/kernel.img ; if test -e $$i ; then strip -s $$i ; fi \
111
106
        fi
112
107
 
113
108
        mkdir -p $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides
114
109
        echo "$(subst install/,,$@): unstripped-binary-or-object *.mod" \
115
110
                >> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@)
116
 
        if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] ; then \
 
111
        if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "mipsel" ] ; then \
117
112
                cd $(CURDIR)/debian/$(subst install/,,$@) && find ./usr/lib/grub -name kernel.img \
118
113
                        | sed -e "s%.*%$(subst install/,,$@): statically-linked-binary &%g" \
119
114
                >> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@) ; \
129
124
 
130
125
install/grub-common::
131
126
        $(MAKE) -C $(subst install/,build/,$@) install DESTDIR=$(CURDIR)/debian/$(subst install/,,$@)/
132
 
        rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/{i386,powerpc,sparc64}-*
 
127
        rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/{i386,powerpc,sparc64,mipsel}-*
133
128
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{sbin,share/man/man8}/{update-grub,grub-install,grub-setup,grub-reboot,grub-set-default}{,.8}
134
129
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{bin,share/man/man1}/{grub-mkimage,grub-mkfloppy}{,.1}
135
130
        rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/share/info/dir*
140
135
        sed -i configure.ac -e "s/^AC_INIT.*/AC_INIT(\[GRUB\],\[0\],\[bug-grub@gnu.org\]) dnl version is filled by debian\/rules/"
141
136
 
142
137
        for i in $(AUTOGEN_DEB_FILES) ; do \
143
 
                rm -f debian/grub-{pc,efi-*,ieee1275,coreboot}.$$i ; \
 
138
                rm -f debian/grub-{pc,efi-*,ieee1275,coreboot,yeeloong}.$$i ; \
144
139
        done
145
140
        -rm -rf build
146
141