diff --git a/Makefile b/Makefile index a9f5846..b6b0e80 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ manpages/%: manpages/%.xml .PHONY: all .PHONY: build -all: build +all: build test .PHONY: devel devel: CFLAGS += -DMXQ_DEVELOPMENT diff --git a/README.md b/README.md index 6dfb260..2e3f397 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ https://github.com/mariux/mxq ## Installation ### Install using `GNU make` ``` -make make install ``` + +or to specify a prefix: ``` -make PREFIX=... make PREFIX=... [DESTDIR=...] install ``` ### Install using `bee` @@ -26,18 +26,25 @@ make PREFIX=... [DESTDIR=...] install bee init $(bee download git://github.molgen.mpg.de/mariux64/mxq.git) --execute bee update mxq ``` + +or to specify a prefix ``` bee init $(bee download git://github.molgen.mpg.de/mariux64/mxq.git) --prefix=... --execute bee update mxq ``` ## Initial setup -Definitions of the tables and triggers for the MySQL database can be found in +Definitions of the tables for the MySQL database can be found in [mysql/create_tables.sql](https://github.molgen.mpg.de/mariux64/mxq/blob/master/mysql/create_tables.sql) +and +[mysql/create_trigger.sql](https://github.molgen.mpg.de/mariux64/mxq/blob/master/mysql/create_trigger.sql) Be sure to create those once and check the same [directory for alter_tables*.sql`](https://github.molgen.mpg.de/mariux64/mxq/blob/master/mysql/) files when upgrading. - +``` +mysql [options] [database] #include "mx_log.h" +#include "mx_util.h" + #ifndef mx_free_null #include #define mx_free_null(a) do { free((a)); (a) = NULL; } while(0) @@ -42,7 +44,6 @@ static int timetag(char *buf, size_t size) int mx_log_print(char *msg, size_t len) { - int res; char timebuf[1024]; static char *lastmsg = NULL; @@ -61,8 +62,7 @@ int mx_log_print(char *msg, size_t len) return -(errno=EINVAL); if (lastmsg && lastlen == len) { - res = strcmp(msg, lastmsg); - if (res == 0) { + if (mx_streq(msg, lastmsg)) { cnt++; mx_free_null(msg); return 2; diff --git a/test_mx_util.c b/test_mx_util.c index 817fbef..06cfe72 100644 --- a/test_mx_util.c +++ b/test_mx_util.c @@ -345,7 +345,7 @@ static void test_mx_strscan(void) assert(pps->ppid == getppid()); assert(pps->state == 'R'); assert(mx_streq(pps->comm, program_invocation_short_name) || mx_streq(pps->comm, "memcheck-amd64-")); - mx_proc_pid_stat_free(pps); + mx_proc_pid_stat_free_content(pps); } static void test_mx_strvec() {