Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LyKyZ-00054B-Fm for mharc-grub-devel@gnu.org; Mon, 27 Apr 2009 03:10:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LyKyW-00050p-7m for grub-devel@gnu.org; Mon, 27 Apr 2009 03:10:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LyKyQ-0004yL-MR for grub-devel@gnu.org; Mon, 27 Apr 2009 03:09:59 -0400 Received: from [199.232.76.173] (port=33017 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LyKyQ-0004yI-F4 for grub-devel@gnu.org; Mon, 27 Apr 2009 03:09:54 -0400 Received: from mx20.gnu.org ([199.232.41.8]:59186) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LyKyP-0002ZL-Rn for grub-devel@gnu.org; Mon, 27 Apr 2009 03:09:54 -0400 Received: from ti-out-0910.google.com ([209.85.142.189]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LyKyO-0003f6-8L for grub-devel@gnu.org; Mon, 27 Apr 2009 03:09:53 -0400 Received: by ti-out-0910.google.com with SMTP id b6so265613tic.10 for ; Mon, 27 Apr 2009 00:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=fwRK/VMgslaaZ+G87RJAvzPotNJm/mpCQdRaasq813E=; b=Jq9yNnrfCCAbED7+uCenj4PxF+xL7IEexkDxVL/MFaXWPqnQOi4VN9cmhAf/twlWJP gMmPlvxK2YO29ZfDbDn/TWce892a/YwF7zBwkQ92cF/MwQyeaDZaAPLptpGXMgcg2WEW b0ARxjZ6vN1X1VGfBdKg93xGOF/gOjH+Znyf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=eDucWjMoMiSDpF/pHHg6T8utvY05jWIapRrpR3b1xWUgzKsRiEB0XubJW8KzBcoP1J hQjQ/IZAj7vh73zd9+9lRdWf3LIBwqSqBX539KTVHMqa+vFetVX2Z0jUvpKDynfXZkbW GaA23WHDbik8/U9P/i9ZBJAY1LmwOE7BvSv4c= MIME-Version: 1.0 Received: by 10.110.7.5 with SMTP id 5mr383157tig.46.1240816187789; Mon, 27 Apr 2009 00:09:47 -0700 (PDT) Date: Mon, 27 Apr 2009 15:09:47 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: idea: adjust conf file layout X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 07:10:00 -0000 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