diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-27 21:52:25 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-27 21:52:25 +0100 |
commit | 6974c7030339b0e07086d8a34548396313725346 (patch) | |
tree | d7142decb8f5557703bf3026deceef19a96b32e4 /src/blogc-make/rules.c | |
parent | 4755ad22cdfa2c7414cc66e068b884f90f2cc639 (diff) | |
download | blogc-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.c | 20 |
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}, }; |