build: Track explicit module dependencies in Makefile.core.def

Add a new keyword, "depends", to the module definition syntax
used in Makefile.core.def. This allows specifying explicit module
dependencies together with the module definition.

Do not track the "extra_deps.lst" file in the repository anymore,
it is now auto-generated.

Make use of this new keyword in the bli module definition.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Oliver Steffen authored and Daniel Kiper committed 2024-05-09 15:04:54 +02:00
1 parent 8719cc2040
commit 6744840b17
7 files changed
+16 -6

No files matched your search

+6 -3
View File
@@ -454,8 +454,11 @@ crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
platform_DATA += crypto.lst
CLEANFILES += crypto.lst
syminfo.lst: gensyminfo.sh kernel_syms.lst $(top_srcdir)/grub-core/extra_deps.lst $(MODULE_FILES)
cat kernel_syms.lst $(top_srcdir)/grub-core/extra_deps.lst > $@.new
extra_deps.lst:
@echo $(EXTRA_DEPS) | sed "s/\s*:\s*/\n/g" > $@
syminfo.lst: gensyminfo.sh kernel_syms.lst extra_deps.lst $(MODULE_FILES)
cat kernel_syms.lst extra_deps.lst > $@.new
for m in $(MODULE_FILES); do \
sh $< $$m >> $@.new || exit 1; \
done
@@ -465,7 +468,7 @@ syminfo.lst: gensyminfo.sh kernel_syms.lst $(top_srcdir)/grub-core/extra_deps.ls
moddep.lst: syminfo.lst genmoddep.awk video.lst
cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst extra_deps.lst
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT) build-grub-module-verifier$(BUILD_EXEEXT)
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
+1
View File
@@ -2598,4 +2598,5 @@ module = {
name = bli;
efi = commands/bli.c;
enable = efi;
depends = part_gpt;
};
-1
View File
@@ -1 +0,0 @@
depends bli part_gpt
+1 -1
View File
@@ -35,7 +35,7 @@ BEGIN {
for (i = 3; i <= NF; i++) {
modtab[$2] = modtab[$2] " " $i;
}
}
} else if ($1 == "") {} #Skip empty lines
else {
printf "error: %u: unrecognized input format\n", NR >"/dev/stderr";
error++;