Add chip_config meson build option

There will not be a need to build all chip data
files in every release so this option is being
added to allow for more control over what is built.

Change-Id: I059640525f6826d67c406fe4a25bcec301582d6e
Signed-off-by: Caleb Palmer <cnpalmer@us.ibm.com>
diff --git a/meson_options.txt b/meson_options.txt
index 0fc2767..b0ed04e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,3 @@
 option('tests', type: 'feature', description: 'Build tests')
+option('chip_config', type : 'array', choices: ['p10', 'explorer', 'odyssey'],
+       description : 'Configured chips to build data files for')
diff --git a/xml/meson.build b/xml/meson.build
index 4bc265e..7e56fbb 100644
--- a/xml/meson.build
+++ b/xml/meson.build
@@ -11,19 +11,17 @@
 # is run. However, this list must be kept in sync with the expected output so
 # that meson will know to run the script when an output file has changed or is
 # missing.
-cdb_files = {
-    'p10' :
-    [
-        'chip_data_p10_10.cdb',
-        'chip_data_p10_20.cdb',
-    ],
+cdb_files = {}
 
-    'explorer' :
-    [
-        'chip_data_explorer_11.cdb',
-        'chip_data_explorer_20.cdb',
-    ],
-}
+chip_config = get_option('chip_config')
+if 'p10' in chip_config
+    cdb_files += {'p10' : ['chip_data_p10_10.cdb', 'chip_data_p10_20.cdb']}
+endif
+
+if 'explorer' in chip_config
+    cdb_files += {'explorer' : ['chip_data_explorer_11.cdb',
+                                'chip_data_explorer_20.cdb']}
+endif
 
 foreach chip_dir, out_files : cdb_files