grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] enable emuusb and emupci on emu platform only
@ 2013-07-21  6:53 Andrey Borzenkov
  2013-07-25 14:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2013-07-21  6:53 UTC (permalink / raw)
  To: grub-devel

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

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>

---
 grub-core/Makefile.core.def | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 06617d7..230bed5 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -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;
 };
 
-- 
tg: (af5fa18..) u/emuusb-in-emu (depends on: master)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] enable emuusb and emupci on emu platform only
  2013-07-21  6:53 [PATCH] enable emuusb and emupci on emu platform only Andrey Borzenkov
@ 2013-07-25 14:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2013-07-25 17:06   ` Andrey Borzenkov
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-07-25 14:44 UTC (permalink / raw)
  To: The development of GNU GRUB

On 21.07.2013 08:53, Andrey Borzenkov wrote:
> 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)
> Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
>
> ---
>   grub-core/Makefile.core.def | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
> index 06617d7..230bed5 100644
> --- a/grub-core/Makefile.core.def
> +++ b/grub-core/Makefile.core.def
> @@ -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;
>   };
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] enable emuusb and emupci on emu platform only
  2013-07-25 14:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-07-25 17:06   ` Andrey Borzenkov
  2013-11-04  3:43     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2013-07-25 17:06 UTC (permalink / raw)
  To: grub-devel

В Thu, 25 Jul 2013 16:44:08 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:

> On 21.07.2013 08:53, Andrey Borzenkov wrote:
> > 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?

diff --git a/configure.ac b/configure.ac
index 4fe20a3..acd37f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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],
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 06617d7..230bed5 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -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;
 };
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] enable emuusb and emupci on emu platform only
  2013-07-25 17:06   ` Andrey Borzenkov
@ 2013-11-04  3:43     ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-11-04  3:43 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]

Go ahead. I mistagged this one in my inbox and hence missed it, sorry
for this
On 25.07.2013 19:06, Andrey Borzenkov wrote:
> В Thu, 25 Jul 2013 16:44:08 +0200
> Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> 
>> On 21.07.2013 08:53, Andrey Borzenkov wrote:
>>> 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?
> 
> diff --git a/configure.ac b/configure.ac
> index 4fe20a3..acd37f2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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],
> diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
> index 06617d7..230bed5 100644
> --- a/grub-core/Makefile.core.def
> +++ b/grub-core/Makefile.core.def
> @@ -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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-04  3:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-21  6:53 [PATCH] enable emuusb and emupci on emu platform only Andrey Borzenkov
2013-07-25 14:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-07-25 17:06   ` Andrey Borzenkov
2013-11-04  3:43     ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).