From 2b485906cfa6d2e0431b0fa0120e1c267074b4e8 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 11 Mar 2017 15:58:30 +0100 Subject: make: all builds are "production" by default, enable "dev" on cli. this is more consistent with other similar tools, and enables us to add something like a [copy:dev] section later, that will avoid copying dev files to production builds. --- src/blogc-make/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/blogc-make/main.c') diff --git a/src/blogc-make/main.c b/src/blogc-make/main.c index eb7f504..8c73e13 100644 --- a/src/blogc-make/main.c +++ b/src/blogc-make/main.c @@ -25,7 +25,7 @@ print_help(void) { printf( "usage:\n" - " blogc-make [-h] [-v] [-V] [-f FILE] [RULE ...]\n" + " blogc-make [-h] [-v] [-D] [-V] [-f FILE] [RULE ...]\n" " - A simple build tool for blogc.\n" "\n" "positional arguments:\n" @@ -35,9 +35,9 @@ print_help(void) "optional arguments:\n" " -h show this help message and exit\n" " -v show version and exit\n" + " -D build for development environment\n" " -V be verbose when executing commands\n" - " -f FILE read FILE as blogcfile\n" - " -p build for production environment\n"); + " -f FILE read FILE as blogcfile\n"); bm_rule_print_help(); } @@ -45,7 +45,7 @@ print_help(void) static void print_usage(void) { - printf("usage: blogc-make [-h] [-v] [-V] [-f FILE] [-p] [RULE ...]\n"); + printf("usage: blogc-make [-h] [-v] [-D] [-V] [-f FILE] [RULE ...]\n"); } @@ -63,7 +63,7 @@ main(int argc, char **argv) bc_slist_t *rules = NULL; bool verbose = false; - bool production = false; + bool dev = false; char *blogcfile = NULL; bm_ctx_t *ctx = NULL; @@ -76,6 +76,9 @@ main(int argc, char **argv) case 'v': printf("%s\n", PACKAGE_STRING); goto cleanup; + case 'D': + dev = true; + break; case 'V': verbose = true; break; @@ -85,9 +88,6 @@ 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. @@ -117,7 +117,7 @@ main(int argc, char **argv) rv = 3; goto cleanup; } - ctx->production = production; + ctx->dev = dev; ctx->verbose = verbose; rv = bm_rule_executor(ctx, rules); -- cgit v1.2.3-18-g5258