Fan control: Enable data generation

Start running the python script that generates the
fan zone data structures during the build.

If the paths to the 2 yaml files aren't provided during
configure, then the yaml in the example directory will
be used instead.

Change-Id: I9f67c1b94b5302c30ac87b0f80746854c42776b2
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/control/Makefile.am b/control/Makefile.am
index fc2a2dc..04d7d96 100644
--- a/control/Makefile.am
+++ b/control/Makefile.am
@@ -5,12 +5,14 @@
 	phosphor-fan-control
 
 phosphor_fan_control_SOURCES = \
-	generated.cpp \
 	fan.cpp \
 	main.cpp \
 	manager.cpp \
 	zone.cpp
 
+nodist_phosphor_fan_control_SOURCES = \
+	fan_zone_defs.cpp
+
 phosphor_fan_control_LDADD = \
 	$(top_builddir)/libfan.la \
 	$(SDBUSPLUS_LIBS) \
@@ -19,3 +21,8 @@
 phosphor_fan_control_CXXFLAGS = \
 	$(SDBUSPLUS_CFLAGS) \
 	$(PHOSPHOR_LOGGING_CFLAGS)
+
+BUILT_SOURCES = fan_zone_defs.cpp
+
+fan_zone_defs.cpp: ${srcdir}/gen-fan-zone-defs.py
+	$(AM_V_GEN)$(GEN_FAN_ZONE_DEFS)