src/common: use single Makefile for parallel builds Use a single Makefile in 'src/common' as it contains multiple subdirectories with a small number of objects to compile. This allows faster parallel builds since parallelism in automake is applied per Makefile. There is anectodal evidence of a 25 seconds improvement to the build process on a 36 core machine. Change-Id: If2ce266050e345d58b00bf65b574ccf5168f28f1 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
common: split ini-config in its own convenience library The src/common/config contains code related to two kinds of unrelated "config": the ini config, used for configuration files, and the XML session configuration (used for loading/saving sessions, and incidentally MI). Split the ini config in its own convenience library, in src/common/ini-config and keep the rest under src/common/config. Move ini-related things out of config/session-config.{cpp,h} and into ini-config/ini-config.{cpp,h}. Change-Id: Ia0b2b6cdcc15198e20444aa30f1fc86c053176d9 Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
common: compile libconfig as C++ As seen previously, make some global variables that need to be exported non-const. config_element_tracker_pid_target_legacy seems unused and clang gives an unused warning. It was not exposed publicly, so I think it's safe to remove it. Change-Id: I6f9e7d77a7a04b02ae6585383c11389869b4a79a Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Move to kernel style SPDX license identifiers The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. See https://spdx.org/ids-how for details. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Change-Id: I62e7038e191a061286abcef5550b58f5ee67149d Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: Don't override user variables within the build system Instead use the appropriatly prefixed AM_* variables as to not interfere when a user variable is passed to a make command. The proper use of flag variables is documented at : https://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Rename config.h to session-config.h The global config.h is included on the command line with the gcc '-include' switch which searches the local directory before the include path. This leads to a namespace collision with 'src/common/config/config.h'. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Fix: session.xsd is already present in dist_xml_DATA There is no need to include session.xsd as part of xml_DATA since dist_xml_DATA will already ensure it is part of the dist target and installed. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Signed-off-by: David Goulet <dgoulet@efficios.com>