Commit 2d9d0282834dfdd7a444ca5001935187a38eb598

Authored by Linus Torvalds

Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild fix from Michal Marek:
 "Here is an ARM Makefile fix that you even acked.  After nobody wanted
  to take it, it ended up in the kbuild tree"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  arm, kbuild: make "make install" not depend on vmlinux

Showing 3 changed files Side-by-side Diff

... ... @@ -296,10 +296,15 @@
296 296 # Convert bzImage to zImage
297 297 bzImage: zImage
298 298  
299   -zImage Image xipImage bootpImage uImage: vmlinux
  299 +BOOT_TARGETS = zImage Image xipImage bootpImage uImage
  300 +INSTALL_TARGETS = zinstall uinstall install
  301 +
  302 +PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS)
  303 +
  304 +$(BOOT_TARGETS): vmlinux
300 305 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
301 306  
302   -zinstall uinstall install: vmlinux
  307 +$(INSTALL_TARGETS):
303 308 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
304 309  
305 310 %.dtb: | scripts
arch/arm/boot/Makefile
... ... @@ -95,24 +95,24 @@
95 95 @test "$(INITRD)" != "" || \
96 96 (echo You must specify INITRD; exit -1)
97 97  
98   -install: $(obj)/Image
99   - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  98 +install:
  99 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
100 100 $(obj)/Image System.map "$(INSTALL_PATH)"
101 101  
102   -zinstall: $(obj)/zImage
103   - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  102 +zinstall:
  103 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
104 104 $(obj)/zImage System.map "$(INSTALL_PATH)"
105 105  
106   -uinstall: $(obj)/uImage
107   - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  106 +uinstall:
  107 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
108 108 $(obj)/uImage System.map "$(INSTALL_PATH)"
109 109  
110 110 zi:
111   - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  111 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
112 112 $(obj)/zImage System.map "$(INSTALL_PATH)"
113 113  
114 114 i:
115   - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  115 + $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
116 116 $(obj)/Image System.map "$(INSTALL_PATH)"
117 117  
118 118 subdir- := bootp compressed dts
arch/arm/boot/install.sh
... ... @@ -20,6 +20,20 @@
20 20 # $4 - default install path (blank if root directory)
21 21 #
22 22  
  23 +verify () {
  24 + if [ ! -f "$1" ]; then
  25 + echo "" 1>&2
  26 + echo " *** Missing file: $1" 1>&2
  27 + echo ' *** You need to run "make" before "make install".' 1>&2
  28 + echo "" 1>&2
  29 + exit 1
  30 + fi
  31 +}
  32 +
  33 +# Make sure the files actually exist
  34 +verify "$2"
  35 +verify "$3"
  36 +
23 37 # User may have a custom install script
24 38 if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
25 39 if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi