Peter Stuge has uploaded this change for review.

View Change

meson: Determine custom_baud source file only once

Change-Id: I13221bdca7d14a483f416e81e3830a495659a85e
Signed-off-by: Peter Stuge <peter@stuge.se>
---
M meson.build
1 file changed, 19 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/68/70568/1
diff --git a/meson.build b/meson.build
index 56ab55c..722822c 100644
--- a/meson.build
+++ b/meson.build
@@ -101,6 +101,12 @@
add_project_arguments('-DIS_WINDOWS=0', language : 'c')
endif

+if host_machine.system() == 'linux'
+ custom_baud_c = 'custom_baud_linux.c'
+else
+ custom_baud_c = 'custom_baud.c'
+endif
+
systems_hwaccess = [ 'linux', 'openbsd', 'freebsd', 'dragonfly', 'netbsd' ]
systems_serial = [ 'linux', 'openbsd', 'freebsd', 'dragonfly', 'netbsd', 'darwin' ]

@@ -175,7 +181,7 @@
'buspirate_spi' : {
'systems' : systems_serial,
'groups' : [ group_serial, group_external ],
- 'srcs' : files('buspirate_spi.c', 'serial.c', (host_machine.system() == 'linux' ? 'custom_baud_linux.c' : 'custom_baud.c')),
+ 'srcs' : files('buspirate_spi.c', 'serial.c', custom_baud_c),
'flags' : [ '-DCONFIG_BUSPIRATE_SPI=1' ],
},
'ch341a_spi' : {
@@ -374,7 +380,7 @@
'pony_spi' : {
'systems' : systems_serial,
'groups' : [ group_serial, group_external ],
- 'srcs' : files('pony_spi.c', 'serial.c', (host_machine.system() == 'linux' ? 'custom_baud_linux.c' : 'custom_baud.c')),
+ 'srcs' : files('pony_spi.c', 'serial.c', custom_baud_c),
'flags' : [ '-DCONFIG_PONY_SPI=1' ],
},
'raiden_debug_spi' : {
@@ -416,7 +422,7 @@
'serprog' : {
'systems' : systems_serial,
'groups' : [ group_serial, group_external ],
- 'srcs' : files('serprog.c', 'serial.c', (host_machine.system() == 'linux' ? 'custom_baud_linux.c' : 'custom_baud.c')),
+ 'srcs' : files('serprog.c', 'serial.c', custom_baud_c),
'flags' : [ '-DCONFIG_SERPROG=1' ],
},
'stlinkv3_spi' : {

To view, visit change 70568. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I13221bdca7d14a483f416e81e3830a495659a85e
Gerrit-Change-Number: 70568
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Stuge <peter@stuge.se>
Gerrit-MessageType: newchange