aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-10 23:42:31 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-10 23:42:31 +0100
commit9c3065d9cfadd860eea1d96765c642c5a529d9d4 (patch)
tree18b014c98bccb07141491b2bda740743dba26b03 /src
parentf7ae4bffadd232a758dfe9dce7025899b6fe7bad (diff)
downloadblogc-9c3065d9cfadd860eea1d96765c642c5a529d9d4.tar.gz
blogc-9c3065d9cfadd860eea1d96765c642c5a529d9d4.tar.bz2
blogc-9c3065d9cfadd860eea1d96765c642c5a529d9d4.zip
make: pass TAG_CLOUD variable to blogc.
this variable includes all the tags configured in blogcfile(5) as a space-separated string.
Diffstat (limited to 'src')
-rw-r--r--src/blogc-make/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/blogc-make/exec.c b/src/blogc-make/exec.c
index 551c7d7..a324d47 100644
--- a/src/blogc-make/exec.c
+++ b/src/blogc-make/exec.c
@@ -235,6 +235,12 @@ bm_exec_build_blogc_cmd(const char *blogc_bin, bm_settings_t *settings,
bc_string_append(rv, blogc_bin);
if (settings != NULL) {
+ if (settings->tags != NULL) {
+ char *tags = bc_strv_join(settings->tags, " ");
+ bc_string_append_printf(rv, " -D TAG_CLOUD='%s'", tags);
+ free(tags);
+ }
+
bc_trie_foreach(settings->global,
(bc_trie_foreach_func_t) list_variables, rv);
}