kbuild: handle any failures of the gen_init_cpio or initramfs image to stop the build.
[linux-flexiantxendom0-3.2.10.git] / usr / Makefile
1
2 obj-y := initramfs_data.o
3
4 host-progs  := gen_init_cpio
5
6 clean-files := initramfs_data.cpio.gz
7
8 LDFLAGS_initramfs_data.o := $(LDFLAGS_BLOB) -r -T
9
10 $(obj)/initramfs_data.o: $(src)/initramfs_data.scr \
11                          $(obj)/initramfs_data.cpio.gz FORCE
12         $(call if_changed,ld)
13
14 # initramfs-y are the programs which will be copied into the CPIO
15 # archive. Currently, the filenames are hardcoded in gen_init_cpio,
16 # but we need the information for the build as well, so it's duplicated
17 # here.
18
19 # Commented out for now
20 # initramfs-y := $(obj)/root/hello
21
22 quiet_cmd_cpio = CPIO    $@
23       cmd_cpio = ./$< > $@
24
25 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) FORCE
26         $(call if_changed,cpio)
27
28 targets += $(obj)/initramfs_data.cpio
29
30 $(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
31         $(call if_changed,gzip)
32
33 targets += $(obj)/initramfs_data.cpio.gz
34