diff options
author | Josh Blum | 2013-07-13 14:03:11 -0700 |
---|---|---|
committer | Josh Blum | 2013-07-13 14:03:11 -0700 |
commit | cb0c6da5230aad979153b48d3733984c0d62122e (patch) | |
tree | 1c3fc6f13d92e79942f2b050c189f44109e676ab /tmpl/regen_all.sh | |
parent | f99744a072d97c83f5a7da6c0626a38475c4fc44 (diff) | |
parent | fc98eaf2a00e000841cb16d962f83c118e4824c2 (diff) | |
download | sandhi-cb0c6da5230aad979153b48d3733984c0d62122e.tar.gz sandhi-cb0c6da5230aad979153b48d3733984c0d62122e.tar.bz2 sandhi-cb0c6da5230aad979153b48d3733984c0d62122e.zip |
Merge branch 'generate_templates'
Diffstat (limited to 'tmpl/regen_all.sh')
-rwxr-xr-x | tmpl/regen_all.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tmpl/regen_all.sh b/tmpl/regen_all.sh new file mode 100755 index 0000000..53886c9 --- /dev/null +++ b/tmpl/regen_all.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# This script generates the multi-argument template code +# for the callable and factory interfaces. +# This is the magic that makes the API calls +# so natural to call into as a C++ client app. +# This script is manually run when the source tmpl files are changed. +# And the generated sources are checked in. +# This way, the build system does not generate public headers. +# And the build system does not depend on Cheetah templates. + +SCRIPT="`readlink -e $0`" +SCRIPTPATH="`dirname $SCRIPT`" +DEST=${SCRIPTPATH}/../include/gras + +python expand_template.py factory.tmpl.hpp ${DEST}/factory.hpp +python expand_template.py factory_detail.tmpl.hpp ${DEST}/detail/factory.hpp +python expand_template.py callable.tmpl.hpp ${DEST}/callable.hpp +python expand_template.py callable_detail.tmpl.hpp ${DEST}/detail/callable.hpp |