X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fmanifest.c;h=cf4c987e956a261ea42772d16e3f1a5faab8d682;hb=4710a92838fc03ffa54ce2bc60cf0e214c97a199;hp=4cf540bd477bbabdc31e55e22503d1068170285d;hpb=d0d65608c45c7c73bdd6cf57d7f7c44c402dc03a;p=ccan diff --git a/tools/manifest.c b/tools/manifest.c index 4cf540bd..cf4c987e 100644 --- a/tools/manifest.c +++ b/tools/manifest.c @@ -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. */