build: drop autotools

With previously added support for building with meson/ninja autotools
support is no longer required.

Change-Id: I80654ada9d099a57447ded73da71f39293cd2f0a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/.gitignore b/.gitignore
index 8a7f3f1..8c94d06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,32 +1,2 @@
-*.o
-*.lo
-*.la
+build/
 *.sw*
-Makefile
-Makefile.in
-configure
-.deps
-.libs
-aclocal.m4
-ar-lib
-arm-openbmc-linux-gnueabi-libtool
-autom4te.cache/
-compile
-config.guess
-config.h
-config.h.in
-config.h.in~
-config.log
-config.status
-config.sub
-depcomp
-install-sh
-i586-openbmc-linux-libtool
-libtool
-ltmain.sh
-missing
-stamp-h1
-pseq-monitor
-psu-monitor
-ucd90160_defs.cpp
-test-driver
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index ed9413e..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-AM_DEFAULT_SOURCE_EXT = .cpp
-
-noinst_LTLIBRARIES = libpower.la
-libpower_la_LDFLAGS = -static
-libpower_la_LIBADD = \
-	-lstdc++fs \
-	$(PHOSPHOR_LOGGING_LIBS) \
-	$(SDBUSPLUS_LIBS) \
-	$(SDEVENTPLUS_LIBS) \
-	$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
-	$(OPENPOWER_DBUS_INTERFACES_LIBS)
-libpower_la_CXXFLAGS = \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	$(SDBUSPLUS_CFLAGS) \
-	$(SDEVENTPLUS_CFLAGS) \
-	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-	$(OPENPOWER_DBUS_INTERFACES_CFLAGS)
-
-libpower_la_SOURCES = \
-	gpio.cpp \
-	pmbus.cpp \
-	utility.cpp \
-	org/open_power/Witherspoon/Fault/error.cpp
-
-nobase_nodist_include_HEADERS = \
-	org/open_power/Witherspoon/Fault/error.hpp
-
-BUILT_SOURCES = \
-	org/open_power/Witherspoon/Fault/error.cpp \
-	org/open_power/Witherspoon/Fault/error.hpp
-
-org/open_power/Witherspoon/Fault/error.hpp: ${srcdir}/org/open_power/Witherspoon/Fault.errors.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(srcdir) error exception-header org.open_power.Witherspoon.Fault > $@
-
-org/open_power/Witherspoon/Fault/error.cpp: ${srcdir}/org/open_power/Witherspoon/Fault.errors.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(srcdir) error exception-cpp org.open_power.Witherspoon.Fault > $@
-
-SUBDIRS = . power-sequencer power-supply test power-supply/test
diff --git a/README.md b/README.md
index 1cd3089..1299878 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,8 @@
 ```
 To build this package, do the following steps:
 
-    1. ./bootstrap.sh
-    2. ./configure ${CONFIGURE_FLAGS}
-    3. make
+    1. meson build
+    2. ninja -C build
 
-To full clean the repository again run `./bootstrap.sh clean`.
+To clean the repository again run `rm -rf build`.
 ```
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index 4c0b0f5..0000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
-        config.guess config.h.in config.h.in~ config.sub configure depcomp \
-        install-sh ltmain.sh missing *libtool"
-
-case $1 in
-    clean)
-        test -f Makefile && make maintainer-clean
-        for file in ${AUTOCONF_FILES}; do
-            find -name "$file" | xargs -r rm -rf
-        done
-        exit 0
-        ;;
-esac
-
-autoreconf -if
-echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index bc423ac..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,111 +0,0 @@
-# Initialization
-AC_PREREQ([2.69])
-AC_INIT([witherspoon-pfault-analysis], [1.0],
-[https://github.com/openbmc/witherspoon-pfault-analysis/issues])
-AC_LANG([C++])
-AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
-AM_SILENT_RULES([yes])
-
-# Checks for programs.
-AC_PROG_CXX
-AM_PROG_AR
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-# Checks for typedefs, structures, and compiler characteristics.
-AX_CXX_COMPILE_STDCXX_17([noext])
-AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
-
-# Download gpio.h from github if necessary.
-AC_CHECK_HEADER(linux/gpio.h,[HAVE_LINUX_GPIO_H=""],[HAVE_LINUX_GPIO_H="-I linux/gpio.h"])
-AS_IF([test "$HAVE_LINUX_GPIO_H" != ""],
-    AC_MSG_WARN([Could not find linux/gpio.h: Attempting to download locally for building from https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/gpio.h])
-    AC_SUBST([BT_BMC_DL],[`mkdir -p linux;wget https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/gpio.h -O linux/gpio.h`])
-)
-
-PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
-PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus])
-PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
-PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
-PKG_CHECK_MODULES([OPENPOWER_DBUS_INTERFACES], [openpower-dbus-interfaces])
-# Check for sdbus++
-AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
-AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
-    AC_MSG_ERROR(["Requires sdbus++"]))
-
-# Checks for library functions.
-LT_INIT # Required for systemd linking
-
-# Check/set gtest specific functions.
-AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
-AC_SUBST(GTEST_CPPFLAGS)
-
-# Test cases require SDK so only build if we're told to (and SDK is available)
-AC_ARG_ENABLE([oe-sdk],
-    AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.])
-)
-AC_ARG_VAR(OECORE_TARGET_SYSROOT,
-    [Path to the OE SDK SYSROOT])
-AS_IF([test "x$enable_oe_sdk" == "xyes"],
-    AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"],
-          AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk])
-    )
-    AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT])
-    [
-        testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib"
-        testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib"
-        testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`"
-    ]
-    AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags])
-)
-
-AC_ARG_ENABLE([turn-off-ucd90160-access],
-    AS_HELP_STRING([--enable-turn-off-ucd90160-access], [Turn off UCD90160 hardware access])
-)
-
-AC_ARG_VAR(UCD90160_DEVICE_ACCESS, [Turn off UCD90160 hardware access])
-
-# Always define UCD90160_DEVICE_ACCESS unless explicitly turned off
-AS_IF([test "x$enable_turn_off_ucd90160_access" != "xyes"],
-      [UCD90160_DEVICE_ACCESS="yes"]
-      AC_DEFINE_UNQUOTED([UCD90160_DEVICE_ACCESS], ["$UCD90160_DEVICE_ACCESS"], [Turn off UCD90160 hardware access])
-)
-
-AC_ARG_VAR(UCD90160_DEF_YAML_FILE,
-           [The sequencer definition file to use])
-AS_IF([test "x$UCD90160_DEF_YAML_FILE" == "x"],
-      [UCD90160_DEF_YAML_FILE="\${top_srcdir}/power-sequencer/example/ucd90160.yaml"])
-AC_DEFINE_UNQUOTED([UCD90160_DEF_YAML_FILE], ["$UCD90160_DEF_YAML_FILE"],
-                   [The sequencer definition file to use])
-
-AC_ARG_VAR(UCD90160_DEF_OUTPUT_DIR,
-           [The output directory for the generated UCD90160 definition file])
-AS_IF([test "x$UCD90160_DEF_OUTPUT_DIR" == "x"],
-      [UCD90160_DEF_OUTPUT_DIR="\${top_srcdir}/power-sequencer/"])
-AC_DEFINE_UNQUOTED([UCD90160_DEF_OUTPUT_DIR], ["$UCD90160_DEF_OUTPUT_DIR"],
-                   [The output directory for the generated UCD90160 definition file])
-
-AC_SUBST([GEN_UCD90160_DEFS],
-         ["$PYTHON \${top_srcdir}/power-sequencer/gen-ucd90160-defs.py \
-                  -i $UCD90160_DEF_YAML_FILE \
-                  -o $UCD90160_DEF_OUTPUT_DIR"])
-
-
-AC_ARG_VAR(INPUT_HISTORY_BUSNAME_ROOT, [The D-Bus busname root for the PS input history.])
-AS_IF([test "x$INPUT_HISTORY_BUSNAME_ROOT" == "x"],
-      [INPUT_HISTORY_BUSNAME_ROOT="org.open_power.powersupply"])
-AC_DEFINE_UNQUOTED([INPUT_HISTORY_BUSNAME_ROOT],
-                   ["$INPUT_HISTORY_BUSNAME_ROOT"],
-                   [The D-Bus busname root for the PS input history.])
-
-AC_ARG_VAR(INPUT_HISTORY_SENSOR_ROOT, [The D-Bus power sensors namespace root])
-AS_IF([test "x$INPUT_HISTORY_SENSOR_ROOT" == "x"],
-      [INPUT_HISTORY_SENSOR_ROOT="/org/open_power/sensors/aggregation/per_30s"])
-AC_DEFINE_UNQUOTED([INPUT_HISTORY_SENSOR_ROOT],
-                   ["$INPUT_HISTORY_SENSOR_ROOT"],
-                   [The D-Bus power sensors namespace root])
-
-# Create configured output
-AC_CONFIG_FILES([Makefile power-sequencer/Makefile power-supply/Makefile test/Makefile power-supply/test/Makefile])
-AC_OUTPUT
diff --git a/power-sequencer/Makefile.am b/power-sequencer/Makefile.am
deleted file mode 100644
index d9f0324..0000000
--- a/power-sequencer/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-AM_DEFAULT_SOURCE_EXT = .cpp
-AM_CPPFLAGS = -I$(top_srcdir)
-
-bin_PROGRAMS = \
-	pseq-monitor
-
-pseq_monitor_SOURCES = \
-	argument.cpp \
-	main.cpp \
-	pgood_monitor.cpp \
-	runtime_monitor.cpp \
-	ucd90160.cpp
-
-nodist_pseq_monitor_SOURCES = \
-	ucd90160_defs.cpp
-
-pseq_monitor_LDADD = \
-	$(top_builddir)/libpower.la \
-	$(PHOSPHOR_LOGGING_LIBS) \
-	${PHOSPHOR_DBUS_INTERFACES_LIBS} \
-	$(SDBUSPLUS_LIBS) \
-	$(SDEVENTPLUS_LIBS)
-
-pseq_monitor_CXXFLAGS = \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
-	$(SDBUSPLUS_CFLAGS) \
-	$(SDEVENTPLUS_CFLAGS)
-
-BUILT_SOURCES = ucd90160_defs.cpp
-
-ucd90160_defs.cpp: ${srcdir}/gen-ucd90160-defs.py templates/ucd90160_defs.mako.cpp
-	$(AM_V_GEN)$(GEN_UCD90160_DEFS)
diff --git a/power-supply/Makefile.am b/power-supply/Makefile.am
deleted file mode 100644
index e336116..0000000
--- a/power-supply/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-AM_DEFAULT_SOURCE_EXT = .cpp
-AM_CPPFLAGS = -iquote ${top_srcdir}
-
-bin_PROGRAMS = \
-	psu-monitor
-
-psu_monitor_SOURCES = \
-	main.cpp \
-	argument.cpp \
-	power_supply.cpp \
-	record_manager.cpp
-
-psu_monitor_CXXFLAGS = \
-	$(SDBUSPLUS_CFLAGS) \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
-
-psu_monitor_LDADD = \
-	${top_builddir}/libpower.la \
-	$(SDBUSPLUS_LIBS) \
-	$(PHOSPHOR_LOGGING_LIBS) \
-	${PHOSPHOR_DBUS_INTERFACES_LIBS}
-
diff --git a/power-supply/test/Makefile.am b/power-supply/test/Makefile.am
deleted file mode 100644
index 95fbca0..0000000
--- a/power-supply/test/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)
-
-# Run all 'check' test programs
-TESTS = $(check_PROGRAMS)
-
-check_PROGRAMS = test_records
-
-test_records_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
-
-test_records_CXXFLAGS = $(PTHREAD_CFLAGS) \
-	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	$(SDBUSPLUS_CFLAGS)
-
-test_records_LDFLAGS = -lgtest_main -lgtest \
-	$(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS) \
-	$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
-	$(PHOSPHOR_LOGGING_LIBS) \
-	$(SDBUSPLUS_LIBS)
-
-test_records_SOURCES = test_records.cpp
-
-test_records_LDADD = ../record_manager.o
-
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index 138d637..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)
-
-# Run all 'check' test programs
-TESTS = $(check_PROGRAMS)
-
-check_PROGRAMS = nvtest
-nvtest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
-
-nvtest_CXXFLAGS = $(PTHREAD_CFLAGS)
-nvtest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS)
-
-nvtest_SOURCES = nvtest.cpp