From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [Patch] Move normal.mod to conf/common.rmk
Date: Mon, 23 Mar 2009 16:10:07 +0100 [thread overview]
Message-ID: <49C7A64F.30004@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
Hello. I propose to create a symlink normal/cpu. This way normal.mod can
be moved to conf/common.rmk. Works fine on i386-pc. Can people having
other platforms test?
--
Regards
Vladimir 'phcoder' Serbinenko
[-- Attachment #2: normalmove.diff --]
[-- Type: text/x-diff, Size: 13149 bytes --]
diff --git a/Makefile.in b/Makefile.in
index 28aa385..c4c641a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -120,7 +120,7 @@ SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS)
CLEANFILES =
MOSTLYCLEANFILES =
DISTCLEANFILES = config.status config.cache config.log config.h \
- Makefile stamp-h include/grub/cpu include/grub/machine \
+ Makefile stamp-h include/grub/cpu include/grub/machine normal/cpu \
gensymlist.sh genkernsyms.sh build_env.mk
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
diff --git a/conf/common.rmk b/conf/common.rmk
index 43bc683..72a46bf 100644
--- a/conf/common.rmk
+++ b/conf/common.rmk
@@ -54,6 +54,21 @@ grub_mkfont_CFLAGS = $(freetype_cflags)
grub_mkfont_LDFLAGS = $(freetype_libs)
endif
+pkglib_MODULES += normal.mod
+
+normal_mod_SOURCES = normal/cmdline.c normal/command.c \
+ normal/completion.c normal/execute.c \
+ normal/function.c normal/lexer.c normal/main.c normal/menu.c \
+ normal/menu_text.c \
+ normal/color.c \
+ normal/menu_viewer.c normal/menu_entry.c \
+ normal/misc.c grub_script.tab.c \
+ normal/script.c \
+ normal/cpu/setjmp.S
+normal_mod_CFLAGS = $(COMMON_CFLAGS)
+normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
+normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
# For the parser.
grub_script.tab.c grub_script.tab.h: normal/parser.y
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk
index 53595de..84d21e5 100644
--- a/conf/i386-coreboot.rmk
+++ b/conf/i386-coreboot.rmk
@@ -96,7 +96,7 @@ sbin_SCRIPTS += grub-install
grub_install_SOURCES = util/i386/pc/grub-install.in
# Modules.
-pkglib_MODULES = linux.mod normal.mod multiboot.mod \
+pkglib_MODULES = linux.mod multiboot.mod \
aout.mod play.mod serial.mod ata.mod \
memdisk.mod pci.mod lspci.mod reboot.mod \
halt.mod datetime.mod date.mod datehook.mod \
@@ -107,27 +107,6 @@ linux_mod_SOURCES = loader/i386/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/i386/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For reboot.mod.
reboot_mod_SOURCES = commands/reboot.c kern/i386/reboot.c
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk
index 18a99df..6dd569e 100644
--- a/conf/i386-efi.rmk
+++ b/conf/i386-efi.rmk
@@ -77,7 +77,7 @@ sbin_SCRIPTS = grub-install
grub_install_SOURCES = util/i386/efi/grub-install.in
# Modules.
-pkglib_MODULES = kernel.mod normal.mod chain.mod appleldr.mod \
+pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
datetime.mod date.mod datehook.mod
@@ -111,27 +111,6 @@ symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/i386/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For chain.mod.
chain_mod_SOURCES = loader/efi/chainloader.c
chain_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk
index a84b5aa..b285d4f 100644
--- a/conf/i386-ieee1275.rmk
+++ b/conf/i386-ieee1275.rmk
@@ -99,32 +99,11 @@ sbin_SCRIPTS = grub-install
grub_install_SOURCES = util/ieee1275/grub-install.in
# Modules.
-pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod \
+pkglib_MODULES = halt.mod reboot.mod suspend.mod \
multiboot.mod aout.mod serial.mod linux.mod \
nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
date.mod datehook.mod lsmmap.mod
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/i386/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For multiboot.mod.
multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
loader/i386/multiboot_helper.S \
diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk
index 60d5182..6e3bcf1 100644
--- a/conf/i386-pc.rmk
+++ b/conf/i386-pc.rmk
@@ -167,7 +167,7 @@ grub_install_SOURCES = util/i386/pc/grub-install.in
# For grub-mkrescue.
grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
-pkglib_MODULES = biosdisk.mod chain.mod linux.mod normal.mod \
+pkglib_MODULES = biosdisk.mod chain.mod linux.mod \
multiboot.mod reboot.mod halt.mod \
vbe.mod vbetest.mod vbeinfo.mod play.mod serial.mod \
ata.mod vga.mod memdisk.mod pci.mod lspci.mod \
@@ -190,27 +190,6 @@ linux_mod_SOURCES = loader/i386/pc/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/i386/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For reboot.mod.
reboot_mod_SOURCES = commands/reboot.c
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk
index 5aaaf56..01df91c 100644
--- a/conf/powerpc-ieee1275.rmk
+++ b/conf/powerpc-ieee1275.rmk
@@ -107,7 +107,6 @@ grub_mkrescue_SOURCES = util/powerpc/ieee1275/grub-mkrescue.in
# Modules.
pkglib_MODULES = halt.mod \
linux.mod \
- normal.mod \
reboot.mod \
suspend.mod \
multiboot.mod \
@@ -119,27 +118,6 @@ linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/powerpc/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For suspend.mod
suspend_mod_SOURCES = commands/ieee1275/suspend.c
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk
index 1658a66..7fc8f7d 100644
--- a/conf/sparc64-ieee1275.rmk
+++ b/conf/sparc64-ieee1275.rmk
@@ -86,7 +86,7 @@ kernel_elf_LDFLAGS = -mno-app-regs -nostdlib -Wl,-N,-Ttext,0x200000,-Bstatic,-me
# Modules.
#_linux.mod linux.mod
pkglib_MODULES = fat.mod ufs.mod ext2.mod minix.mod \
- hfs.mod jfs.mod normal.mod hello.mod font.mod ls.mod \
+ hfs.mod jfs.mod hello.mod font.mod ls.mod \
boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
configfile.mod search.mod gzio.mod xfs.mod \
@@ -157,27 +157,6 @@ sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
#linux_mod_CFLAGS = $(COMMON_CFLAGS)
#linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/sparc64/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For hello.mod.
hello_mod_SOURCES = hello/hello.c
hello_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk
index faa59fb..e7338a1 100644
--- a/conf/x86_64-efi.rmk
+++ b/conf/x86_64-efi.rmk
@@ -79,7 +79,7 @@ sbin_SCRIPTS = grub-install
grub_install_SOURCES = util/i386/efi/grub-install.in
# Modules.
-pkglib_MODULES = kernel.mod normal.mod chain.mod appleldr.mod \
+pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
datetime.mod date.mod datehook.mod
@@ -114,27 +114,6 @@ symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = normal/cmdline.c normal/command.c \
- normal/completion.c normal/execute.c \
- normal/function.c normal/lexer.c normal/main.c normal/menu.c \
- normal/menu_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/x86_64/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For chain.mod.
chain_mod_SOURCES = loader/efi/chainloader.c
chain_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 80b499c..65a9c4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -476,13 +476,16 @@ AC_SUBST([freetype_libs])
grub_CHECK_LINK_DIR
if test x"$link_dir" = xyes ; then
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
- include/grub/machine:include/grub/$target_cpu/$platform])
+ include/grub/machine:include/grub/$target_cpu/$platform
+ normal/cpu:normal/$target_cpu])
else
mkdir -p include/grub 2>/dev/null
rm -rf include/grub/cpu
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
rm -rf include/grub/machine
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
+ rm -rf normal/cpu
+ cp -rp $srcdir/normal/$target_cpu normal/cpu 2>/dev/null
fi
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
next reply other threads:[~2009-03-23 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 15:10 phcoder [this message]
2009-03-23 16:15 ` [Patch] Move normal.mod to conf/common.rmk Vesa Jääskeläinen
2009-03-23 16:36 ` phcoder
2009-03-23 18:40 ` Vesa Jääskeläinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C7A64F.30004@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.