aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
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},
};