build: Correct out of tree build bugs
Change-Id: Id6e14414c6f15c11d1476039e3781d719f693d21
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/configure.ac b/configure.ac
index 15abf12..5e03b54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@
)
AC_ARG_VAR(YAML_PATH, [The path to the yaml config files.])
-AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="$srcdir/example"])
+AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="\${top_srcdir}/src/example"])
AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 0380f6c..c886d3a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,7 @@
$(AM_V_GEN)$(PYTHON) ${PDMGEN} \
-t generated.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d ${srcdir}/example \
+ -d $(YAML_PATH) \
-o ${builddir}/$@ \
generate-cpp
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 324eec7..aaae1ff 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -34,7 +34,7 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t pathgentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/pathgentest \
+ -d ${srcdir}/yaml/pathgentest \
-o $(builddir)/$@ \
generate-cpp
@@ -59,7 +59,7 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t propertygentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/propertygentest \
+ -d ${srcdir}/yaml/propertygentest \
-o $(builddir)/$@ \
generate-cpp
@@ -84,7 +84,7 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t propertywatchgentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/propertywatchgentest \
+ -d ${srcdir}/yaml/propertywatchgentest \
-o $(builddir)/$@ \
generate-cpp
@@ -126,7 +126,7 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t callbackgentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/callbackgentest \
+ -d ${srcdir}/yaml/callbackgentest \
-o $(builddir)/$@ \
generate-cpp
@@ -151,7 +151,7 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t callbackgroupgentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/callbackgroupgentest \
+ -d ${srcdir}/yaml/callbackgroupgentest \
-o $(builddir)/$@ \
generate-cpp
@@ -176,6 +176,6 @@
$(AM_V_GEN) $(PYTHON) $(PDMGEN) \
-t conditiongentest.mako.hpp \
-p "${TEMPLATESEARCH}" \
- -d yaml/conditiongentest \
+ -d ${srcdir}/yaml/conditiongentest \
-o $(builddir)/$@ \
generate-cpp