always run m4 in the right place
diff --git a/xos/tosca/destroy.py b/xos/tosca/destroy.py
index e5f5c37..d7f8300 100644
--- a/xos/tosca/destroy.py
+++ b/xos/tosca/destroy.py
@@ -1,14 +1,15 @@
import os
import sys
-os.system("m4 custom_types/xos.m4 > custom_types/xos.yaml")
-
# add the parent directory to sys.path
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
+# a bit of a hack for developing -- run m4 to generate xos.yaml from xos.m4
+os.system("m4 %s/custom_types/xos.m4 > %s/custom_types/xos.yaml" % (currentdir, currentdir))
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
import django
django.setup()
diff --git a/xos/tosca/run.py b/xos/tosca/run.py
index 87fb480..591582b 100644
--- a/xos/tosca/run.py
+++ b/xos/tosca/run.py
@@ -1,14 +1,15 @@
import os
import sys
-os.system("m4 custom_types/xos.m4 > custom_types/xos.yaml")
-
# add the parent directory to sys.path
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
+# a bit of a hack for developing -- run m4 to generate xos.yaml from xos.m4
+os.system("m4 %s/custom_types/xos.m4 > %s/custom_types/xos.yaml" % (currentdir, currentdir))
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
import django
django.setup()