X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=templates%2FSConscript;h=60a80c5619c2163f9f6fafe197d0e37e2baf47b7;hb=45d3ec1437cf661533bc7750c623865def4424df;hp=4269a1b9881856c3150564d72ad4469901be3c63;hpb=d09f6b3016bacbc2871a8946cbb24ad705076509;p=ardour.git diff --git a/templates/SConscript b/templates/SConscript index 4269a1b988..60a80c5619 100644 --- a/templates/SConscript +++ b/templates/SConscript @@ -2,8 +2,17 @@ import os import glob -template_files = glob.glob('*.template') +template_files = glob.glob('*.template.in') +files = glob.glob('*.template') -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'), files)) +env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_build))