aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 02:29:54 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 02:43:59 +0100
commit8cac2c3e3a61b64b9a9855dec413239bcec7f9d2 (patch)
tree6240cdabaa0352f08d62bbfa6de7c53f5a3f1063 /src/common
parent7bf68b0b617fb3ffa86f38fe06a49786883037f4 (diff)
downloadblogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.tar.gz
blogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.tar.bz2
blogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.zip
make: implemented a build tool for blogc
so, this is basically what happens when you don't have anything better to do in the christmas weekend. most of this code was written in the last 2 or 3 days. i'd like to thank the chivas brothers, the weather and my psychological problems for this achievement. on a serious note, this tool still needs a man page, more tests, and the aws lambda function should be adapted to use it instead of (or together with) make/busybox. also, while talking about aws lambda, this tool can be nicely embedded into the blogc binary, to produce a single "small" static binary for usage in lambda ;)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/error.c6
-rw-r--r--src/common/error.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/common/error.c b/src/common/error.c
index 031e4a9..cfe9d3b 100644
--- a/src/common/error.c
+++ b/src/common/error.c
@@ -130,6 +130,12 @@ bc_error_print(bc_error_t *err, const char *prefix)
case BLOGC_WARNING_DATETIME_PARSER:
fprintf(stderr, "warning: datetime: %s\n", err->msg);
break;
+ case BLOGC_MAKE_ERROR_SETTINGS:
+ fprintf(stderr, "error: settings: %s\n", err->msg);
+ break;
+ case BLOGC_MAKE_ERROR_EXEC:
+ fprintf(stderr, "error: exec: %s\n", err->msg);
+ break;
default:
fprintf(stderr, "error: %s\n", err->msg);
}
diff --git a/src/common/error.h b/src/common/error.h
index 5ac2b15..c685ee6 100644
--- a/src/common/error.h
+++ b/src/common/error.h
@@ -23,6 +23,12 @@ typedef enum {
BLOGC_ERROR_TEMPLATE_PARSER,
BLOGC_ERROR_LOADER,
BLOGC_WARNING_DATETIME_PARSER,
+
+ // errors for src/blogc-make
+ BLOGC_MAKE_ERROR_SETTINGS = 300,
+ BLOGC_MAKE_ERROR_EXEC,
+ BLOGC_MAKE_ERROR_ATOM,
+
} bc_error_type_t;
typedef struct {