Fix compile-time race conditions

When building this, some small percentage of builds would fail and it
seemed like there was a race condition that was the culprit.

This creates a new static library for log manager so multiple things
don't rebuild it. Additionally, we explicitly depend on generated
headers to ensure things that rely on it build after those files
are created. I have run over 200 builds and there have been no errors.

Change-Id: I4a1fd7270d081a464d1f9ea2482d84e1331fb9a5
Signed-off-by: James Athappilly <jamesatha@gmail.com>
diff --git a/meson.build b/meson.build
index af62302..79251f5 100644
--- a/meson.build
+++ b/meson.build
@@ -172,16 +172,24 @@
     phosphor_logging_dep,
     sdbusplus_dep,
     sdeventplus_dep,
+    declare_dependency(sources: generated_headers),
 ]
-executable(
-    'phosphor-log-manager',
+log_manager_lib = static_library(
+    'log_manager_lib',
     log_manager_sources,
     log_manager_ext_sources,
+    include_directories: include_directories('gen'),
+    dependencies: [log_manager_deps, log_manager_ext_deps],
+    cpp_args: log_manager_ext_args,
+)
+executable(
+    'phosphor-log-manager',
     'log_manager_main.cpp',
     include_directories: include_directories('gen'),
     cpp_args: log_manager_ext_args,
-    dependencies: [log_manager_deps, log_manager_ext_deps],
+    dependencies: [conf_h_dep, log_manager_deps, phosphor_logging_dep],
     install: true,
+    link_with: log_manager_lib,
 )
 
 executable(