aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 21:52:25 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 21:52:25 +0100
commit6974c7030339b0e07086d8a34548396313725346 (patch)
treed7142decb8f5557703bf3026deceef19a96b32e4 /src/blogc-make/rules.c
parent4755ad22cdfa2c7414cc66e068b884f90f2cc639 (diff)
downloadblogc-6974c7030339b0e07086d8a34548396313725346.tar.gz
blogc-6974c7030339b0e07086d8a34548396313725346.tar.bz2
blogc-6974c7030339b0e07086d8a34548396313725346.zip
make: implemented runserver rule
Diffstat (limited to 'src/blogc-make/rules.c')
-rw-r--r--src/blogc-make/rules.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index a471b0b..de7d6cc 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -548,6 +548,19 @@ clean_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
static int all_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose);
+
+// RUNSERVER RULE
+static int
+runserver_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
+{
+ int rv = all_exec(ctx, NULL, verbose);
+ if (rv != 0)
+ return rv;
+
+ return bm_exec_blogc_runserver(ctx->settings, verbose);
+}
+
+
const bm_rule_t const rules[] = {
{
.name = "all",
@@ -619,6 +632,13 @@ const bm_rule_t const rules[] = {
.exec_func = clean_exec,
.generate_files = false,
},
+ {
+ .name = "runserver",
+ .help = "run blogc-runserver pointing to output directory, if available",
+ .outputlist_func = NULL,
+ .exec_func = runserver_exec,
+ .generate_files = false,
+ },
{NULL, NULL, NULL, NULL, false},
};