build: add support for building with meson

Follow the OpenBMC herd and support a more modern, more comprehensible,
more performant build framework.

To build using meson:
  meson build
  ninja -C build
  ninja -C build install

Maintained support for:
  Configurable dbus parameters:
    INPUT_HISTORY_BUSNAME_ROOT= -> -Dinput-history-busname-root=
    INPUT_HISTORY_SENSOR_ROOT = -> -Dinput-history-sensor-root=
  UCD90160 support:
    UCD90160_DEF_YAML_FILE= -> -Ducd90160-yaml=
    --enable-turn-off-ucd90160-access = -> -Ducd90160-access=

Added -Dtests to match de-facto OpenBMC meson usage conventions.

Dropped UCD90160_DEF_OUTPUT_DIR.  Much like the destination of
intermediate artifacts like object files are not configurable, the
location of the generated UCD definition file should not be configurable
either.

Dropped support for --enable-oe-sdk rpath munging.  This was a
workaround for broken oe sdks that don't figure out the correct rpath
when running make check or ninja test.

Tested by building with both meson and autotools and then compared build
artifacts from each build system:
  generated source code is the same
  generated binaries have the same symbols

Ran existing unit tests (which passed) using ninja test.

Change-Id: Iac80ba1fe5c2d01abe0e0a95e0bec03b8b828ef5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
8 files changed
tree: d9b03ec14151706f0f702ab335527c2b2815aee0
  1. org/
  2. power-sequencer/
  3. power-supply/
  4. test/
  5. .clang-format
  6. .gitignore
  7. argument.hpp
  8. bootstrap.sh
  9. configure.ac
  10. device.hpp
  11. device_monitor.hpp
  12. elog-errors.hpp
  13. file.hpp
  14. gpio.cpp
  15. gpio.hpp
  16. LICENSE
  17. MAINTAINERS
  18. Makefile.am
  19. meson.build
  20. meson_options.txt
  21. names_values.hpp
  22. pmbus.cpp
  23. pmbus.hpp
  24. README.md
  25. utility.cpp
  26. utility.hpp
README.md

Code for detecting and analyzing power faults on Witherspoon.

To Build

To build this package, do the following steps:

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

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