Skip to contentSkip to conversation

enable emuusb and emupci on emu platform only

PATCH In review Andrey Borzenkov 2 participants 4 messages Jul 21, 2013 – Nov 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 enable emuusb and emupci on emu platform only

Is there any reason we may want to build them when not building --with-platform=emu?

---
 grub-core/Makefile.core.def | 2 ++
 1 file changed, 2 insertions(+)
grub-core/Makefile.core.def +2 -0
index 06617d7..230bed5 100644
@@ -477,6 +477,7 @@ module = {
 module = {
   name = emuusb;
   common = bus/usb/usb.c;
+  enable = emu;
   condition = COND_GRUB_EMU_USB;
 };
 
@@ -546,6 +547,7 @@ module = {
   common = bus/emu/pci.c;
   common = commands/lspci.c;
 
+  enable = emu;
   condition = COND_GRUB_EMU_PCI;
 };
 
Signature · 1 line
tg: (af5fa18..) u/emuusb-in-emu (depends on: master)
#1 lore raw
Quoted 3 lines · Andrey Borzenkov

Is there any reason we may want to build them when not building --with-platform=emu?

I think it's better to reset COND_EMU_PCI/COND_EMU_USB to false in configure state when not compiling for emu as usage of both enable and consition simultaneously is marginal and it's beter not to rely on it (so to i.a. permit its removal if necessary)

Quoted 27 lines
---
  grub-core/Makefile.core.def | 2 ++
  1 file changed, 2 insertions(+)
grub-core/Makefile.core.def +2 -0
index 06617d7..230bed5 100644
@@ -477,6 +477,7 @@ module = {
  module = {
    name = emuusb;
    common = bus/usb/usb.c;
+  enable = emu;
    condition = COND_GRUB_EMU_USB;
  };
 
@@ -546,6 +547,7 @@ module = {
    common = bus/emu/pci.c;
    common = commands/lspci.c;
 
+  enable = emu;
    condition = COND_GRUB_EMU_PCI;
  };
 
#2 lore raw

В Thu, 25 Jul 2013 16:44:08 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 8 lines · Andrey Borzenkov
Quoted 3 lines

Is there any reason we may want to build them when not building --with-platform=emu?

I think it's better to reset COND_EMU_PCI/COND_EMU_USB to false in configure state when not compiling for emu as usage of both enable and consition simultaneously is marginal and it's beter not to rely on it (so to i.a. permit its removal if necessary)

I think it makes sense to use both. "enable = emu" makes it obvious that module should not be built on other platform. It also makes resulting Makefile.am slightly more readable.

Actually it is already used this way for SDL.

Like this?

configure.ac +7 -0
index 4fe20a3..acd37f2 100644
@@ -949,6 +949,13 @@ fi
 AC_SUBST([enable_grub_emu_sdl])
 AC_SUBST([enable_grub_emu_usb])
 AC_SUBST([enable_grub_emu_pci])
+
+else
+
+# Ignore --enable-emu-* if platform is not emu
+enable_grub_emu_sdl=no
+enable_grub_emu_usb=no
+enable_grub_emu_pci=no
 fi
 
 AC_ARG_ENABLE([grub-mkfont],
grub-core/Makefile.core.def +2 -0
index 06617d7..230bed5 100644
@@ -477,6 +477,7 @@ module = {
 module = {
   name = emuusb;
   common = bus/usb/usb.c;
+  enable = emu;
   condition = COND_GRUB_EMU_USB;
 };
 
@@ -546,6 +547,7 @@ module = {
   common = bus/emu/pci.c;
   common = commands/lspci.c;
 
+  enable = emu;
   condition = COND_GRUB_EMU_PCI;
 };
 
#3 lore raw

Go ahead. I mistagged this one in my inbox and hence missed it, sorry for this

Quoted 64 lines · Andrey Borzenkov

В Thu, 25 Jul 2013 16:44:08 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 8 lines · Andrey Borzenkov
Quoted 3 lines

Is there any reason we may want to build them when not building --with-platform=emu?

I think it's better to reset COND_EMU_PCI/COND_EMU_USB to false in configure state when not compiling for emu as usage of both enable and consition simultaneously is marginal and it's beter not to rely on it (so to i.a. permit its removal if necessary)

I think it makes sense to use both. "enable = emu" makes it obvious that module should not be built on other platform. It also makes resulting Makefile.am slightly more readable.

Actually it is already used this way for SDL.

Like this?

configure.ac +7 -0
index 4fe20a3..acd37f2 100644
@@ -949,6 +949,13 @@ fi
 AC_SUBST([enable_grub_emu_sdl])
 AC_SUBST([enable_grub_emu_usb])
 AC_SUBST([enable_grub_emu_pci])
+
+else
+
+# Ignore --enable-emu-* if platform is not emu
+enable_grub_emu_sdl=no
+enable_grub_emu_usb=no
+enable_grub_emu_pci=no
 fi
 
 AC_ARG_ENABLE([grub-mkfont],
grub-core/Makefile.core.def +2 -0
index 06617d7..230bed5 100644
@@ -477,6 +477,7 @@ module = {
 module = {
   name = emuusb;
   common = bus/usb/usb.c;
+  enable = emu;
   condition = COND_GRUB_EMU_USB;
 };
 
@@ -546,6 +547,7 @@ module = {
   common = bus/emu/pci.c;
   common = commands/lspci.c;
 
+  enable = emu;
   condition = COND_GRUB_EMU_PCI;
 };
 

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel