build: meson support for phosphor-log-manager

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5400d21d59b3c1ff8bde61d80eaec1cb6701a8cb
diff --git a/gen/README b/gen/README
new file mode 100644
index 0000000..71182b5
--- /dev/null
+++ b/gen/README
@@ -0,0 +1,2 @@
+This directory contains generated meson.build files from sdbus++-gen-meson.
+Do not edit them by hand.
diff --git a/gen/meson.build b/gen/meson.build
new file mode 100644
index 0000000..af850f2
--- /dev/null
+++ b/gen/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+sdbuspp_gen_meson_ver = run_command(
+    sdbuspp_gen_meson_prog,
+    '--version',
+).stdout().strip().split('\n')[0]
+
+if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 2'
+    warning('Generated meson files from wrong version of sdbus++-gen-meson.')
+    warning(
+        'Expected "sdbus++-gen-meson version 2", got:',
+        sdbuspp_gen_meson_ver
+    )
+endif
+
diff --git a/gen/regenerate-meson b/gen/regenerate-meson
new file mode 100755
index 0000000..56bc2c6
--- /dev/null
+++ b/gen/regenerate-meson
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+REPO_ROOT=$(git rev-parse --show-toplevel)
+
+# Find sdbus++-gen-meson
+#   1. Check $SDBUSPP_GEN_MESON
+#   2. Check in $PATH
+#   3. Check in subprojects/sdbusplus
+if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
+    SDBUSPP_GEN_MESON="$(which sdbus++-gen-meson 2> /dev/null)"
+fi
+if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
+    SDBUSPP_GEN_MESON="$REPO_ROOT/subprojects/sdbusplus/tools/sdbus++-gen-meson"
+fi
+if [ ! -x "$SDBUSPP_GEN_MESON" ]; then
+    echo "Cannot find sdbus++-gen-meson ($SDBUSPP_GEN_MESON)."
+    exit 1
+fi
+
+$SDBUSPP_GEN_MESON \
+    --command meson \
+    --directory "$REPO_ROOT" \
+    --output "$REPO_ROOT/gen"
diff --git a/gen/xyz/meson.build b/gen/xyz/meson.build
new file mode 100644
index 0000000..e4991ad
--- /dev/null
+++ b/gen/xyz/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('openbmc_project')
diff --git a/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
new file mode 100644
index 0000000..230448b
--- /dev/null
+++ b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
@@ -0,0 +1,14 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Logging/Internal/Manager__cpp'.underscorify(),
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
+    output: [ 'server.cpp', 'server.hpp', 'client.hpp',  ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.project_source_root(),
+        'xyz/openbmc_project/Logging/Internal/Manager',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Logging/Internal/meson.build b/gen/xyz/openbmc_project/Logging/Internal/meson.build
new file mode 100644
index 0000000..aaa5ce8
--- /dev/null
+++ b/gen/xyz/openbmc_project/Logging/Internal/meson.build
@@ -0,0 +1,16 @@
+# Generated file; do not modify.
+subdir('Manager')
+generated_others += custom_target(
+    'xyz/openbmc_project/Logging/Internal/Manager__markdown'.underscorify(),
+    input: [ meson.project_source_root() / 'xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
+    output: [ 'Manager.md' ],
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.project_source_root(),
+        'xyz/openbmc_project/Logging/Internal/Manager',
+    ],
+    build_by_default: true,
+)
+
diff --git a/gen/xyz/openbmc_project/Logging/meson.build b/gen/xyz/openbmc_project/Logging/meson.build
new file mode 100644
index 0000000..6421d35
--- /dev/null
+++ b/gen/xyz/openbmc_project/Logging/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('Internal')
diff --git a/gen/xyz/openbmc_project/meson.build b/gen/xyz/openbmc_project/meson.build
new file mode 100644
index 0000000..1b45c9d
--- /dev/null
+++ b/gen/xyz/openbmc_project/meson.build
@@ -0,0 +1,2 @@
+# Generated file; do not modify.
+subdir('Logging')