diff --git a/src/Prep/TerraFit/Makefile.am b/src/Prep/TerraFit/Makefile.am index 6d206b04..4354064b 100644 --- a/src/Prep/TerraFit/Makefile.am +++ b/src/Prep/TerraFit/Makefile.am @@ -1 +1,6 @@ -EXTRA_DIST = terrafit.README terrafit.py +bin_SCRIPTS = terrafit.py +EXTRA_DIST = terrafit.README terrafit.py.in + +terrafit.py: $(srcdir)/terrafit.py.in + echo ${bindir} + sed -e "s%__bindir__%${bindir}%g" $(srcdir)/terrafit.py.in > terrafit.py \ No newline at end of file diff --git a/src/Prep/TerraFit/terrafit.py b/src/Prep/TerraFit/terrafit.py.in old mode 100755 new mode 100644 similarity index 98% rename from src/Prep/TerraFit/terrafit.py rename to src/Prep/TerraFit/terrafit.py.in index 7d3dc003..af9714fc --- a/src/Prep/TerraFit/terrafit.py +++ b/src/Prep/TerraFit/terrafit.py.in @@ -38,7 +38,7 @@ def pre_terra(pgmName, data, span_x, span_y, max_z, min_z): ## def run_terra(thresh, minnodes, count, factor, objName, pgmName): print - command = "../Terra/terra -e %f -n %d -p %d -h %f -o %s obj %s"%(thresh, minnodes, count, factor, objName, pgmName) + command = "__bindir__/terra -e %f -n %d -p %d -h %f -o %s obj %s"%(thresh, minnodes, count, factor, objName, pgmName) print command npts = -1 error = -99999.9