mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
Rebuild sub-modules on each build (issue #143).
The .INTERMEDIATE target seemed to causing the problem with make thinking it didn't have to descend into the sub-module directories. Removing it allows it to work correctly.
This commit is contained in:
parent
8343130e9a
commit
d8ab8ecfe8
30
Makefile
30
Makefile
@ -141,7 +141,7 @@ define define_module =
|
|||||||
else
|
else
|
||||||
# Copy the stored config file into the unpacked directory
|
# Copy the stored config file into the unpacked directory
|
||||||
$(build)/$($1_dir)/.config: config/$($1_config) $(build)/$($1_dir)/.canary
|
$(build)/$($1_dir)/.config: config/$($1_config) $(build)/$($1_dir)/.canary
|
||||||
$(call do,COPY,"$$<",cp -a "$$<" "$$@")
|
$(call do,COPY,"$$<",cp "$$<" "$$@")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Use the module's configure variable to build itself
|
# Use the module's configure variable to build itself
|
||||||
@ -195,7 +195,6 @@ define define_module =
|
|||||||
-$(RM) "$(build)/$($1_dir)/.configured"
|
-$(RM) "$(build)/$($1_dir)/.configured"
|
||||||
-$(MAKE) -C "$(build)/$($1_dir)" clean
|
-$(MAKE) -C "$(build)/$($1_dir)" clean
|
||||||
|
|
||||||
.INTERMEDIATE: $1.intermediate
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(call map, define_module, $(modules))
|
$(call map, define_module, $(modules))
|
||||||
@ -216,7 +215,7 @@ endef
|
|||||||
#
|
#
|
||||||
define initrd_bin_add =
|
define initrd_bin_add =
|
||||||
$(initrd_bin_dir)/$(notdir $1): $1
|
$(initrd_bin_dir)/$(notdir $1): $1
|
||||||
$(call do,INSTALL-BIN,$$<,cp -a "$$<" "$$@")
|
$(call do,INSTALL-BIN,$$<,cp "$$<" "$$@")
|
||||||
@$(CROSS)strip "$$@" 2>&-; true
|
@$(CROSS)strip "$$@" 2>&-; true
|
||||||
initrd_bins += $(initrd_bin_dir)/$(notdir $1)
|
initrd_bins += $(initrd_bin_dir)/$(notdir $1)
|
||||||
endef
|
endef
|
||||||
@ -229,16 +228,23 @@ $(initrd_lib_dir)/$(notdir $1): $1
|
|||||||
initrd_libs += $(initrd_lib_dir)/$(notdir $1)
|
initrd_libs += $(initrd_lib_dir)/$(notdir $1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach _, $(call bins,kexec), $(eval $(call initrd_bin_add,$_)))
|
# Only some modules have binaries that we install
|
||||||
$(foreach _, $(call bins,tpmtotp), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += kexec
|
||||||
$(foreach _, $(call bins,pciutils), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += tpmtotp
|
||||||
$(foreach _, $(call bins,flashrom), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += pciutils
|
||||||
$(foreach _, $(call bins,cryptsetup), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += flashrom
|
||||||
$(foreach _, $(call bins,gpg), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += cryptsetup
|
||||||
$(foreach _, $(call bins,lvm2), $(eval $(call initrd_bin_add,$_)))
|
bin_modules += gpg
|
||||||
|
bin_modules += lvm2
|
||||||
|
|
||||||
|
$(foreach m, $(bin_modules), \
|
||||||
|
$(call map,initrd_bin_add,$(call bins,$m)) \
|
||||||
|
)
|
||||||
|
|
||||||
# Install the libraries for every module that we have built
|
# Install the libraries for every module that we have built
|
||||||
$(foreach m, $(modules), $(call map,initrd_lib_add,$(call libs,$m)))
|
$(foreach m, $(modules), \
|
||||||
|
$(call map,initrd_lib_add,$(call libs,$m)) \
|
||||||
|
)
|
||||||
|
|
||||||
#$(foreach _, $(call outputs,xen), $(eval $(call initrd_bin,$_)))
|
#$(foreach _, $(call outputs,xen), $(eval $(call initrd_bin,$_)))
|
||||||
|
|
||||||
@ -329,7 +335,7 @@ $(build)/$(coreboot_dir)/initrd.cpio.xz: initrd.cpio
|
|||||||
|
|
||||||
# hack for the coreboot to find the linux kernel
|
# hack for the coreboot to find the linux kernel
|
||||||
$(build)/$(coreboot_dir)/bzImage: $(build)/$(linux_dir)/arch/x86/boot/bzImage
|
$(build)/$(coreboot_dir)/bzImage: $(build)/$(linux_dir)/arch/x86/boot/bzImage
|
||||||
$(call do,COPY,$@,cp -a "$^" "$@")
|
$(call do,COPY,$@,cp "$^" "$@")
|
||||||
|
|
||||||
coreboot.intermediate: $(build)/$(coreboot_dir)/bzImage
|
coreboot.intermediate: $(build)/$(coreboot_dir)/bzImage
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user