Remove compilation using autotools

The intent behind this commit is build openpower-occ-control with
meson, so need to remove files related to autotools.

Tested: built openpower-occ-control successfully and worked.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I46e87cca03eb84631cb34ad7bab33e973b1fc95e
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index b82581c..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,92 +0,0 @@
-if !INSTALL_ERROR_YAML
-# Build these headers, don't install them
-noinst_HEADERS = \
-	occ_pass_through.hpp \
-	occ_status.hpp \
-	powercap.hpp \
-	occ_errors.hpp \
-	occ_events.hpp \
-	occ_presence.hpp \
-	occ_command.hpp \
-	utils.hpp
-
-noinst_LTLIBRARIES = libocc_control.la
-
-bin_PROGRAMS = openpower-occ-control
-
-openpower_occ_control_SOURCES = \
-	app.cpp
-
-libocc_control_la_SOURCES = \
-	occ_pass_through.cpp \
-	occ_manager.cpp \
-	occ_status.cpp \
-	occ_device.cpp \
-	occ_errors.cpp \
-	occ_presence.cpp \
-	occ_command.cpp \
-	occ_dbus.cpp \
-	powercap.cpp \
-	org/open_power/OCC/Device/error.cpp \
-	i2c_occ.cpp \
-	utils.cpp
-
-openpower_occ_control_LDADD = \
-	libocc_control.la \
-	-lstdc++fs \
-	$(SDBUSPLUS_LIBS) \
-	$(SDEVENTPLUS_LIBS) \
-	$(FMT_LIBS)
-
-BUILT_SOURCES =  org/open_power/OCC/Device/error.hpp \
-                 org/open_power/OCC/Device/error.cpp \
-                 occ_sensor.hpp
-
-CLEANFILES = ${BUILT_SOURCES}
-
-REQ_MAKO_FILE ?= ${top_srcdir}/occ_sensor.mako.hpp
-REQ_PY_SCRIPT ?= ${top_srcdir}/sensor_gen.py
-
-EXTRA_DIST = $(REQ_MAKO_FILE) $(REQ_PY_SCRIPT)
-
-occ_sensor.hpp: ${REQ_PY_SCRIPT} ${REQ_MAKO_FILE}
-	$(AM_V_GEN) ${PYTHON} ${REQ_PY_SCRIPT} -i ${YAML_PATH} > $@
-
-
-generic_ld_flags = \
-	$(SDBUSPLUS_LIBS) \
-	$(PHOSPHOR_LOGGING_LIBS) \
-	$(PHOSPHOR_DBUS_INTERFACES_LIBS)
-
-generic_cxx_flags = \
-	$(SDBUSPLUS_CFLAGS) \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
-
-libocc_control_la_CXXFLAGS = $(generic_cxx_flags)
-
-libocc_control_la_LDFLAGS = $(generic_ld_flags)
-
-openpower_occ_control_CXXFLAGS = $(generic_cxx_flags)
-
-openpower_occ_control_LDFLAGS = $(generic_ld_flags)
-
-include pldm.mk
-include powermode.mk
-
-org/open_power/OCC/Device/error.hpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-header org.open_power.OCC.Device > $@
-
-org/open_power/OCC/Device/error.cpp: ${top_srcdir}/org/open_power/OCC/Device.errors.yaml
-	@mkdir -p `dirname $@`
-	$(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Device > $@
-
-SUBDIRS = . test
-endif
-
-# Export error YAML to shared location
-yamldir = ${datadir}/phosphor-dbus-yaml/yaml
-nobase_yaml_DATA = \
-	org/open_power/OCC/Device.errors.yaml \
-	org/open_power/OCC/Device.metadata.yaml
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index 0d209c8..0000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh -xe
-
-AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
-        config.guess config.h.in config.sub configure depcomp install-sh \
-        ltmain.sh missing *libtool test-driver"
-
-case $1 in
-    clean)
-        test -f Makefile && make maintainer-clean
-        for file in ${AUTOCONF_FILES}; do
-            find . -name "$file" -print0 | xargs -0 -r rm -rf
-        done
-        exit 0
-        ;;
-esac
-
-autoreconf -i
-# shellcheck disable=SC2016
-echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 96b23f0..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,186 +0,0 @@
-AC_PREREQ([2.69])
-AC_INIT([openpower-occ-control], [1.0], [https://github.com/openbmc/openpower-occ-control/issues])
-
-AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
-AM_SILENT_RULES([yes])
-AC_LANG([C++])
-
-# Checks for programs
-AC_PROG_CXX
-AM_PROG_AR
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-# Check for compiler, packages only when install_error_yaml optional feature
-# is disabled
-AC_ARG_ENABLE([install_error_yaml],
-    AS_HELP_STRING([--enable-install_error_yaml], [Enable installing error yaml file]),
-        [], [install_error_yaml=no])
-AM_CONDITIONAL([INSTALL_ERROR_YAML], [test "x$enable_install_error_yaml" = "xyes"])
-AS_IF([test "x$enable_install_error_yaml" != "xyes"], [
-
-    # Suppress the --with-libtool-sysroot error
-    LT_INIT
-
-    # gtest
-    # 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])
-    )
-
-    PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
-    PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
-    PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
-    PKG_CHECK_MODULES([SDEVENTPLUS], [sdeventplus])
-    PKG_CHECK_MODULES([FMT], [fmt])
-
-    # Check for sdbusplus
-    PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
-
-    # Check for sdbus++ tool
-    AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
-    AS_IF([test "x$SDBUSPLUSPLUS" == "x"], AC_MSG_ERROR([Cannot find sdbus++]))
-
-    # Checks for typedefs, structures, and compiler characteristics.
-    AX_CXX_COMPILE_STDCXX_17([noext])
-    AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
-
-    AC_ARG_ENABLE([i2c-occ],
-        AS_HELP_STRING([--enable-i2c-occ], [Enable I2C OCC support])
-    )
-    AS_IF([test "x$enable_i2c_occ" == "xyes"],
-        AC_MSG_NOTICE([Enabling I2C OCC])
-        [
-            cpp_flags="-DI2C_OCC"
-        ]
-        AC_SUBST([CPPFLAGS], [$cpp_flags])
-    )
-
-    AC_ARG_ENABLE([read-occ-sensors],
-        AS_HELP_STRING([--enable-read-occ-sensors], [Enable read occ sensors support])
-    )
-    AS_IF([test "x$enable_read_occ_sensors" == "xyes"],
-        AC_MSG_NOTICE([Enabling read occ sensors])
-        [
-            cpp_flags="$CPPFLAGS -DREAD_OCC_SENSORS"
-        ]
-        AC_SUBST([CPPFLAGS], [$cpp_flags])
-    )
-
-    AC_ARG_WITH([host-communication-protocol],
-        AS_HELP_STRING([--with-host-communication-protocol], [To specify the host communication protocol])
-    )
-    AM_CONDITIONAL([ENABLE_PLDM], [test "$with_host_communication_protocol" == "pldm"])
-    AS_IF([test "x$with_host_communication_protocol" == "xpldm"],
-        AC_MSG_NOTICE([Enabling PLDM])
-        [
-            cpp_flags="$CPPFLAGS -DPLDM"
-            AX_PKG_CHECK_MODULES([LIBPLDM], [libpldm])
-        ]
-        AC_SUBST([CPPFLAGS], [$cpp_flags])
-    )
-
-    AC_ARG_ENABLE([power10-support],
-        AS_HELP_STRING([--enable-power10-support], [Enable Power10 support])
-    )
-    AM_CONDITIONAL([POWER10_SUPPORT], [test "$enable_power10_support" == "yes"])
-    AS_IF([test "x$enable_power10_support" == "xyes"],
-        AC_MSG_NOTICE([Enabling POWER10 Support])
-        [
-            cpp_flags="$CPPFLAGS -DPOWER10"
-        ]
-        AC_SUBST([CPPFLAGS], [$cpp_flags])
-    )
-])
-
-AC_ARG_VAR(OCC_CONTROL_BUSNAME, [The Dbus busname to own])
-AS_IF([test "x$OCC_CONTROL_BUSNAME" == "x"], [OCC_CONTROL_BUSNAME="org.open_power.OCC.Control"])
-AC_DEFINE_UNQUOTED([OCC_CONTROL_BUSNAME], ["$OCC_CONTROL_BUSNAME"], [The DBus busname to own])
-
-AC_ARG_VAR(OCC_CONTROL_ROOT, [The Dbus root])
-AS_IF([test "x$OCC_CONTROL_ROOT" == "x"], [OCC_CONTROL_ROOT="/org/open_power/control"])
-AC_DEFINE_UNQUOTED([OCC_CONTROL_ROOT], ["$OCC_CONTROL_ROOT"], [The Dbus root])
-
-AC_ARG_VAR(OCC_SENSORS_ROOT, [The sensors Dbus root])
-AS_IF([test "x$OCC_SENSORS_ROOT" == "x"], [OCC_SENSORS_ROOT="/xyz/openbmc_project/sensors"])
-AC_DEFINE_UNQUOTED([OCC_SENSORS_ROOT], ["$OCC_SENSORS_ROOT"], [The sensors Dbus root])
-
-AC_ARG_VAR(MAX_CPUS, [The max number of CPUs])
-AS_IF([test "x$MAX_CPUS" == "x"], [MAX_CPUS=2])
-AC_DEFINE_UNQUOTED([MAX_CPUS], [$MAX_CPUS], [The max number of CPUs])
-
-AC_ARG_VAR(CPU_NAME, [The CPU object name])
-AS_IF([test "x$CPU_NAME" == "x"], [CPU_NAME="cpu"])
-AC_DEFINE_UNQUOTED([CPU_NAME], ["$CPU_NAME"], [The CPU object name])
-
-AC_ARG_VAR(OCC_NAME, [The OCC object name])
-AS_IF([test "x$OCC_NAME" == "x"], [OCC_NAME="occ"])
-AC_DEFINE_UNQUOTED([OCC_NAME], ["$OCC_NAME"], [The OCC object name])
-
-AC_ARG_VAR(OCC_MASTER_NAME, [The OCC master object name])
-AS_IF([test "x$OCC_MASTER_NAME" == "x"], [OCC_MASTER_NAME="occ-hwmon.1"])
-AC_DEFINE_UNQUOTED([OCC_MASTER_NAME], ["$OCC_MASTER_NAME"], [The OCC master object name])
-
-AC_ARG_VAR(OCC_CPU_TEMP_SENSOR_TYPE, [The CPU temp sensor type])
-AS_IF([test "x$OCC_CPU_TEMP_SENSOR_TYPE" == "x"], [OCC_CPU_TEMP_SENSOR_TYPE=0xC0])
-AC_DEFINE_UNQUOTED([OCC_CPU_TEMP_SENSOR_TYPE], [$OCC_CPU_TEMP_SENSOR_TYPE], [The CPU temp sensor type])
-
-AC_ARG_VAR(OCC_DIMM_TEMP_SENSOR_TYPE, [The dimm temp sensor type])
-AS_IF([test "x$OCC_DIMM_TEMP_SENSOR_TYPE" == "x"], [OCC_DIMM_TEMP_SENSOR_TYPE=0xD0])
-AC_DEFINE_UNQUOTED([OCC_DIMM_TEMP_SENSOR_TYPE], [$OCC_DIMM_TEMP_SENSOR_TYPE], [The dimm temp sensor type])
-
-AC_ARG_VAR(OCC_HWMON_PATH, [The OCC hwmon path])
-AC_ARG_VAR(DEV_PATH, [The device path])
-AC_ARG_VAR(I2C_OCC_DEVICE_NAME, [The device name of i2c occ hwmon])
-AS_IF([test "x$enable_i2c_occ" == "xyes"],
-    # If enable_2c_occ is defined, define occ hwmon path for I2C and its driver's name
-    AS_IF([test "x$OCC_HWMON_PATH" == "x"], [OCC_HWMON_PATH="/sys/bus/i2c/drivers/occ-hwmon/"])
-    AS_IF([test "x$DEV_PATH" == "x"], [DEV_PATH="/sys/bus/i2c/devices"])
-    AS_IF([test "x$I2C_OCC_DEVICE_NAME" == "x"], [I2C_OCC_DEVICE_NAME="p8-occ-hwmon"]),
-
-    # Else, define occ hwmon path for FSI
-    AS_IF([test "x$OCC_HWMON_PATH" == "x"], [OCC_HWMON_PATH="/sys/bus/platform/drivers/occ-hwmon/"])
-    AS_IF([test "x$DEV_PATH" == "x"], [DEV_PATH="/sys/bus/platform/devices/"]),
-)
-AC_DEFINE_UNQUOTED([OCC_HWMON_PATH], ["$OCC_HWMON_PATH"], [The OCC hwmon path])
-AC_DEFINE_UNQUOTED([DEV_PATH], ["$DEV_PATH"], [The device path])
-AC_DEFINE_UNQUOTED([I2C_OCC_DEVICE_NAME], ["$I2C_OCC_DEVICE_NAME"], [The device name of i2c occ hwmon])
-
-AC_ARG_VAR(OCC_DEV_PATH, [The OCC device path in /dev])
-AS_IF([test "x$OCC_DEV_PATH" == "x"], [OCC_DEV_PATH="/dev/occ"])
-AC_DEFINE_UNQUOTED([OCC_DEV_PATH], ["$OCC_DEV_PATH"], [The OCC device path in /dev])
-
-AC_ARG_VAR(PS_DERATING_FACTOR, [The power supply derating factor])
-AS_IF([test "x$PS_DERATING_FACTOR" == "x"], [PS_DERATING_FACTOR=90])
-AC_DEFINE_UNQUOTED([PS_DERATING_FACTOR], [$PS_DERATING_FACTOR], [The power supply derating factor])
-
-AC_ARG_VAR(CPU_SUBPATH, [The subpath containing CPU objects])
-AS_IF([test "x$CPU_SUBPATH" == "x"], [CPU_SUBPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard"])
-AC_DEFINE_UNQUOTED([CPU_SUBPATH], ["$CPU_SUBPATH"], [The subpath containing CPU objects])
-
-# Handling configuration files
-AC_ARG_VAR(YAML_PATH, [The path to the yaml config files.])
-AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="$srcdir/example"])
-AC_DEFINE_UNQUOTED([YAML_PATH], ["$YAML_PATH"], [The path to the yaml config files])
-
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile test/Makefile])
-AC_OUTPUT
diff --git a/pldm.mk b/pldm.mk
deleted file mode 100644
index bcdaba1..0000000
--- a/pldm.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-if ENABLE_PLDM
-
-noinst_HEADERS += \
-	pldm.hpp
-libocc_control_la_SOURCES += \
-	pldm.cpp
-openpower_occ_control_LDADD += \
-	$(LIBPLDM_LIBS)
-openpower_occ_control_CXXFLAGS += \
-	$(LIBPLDM_CFLAGS)
-
-endif
diff --git a/powermode.mk b/powermode.mk
deleted file mode 100644
index 4e9ac9f..0000000
--- a/powermode.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-if POWER10_SUPPORT
-
-noinst_HEADERS += \
-	powermode.hpp
-libocc_control_la_SOURCES += \
-	powermode.cpp
-
-endif
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index 3fbcc7c..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)
-check_PROGRAMS = utest
-
-# Run all 'check' test programs
-TESTS = $(check_PROGRAMS)
-
-utest_LDADD = \
-	$(top_builddir)/libocc_control.la \
-	-lstdc++fs \
-	-lgmock \
-	$(SDBUSPLUS_LIBS) \
-	$(SDEVENTPLUS_LIBS) \
-	$(FMT_LIBS)
-
-utest_SOURCES = error_files_tests.cpp \
-                utest.cpp \
-                TestI2cOcc.cpp \
-                occ_dbus_test.cpp
-
-utest_CPPFLAGS = $(GTEST_CPPFLAGS) \
-                 $(AM_CPPFLAGS)
-
-utest_CXXFLAGS = $(PTHREAD_CFLAGS)
-
-utest_LDFLAGS = -lgtest -lgmock -lgmock_main \
-                $(PTHREAD_LIBS) \
-                $(OESDK_TESTCASE_FLAGS)