r115@gandalf: fugalh | 2006-06-23 12:36:05 -0600
[ardour.git] / templates / SConscript
index 4269a1b9881856c3150564d72ad4469901be3c63..7fa556530b1e083a53a84211d33ed5ef484bf117 100644 (file)
@@ -2,8 +2,16 @@
 
 import os
 import glob
-template_files = glob.glob('*.template')
+template_files = glob.glob('*.template.in')
 
-Import('env install_prefix')
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour/templates'), template_files))
-env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_files))
+Import('env install_prefix subst_dict')
+
+template_build = []
+
+for template in template_files:
+    template_build = template_build + [env.SubstInFile (template[:-3], template, SUBST_DICT = subst_dict)]
+
+Default(template_build)
+
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/templates'), template_build))
+env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_build))