X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fmanifest.c;h=cf4c987e956a261ea42772d16e3f1a5faab8d682;hp=e368b4ed1e2a8b0470218cc30a42aa7f5da3547d;hb=10e5e329a1a8804ff6461e1724071364cf6be572;hpb=453fdc02ce54ff965f9971a3bfd0e1a79b6c98f9 diff --git a/tools/manifest.c b/tools/manifest.c index e368b4ed..cf4c987e 100644 --- a/tools/manifest.c +++ b/tools/manifest.c @@ -12,11 +12,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -239,6 +239,7 @@ struct manifest *get_manifest(const void *ctx, const char *dir) list_head_init(&m->deps); list_head_init(&m->test_deps); + /* Trim trailing /. */ len = strlen(m->dir); while (len && m->dir[len-1] == '/') m->dir[--len] = '\0'; @@ -248,6 +249,9 @@ struct manifest *get_manifest(const void *ctx, const char *dir) errx(1, "I don't expect to be run from the root directory"); m->basename++; + assert(strstarts(m->dir, find_ccan_dir(m->dir))); + m->modname = m->dir + strlen(find_ccan_dir(m->dir)) + strlen("ccan/"); + add_files(m, ""); /* Nicer to run tests in a predictable order. */