aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-06 21:38:41 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-07 01:30:54 +0100
commitd41c2fcdd9366fb3f1fcb11aceed919bfebbed61 (patch)
tree1081416126a9bff58857ade5984e5e3b9b45a487 /src/blogc-make/main.c
parentab1120742467f887b33cd89addf3c89b5f9bf5b6 (diff)
downloadblogc-d41c2fcdd9366fb3f1fcb11aceed919bfebbed61.tar.gz
blogc-d41c2fcdd9366fb3f1fcb11aceed919bfebbed61.tar.bz2
blogc-d41c2fcdd9366fb3f1fcb11aceed919bfebbed61.zip
make: add support to "production" builds
this is used by blogc-github-lambda and blogc-git-receiver.
Diffstat (limited to 'src/blogc-make/main.c')
-rw-r--r--src/blogc-make/main.c10
1 files changed, 8 insertions, 2 deletions
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);