From d41c2fcdd9366fb3f1fcb11aceed919bfebbed61 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Mon, 6 Mar 2017 21:38:41 +0100 Subject: make: add support to "production" builds this is used by blogc-github-lambda and blogc-git-receiver. --- src/blogc-make/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/blogc-make/main.c') diff --git a/src/blogc-make/main.c b/src/blogc-make/main.c index 8e15981..eb7f504 100644 --- a/src/blogc-make/main.c +++ b/src/blogc-make/main.c @@ -36,7 +36,8 @@ print_help(void) " -h show this help message and exit\n" " -v show version and exit\n" " -V be verbose when executing commands\n" - " -f FILE read FILE as blogcfile\n"); + " -f FILE read FILE as blogcfile\n" + " -p build for production environment\n"); bm_rule_print_help(); } @@ -44,7 +45,7 @@ print_help(void) static void print_usage(void) { - printf("usage: blogc-make [-h] [-v] [-V] [-f FILE] [RULE ...]\n"); + printf("usage: blogc-make [-h] [-v] [-V] [-f FILE] [-p] [RULE ...]\n"); } @@ -62,6 +63,7 @@ main(int argc, char **argv) bc_slist_t *rules = NULL; bool verbose = false; + bool production = false; char *blogcfile = NULL; bm_ctx_t *ctx = NULL; @@ -83,6 +85,9 @@ main(int argc, char **argv) else if (i + 1 < argc) blogcfile = bc_strdup(argv[++i]); break; + case 'p': + production = true; + break; #ifdef MAKE_EMBEDDED case 'm': // no-op, for embedding into blogc binary. @@ -112,6 +117,7 @@ main(int argc, char **argv) rv = 3; goto cleanup; } + ctx->production = production; ctx->verbose = verbose; rv = bm_rule_executor(ctx, rules); -- cgit v1.2.3-18-g5258