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