build: Enabled meson build infrastructure

In this commit enabled meson build infrastructure which is taking less
time than autotools to build.

Changes:
  - Same default value used for all build time configure option.
  - All external library checks are added into meson as well.
  - In meson, no need to mention list of files which are not required
    to install because, by default nothing will be installed.
  - Auto generated files are added into custom target and that will
    trigger when some target dependent with that.
  - In meson, enabled to treat warning as error so, modified few sources
    which are producing un-used variables.
        - Fixes made by removing those function parameters identifier alone.

By using meson, can able to see below built improvement time between meson
and autotools.

meson:
    - time sh -c 'meson builddir -Dhost-dump-offload-transport=pldm
       -Dubifs-workaround=enabled; ninja -C builddir/'
            real    0m12.244s
            user    0m57.575s
            sys     0m7.793s

autotools:
    - time sh -c 'autoreconf -i;
      ./configure ${CONFIGURE_FLAGS} --enable-ubifs-workaround
       --with-host-dump-offload-transport=pldm; make'
            real    1m16.539s
            user    1m2.738s
            sys     0m9.645s

TestedBy:
    - meson builddir
      ninja -C builddir

    - meson builddir -Dubifs-workaround=enabled
      ninja -C builddir

    - meson builddir -Dubifs-workaround=disabled
      ninja -C builddir

    - meson builddir -Dhost-dump-offload-transport=pldm
      ninja -C builddir

    - meson builddir -Dhost-dump-offload-transport=pldm \
                     -Dubifs-workaround=enabled
      ninja -C builddir

Note: Need to update openbmc phosphor-debug-collector recipe to use meson
      instead autotools, this will be updated once this patch got merged
      and also autotools build infrastructure will be removed as well.

Change-Id: Iadf2d3542dc2556377e7b2f91f01b04d5f8d7218
Signed-off-by: Ramesh Iyyar <rameshi1@in.ibm.com>
14 files changed
tree: 23d7a502cbec6442af32a54b8d021f358bb0c098
  1. offload-extensions/
  2. tools/
  3. xyz/
  4. .clang-format
  5. .gitignore
  6. bmc_dump_entry.cpp
  7. bmc_dump_entry.hpp
  8. bootstrap.sh
  9. configure.ac
  10. core_manager.cpp
  11. core_manager.hpp
  12. core_manager_main.cpp
  13. dump_entry.cpp
  14. dump_entry.hpp
  15. dump_internal.hpp
  16. dump_manager.cpp
  17. dump_manager.hpp
  18. dump_manager_main.cpp
  19. dump_offload.cpp
  20. dump_offload.hpp
  21. dump_serialize.cpp
  22. dump_serialize.hpp
  23. dump_utils.cpp
  24. dump_utils.hpp
  25. elog_watch.cpp
  26. elog_watch.hpp
  27. errors_map.mako.hpp
  28. errors_map_gen.py
  29. example_errors_watch.yaml
  30. ffdc
  31. LICENSE
  32. MAINTAINERS
  33. Makefile.am
  34. meson.build
  35. meson_options.txt
  36. offload-extensions.hpp
  37. README.md
  38. system_dump_entry.cpp
  39. system_dump_entry.hpp
  40. watch.cpp
  41. watch.hpp
README.md

phosphor-debug-collector

Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.

To Build with meson

To build this package with meson, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To clean the built files run ninja -C builddir clean.