grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

idea: adjust conf file layout


From: Bean
Subject: idea: adjust conf file layout
Date: Mon, 27 Apr 2009 15:09:47 +0800

Hi,

Currently, the organization of conf files are not optimal. There are a
lot of duplication in *.rmk files. For example, i386-efi.rmk and
x86_64-efi.rmk are basically the same, and grub-emu appears in every
rmk, but there is only minor difference between each one. Also,
related item are scattered around, which make it more likely for
casual mistakes, like forgeting to add files in grub_emu_SOURCES, etc.
Here are some of my thoughts:

1, Fine tune rmk layout
rmk are split into different blocks accordding to function, such as
common, commands, fs and partmap. Each block consists of generic and
platform dependent parts. For example, for i386-efi, the full set of
makefiles to be included is:

common-i386-efi.rmk
common-efi.rmk
common-i386.rmk
common.rmk
commands-i386-efi.rmk
commands-efi.rmk
commands-i386.rmk
commands.rmk
fs-i386-efi.rmk
fs-efi.rmk
fs-i386.rmk
fs.rmk
partmap-i386-efi.rmk
partmap-efi.rmk
partmap-i386.rmk
partmap.rmk

Of course, not all of them needs to be present, we can use -include to
add them to the main makefile.

2, Group related items together

For example, for the fat module, we could write it like this:

# For fat.mod.
fat_mod_SOURCES = fs/fat.c
fat_mod_CFLAGS = $(COMMON_CFLAGS)
fat_mod_LDFLAGS = $(COMMON_LDFLAGS)
pkglib_MODULES += fat.mod
grub_probe_SOURCES += fs/fat.c
grub_fstest_SOURCES += fs/fat.c
grub_emu_SOURCES += fs/fat.c

-- 
Bean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]